Recently in Visual Studio 2010 Category

Our build server is running Visual Studio 2010, and CruiseControl.Net. One evening, after what we expect was a Windows Update, our build started to fail with the following error;

 TRACKER (,): errorTRK0002: Failed to execute command: ""C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\ResGen.exe" /useSourcePath /r:<loads of project paths> /compile Properties\Resources.resx,obj\Debug\Project.Properties.Resources.resources". The handle is invalid.

When executing ResGen locally in the correct project path, it turned out that the resource file specified did not exist. Question was still, why was it doing this.

One of the guys on the team suggested to delete the Resources.resx file from the projects that were not using them. So trying that, things started to compile like before.

So, it seems like including a Resources.resx in a project, causes MSBuild (2010 version) to try generating resources for the project, but if the Resources.resx is empty (project contains no resources) the required file for ResGen.exe to work is not created, and a following build step fails.

After updating our Cruise Control Server with Visual Studio 2010, and converting our 2008 project to 2010, we got the following error during build; 

     
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets (1835,9):
   
   errorMSB6006: "ResGen.exe" exited with code -1073741701.

This post explains in more details what the problem is and gives some solutions.

Setting the parameter in the build script (option 1) did not work for me, so ended up setting the 32-bit flag. Things started to work now. We are running 64-bit Vista.

About this Archive

This page is an archive of recent entries in the Visual Studio 2010 category.

TANDBERG TMS is the previous category.

Find recent content on the main index or look in the archives to find all content.

Pages

Powered by Movable Type 4.21-en