Cryptic TFS Build Error - Bug? - build

Can anyone make any sense of this TFS build error? Googling produces few results and my research hasn't given me a solution.
Method not found: 'Void
Microsoft.TeamFoundation.TestManagement.Client.ModuleCoverage.set_Statistics(Microsoft.TeamFoundation.TestManagement.Client.CoverageStatistics)'.
For a previous build, where I was getting this same error, I changed Analyze Test Impact to False, and then the build worked. That's not working here though.
What does this even mean? Is it a bug? Does anyone know how to fix it?
My attempt at fixing the issue:

I did not get this exact error, but I got a similar error where built in methods were failing because of the wrong signature and missing methods, because someone installed Visual Studio 2012 on one of my servers. My guess is the new TFS Dlls that came with 2012 were GAC'd and took precedence over the 2010 dlls. I would verify this hasn't happened to you as well.

It appears that the error shown in the original question wasn't really the problem. We have now fixed this in two different solutions, two different ways.
In the first solution, the build succeeded by fixing the CA errors.
In the second solution, the build succeeded by fixing syntax in a post-build event.
I think the entire problem is that an error was showing that wasn't really the problem. I'm not sure why that method not found error would be the symptom, but it wasn't the cause.
Actually, that method not found error still shows in the build log, but the build succeeds, so sometimes you just have to move on...

I was getting this error in the webview but not in the build log file and the build was not failing. Applying the TFS 2010 SP1 patch fixed it for me.

Related

VS2017 Error: The operation could not be completed

I'm attempting to merge some code from a 3rd party. I thought I merged the source file ok as well as the .vcxproj files. To test out, I tried to do a compile of a single source file. It did a compile and failed with a message (don't remember what atm) and I addressed the error and tried to build that source file again. What I got was
1>Error: The operation could not be completed
Yes, not very helpful error message and I'm at a loss. I tried to delete the object files and tried again, I still get the same message. It doesn't seem even building anything. What can I do to get VS2017 to give me more helpful diagnostics? What could be causing this issue?
I got this error when moving a website from .net 2 to .net 4.6.1 which was hosted on local IIS7.5. It also showed as Visual Studio throwing all manner of errors upon loading the solution (pointing me at the not very helpful activity log)
All of my assemblies had been recompiled to .Net 4.6.1 and I'd changed the app pool to run .net 4 and integrated, however, VS seemed to think the web site should be loaded or compiled as plain .Net 4.0. This meant that it couldn't load the .Net 4.6.1 assemblies but didn't register this error just said it couldn't complete the operation.
I amended the web.config to add targetFramework="4.6.1" into the compilation element and it fixed it.
I just had this same error which drove me mad for hours. It turned out to be due to some sort of mix-up in the compilation configurations in the solution file, which made reference to configurations that did not exist (because the solution had been copied from another with more projects in it). What appeared to fix it was just going into the configuration manager dialog and then saving.

How to make 'C4700: uninitialized local variable' be an error in Release mode

Well, that is my problem. I don't know how to achieve this in Release mode, as the compiler is not even issuing a warning (I do know how to force an error out of a warning--with the /we option). I have tried tweeking several options, including raising the warning level to ALL; I have google all I can and tried Microsoft's documentation on this warning, with no good outcome, and I have run out of ideas.
I am using Visual Studio 2012.
Any help appreciated.
I found the problem. The issue was that this portion of the code was in one of several projects comprising my solution (this particular one generating a static lib), and in Release mode the 'Whole Program Optimization' is marked to 'Use Link Time Code Generation' by default (/GL). The error does manifest itself, but only at link time!! As I was just compiling the source, I didn't see it before.
I see this as shortcoming, but I guess the compiler will not know beforehand if that part of the code will be stripped. Still, could the compiler do a better job at detecting this earlier? My solution takes several minutes to compile, I only saw the error after that. The clue was that when I turned the Whole Program Optimization off, I saw the error right away.
Thanks for everyone's help.

VS2015: Error List doesn't get cleared on new build

There are more than one C++ projects in a solution. Lets compile A, which will fail, and will have errors reported in Error List view. Now compile B (assume A is dependent on B), which will succeed. But, the errors rendered by compiling A doesn't go away.
Anyone encountered such issue? How to enable clearing the error-list view on each build (the way it is working for years). The Output window, however is clean on each new build.
Do you have 'Build Only' or 'Build + Intellisense' selected in the combo box? Many of my errors like this actually come from Intellisense (and tend to be bogus).
I currently have a similar problem with VS2015. I have a solution with c++ and c# wpf projects. Clean checkout, full build, no errors in Output but hundreds of errors appear in Error List. It reminds me of problems with earlier versions of VS back than the only fix was to close all open files but this time this is not helping either. In my case deleting the .suo file helped. See this for reference VS freaks out.
(edit) I read that Xamarin could cause the problem but uninstalling it and also uninstalling all the other addons delivered with VS2015 did not fix the problem. After a clean checkout and full build I got all the errors again.
On Visual Studio 2019, simply closing and restarting the application got rid of the warnings.

What does "Unexpected precompiled header error" mean?

I was trying to build a simple solution involving a Windows and a Console application. After using the wizard to generate the code skeleton for the projects, I didn't add any code and just built the generated code. In both cases I got the same error:
1>c:\c\winpr\winpr\winpr.cpp(4) : fatal error C1859: 'Debug\winpr.pch' unexpected precompiled header error, simply rerunning the compiler might fix this problem
What is wrong, any thoughts?
There is a fix for Visual C++ 2008 SP1 compiler error C1859. You may download it here.
For details see this.
We had something similar at work all of a sudden, one day. Our problem was down to this
A simple PC restart done it for me anyway.
The link provided in the answer above is no longer available.
I was getting the same error and in my case the problem was due to a 'Windows Update' that required a restart (which I avoided the restart and kept getting this problem). But after the reboot the error was fixed.
Installing visual C++ 2008 SP1 fixed my issue.
Install this patch (KB976656 - Error message when you use the Visual C++ 2008 compiler: "fatal error C1859") to fix this issue:
http://thehotfixshare.net/board/index.php?autocom=downloads&showfile=11640
If you have #include<stdfafx.h>, try commenting it out like so //#include<stdfafx.h> as it may be the culprit behind your errors.

visual studio 2008 - Build issues

I am trying to rebuild a project from the clearcase vob and i get the following error code :
error PRJ0019 .
Any help is very much appreciated ..
thankyou
Try taking a look at the MSDN page for this error
http://msdn.microsoft.com/en-us/library/yzk29wdw(VS.80).aspx
The most likely candidate for causing this problem is a custom build step or script which returns an error code. You'll need to look at the build output log and see which is the last tool that ran as it's the most likely source of the problem.