Azure-pipeline build sometimes returns error - build

Sometimes when building c# app in azure devops I receive the error :
Error C50518: Predefined type 'System.String' is not defined or imported.
THis is not deterministic. Sometimes fails and sometimes goes correct. No changes in source code between builds. Any idea what can be a problem?

Related

GoogleTest - error E0145 - "google::protobuf::internal::ExtensionSet::kMaximumFlatCapacity" may not be initialized

I was adding some code to a project and wanted to add a Google Test case for it, on the unit testing project called UnitTests. Everything was going fine, my test failed because of some silly copy+paste mistake I made but after I fixed it I couldn't run the test anymore because during the build stage I'd get this error
Error (active) E0145 member
"google::protobuf::internal::ExtensionSet::kMaximumFlatCapacity" may
not be initialized UnitTests
Which stems from google\protobuf\extension_set.h.
and
Error LNK1104 cannot open file '\UnitTests.exe'
I commented-out my new test and tried to rebuild but encountered the same issue.
Then I tried to change to a different branch in my local repository - one without any of that new code and building the unit tests project still resulted in the same issue.
What could be the problem?
I'm using Visual Studio 2017 if it could matter.
Thanks.

Error MSB3073: The command "node node_modules/webpack/bin/webpack.js --env.prod" exited with code 2

I'm building web application using asp.net core 2x and angular 5,during development/debug mode everything is getting build well.But when i try to publish it with release mode in visual studio 2017 am getting this error.please help me to resolve this.Am not using this in my code but it exists. Function calls are not supported in decorators but 'makeParamDecorator' was called in 'Injectable'
'Injectable' calls 'makeParamDecorator'.Please help.Thanks in advance.Screenshot of my error message
You need to run this on console:
node node_modules/webpack/bin/webpack.js --env.prod
then you will get the list of all the issues, and need to solve all of them, someone gonna be like:
ERROR in navmenu.component.html: Property 'auth' is protected and only accessible within class 'NavMenuComponent' and its subclasses.
another case:
ERROR in Error at estados.component.html(19,72): Expected 0 arguments, but got 1.
Error at home.component.html(8,12): Property 'selectedCharacter' does not exist on type 'HomeComponent'. Did you mean 'selectedCharacters'?
Each error have a different solution, you need to solve them all.
You can check this link:
Angular – The command “node node_modules/webpack/bin/webpack.js –env.prod” exited with code 2 and similar errors: how to fix them

Error: not.exe has stopped working - When trying to build LLVM

I am trying to build LLVM on windows, and everytime I do so I get to a certain point and then recieve an error that says "not.exe has stopped working" It pops up on the desktop about 15 times.
I am not sure what is going on, but when I check the error in Visual Studio I receive this:
Error 4 error : Couldn't execute program 'C:/Users/Cyborg/Documents/Developer'The process cannot access the file because it is being used by another process. C:\Users\Joe\Documents\Dev\llvm\test\CUSTOMBUILD check-llvm
I receive this error 5-7 times depending on how fast I click the error that pops up on the desktop. So clearly this issue is happening because of that.
The fault module is: MSVCR100.dll
Does anyone know why this is happening?
I don't know why you're getting the error since I don't build or use LLVM on Windows. Since no one else has chimed in, I'll try to give a hint or two.
"not.exe" (or "not" under Linux) is a little LLVM helper program used when running the lit based regressions tests. It is used to execute a program and return a good exit status if the program fails and a bad exit status if the program doesn't fail.
I'm guessing that "CUSTOMBUILD check-llvm" (what ever that is) is attempting to run the regression tests and your getting your mysterious error as a result whenevr "not" is used.
I hope that helps.

Failing to use PGO with error LNK1270

I'm trying to use Profile Guided Optimization (PGO) with VS8. After instrumenting the DLL in question I copy it over to a machine that has our application installed and run the training scenario. I then copy the pgc training files back to my dev box and get the following error:
1>StdAfx.obj : fatal error LNK1270: invalid file; timestamp does not match file linked with /LTCG:PGINSTRUMENT
The MSDN entry for this error says:
invalid file; timestamp does not match file linked with /LTCG:PGINSTRUMENT
The same files passed to the linker when specifying /LTCG:PGINSTRUMENT must also be passed when specifying /LTCG:PGOPTIMIZE.
/LTCG:PGOPTIMIZE requires that the inputs be identical to the /LTCG:PGINSTRUMENT phase.
To resolve this warning, run /LTCG:PGINSTRUMENT, redo all test runs, and run /LTCG:PGOPTIMIZE, or, create the optimized image with /LTCG:PGUPDATE instead of /LTCG:PGOPTIMIZE.
Rerunning the tests doesn't solve the problem (although it sometimes appears for other files, not stdafx.obj).
Using /LTCG:PGUPDATE does work however I would like to understand what is causing the error, or failing that are there any drawbacks to using PGUPDATE rather than PGOPTIMIZE (I can't find anything relevant in the MSDN PGO page).

Firebreath plugin on windows fails to load in chrome

I am busy converting by existing firebreath plugin here to use gpgme instead of making calls via the OS and the gpg binary.
I have managed to get the code to compile in windows using VS 2010 on a x32 system but after loading the plugin into chrome I can not access the npapi code at all. Even simple version calls fails.
When loading the plugin I get no visible errors but when using sawbuck log viewer for chrome I get the erorr messages below.
.\renderer\webplugin_delegate_proxy.cc 347 PluginMsg_Init returned false
..\plugins\npapi\webplugin_impl.cc 271 Couldn't initialize plug-in
I have tried to use my code with both firebreath 1.4 and 1.6 and neither versions work. After some simple debugging it seems that using any code provided by gpgme (whether its called or not) causes the plugin to break.
I came to this conclusion by doing the following.
Created a new project with firebreath (versions 1.4 and 1.6)
Add the gpgme.h headers to gmailGPGAPI.cpp and changed nothing else aside from adding the required reference paths to the project.
Build the project to create the dll (this generates the dll fine).
Replace the existing ddl in my project with the dll in step 2 and test it with the following piece of code
plugin = document.createElement('object'); plugin.id = 'plugin';
plugin.type = 'application/x-gmailtest';
document.body.appendChild(plugin);
console.log("my plugin returned: "+ plugin.valid);
console.log("my plugin returned: " + plugin.version);
This returns valid = true and the version returns what ever i set it to.
I then modified gmailGPGAPI.cpp to now return the gpg version by calling gpgme_check_version(NULL) in the version method. I used that method because its probably the simplest returning function that I could test with.
Build the plugin and copy dll to chrome extension as in step 3-4. The plugin builds fine again as expected.
Load the plugin and try to execute the code in step 4 at which point it now just returns undefined for any property or method i try to access on the plugin. No errors are printed to the console or anywhere else in chrome except for the error logged to sawbuck.
I have got no idea where to look or what to try since I cant seem to get an actionable error to work against. I have also reduced by test code to the point where its just a new project with a one line change to make it easier to find the problem.
I should note the code in the repo builds fine in linux/OSX and loads into chrome correctly so I know at some level my code does work.
Two possible paths:
You may have a DLL dependency that isn't available which keeps the plugin from loading; if you run regsvr32 on it in the state where it doesn't work on chrome, does it work?
Your plugin may be loading and then crashing. Start chrome with --plugin-startup-dialog and then when it pops up a dialog warning you that a plugin is about to be loaded attach to that process and see if the process crashes. At this point you can also set breakpoints to try to figure out how far it gets.
Double check your metadata in PluginConfig.cmake as well; sometimes unusual characters in some fields can cause issues like this.