Friday, April 23, 2010

[TFS 2010] (1835): Task failed because "resgen.exe" was not found

I recently upgraded my build server from TFS 2010 RC (which worked fairly well I have to say) - although its worth pointing out here that VS 2010 RTM doesn't work with TFS 2010 RC. You get all kinds of build errors.

I recently checked some code in and the build server gives me the following error:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1835): Task failed because "resgen.exe" was not found, or the correct Microsoft Windows SDK is not installed. The task is looking for "resgen.exe" in the "bin" subdirectory beneath the location specified in the InstallationFolder value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A. You may be able to solve the problem by doing one of the following: 1) Install the Microsoft Windows SDK. 2) Install Visual Studio 2010. 3) Manually set the above registry key to the correct location. 4) Pass the correct location into the "ToolPath" parameter of the task.

So I have given in and installed Visual Studio on the build server and this seems to fix the problem! - I know this just doesn't sound right.... I could of tried and installed the Windows SDK on the build server but I do want to build Windows phone 7 Series apps on my build server and I know that bits in WP7 are not in the Windows SDK.

3 comments:

Frank said...

I've got this exact problem on our build machine for VS2010... and I'm loath to install the whole VS application on it!

Simon Hart said...

Frank,

I know, we shouldn't have to install VS on the build server. But in the case of this error installing the Windows SDK should fix the issue. But if you want to do other stuff such as Windows Phone 7 dev or unit testing using MSTest then you'll need VS.

Simon

Simon Hart said...

Correction: to date Windows phone 7 tools are not supported on server OS.

This post might help in this scenario: http://www.simonrhart.com/2010/07/building-your-windows-phone-7-series.html

Simon