prebuild not working with Windows7

Jun 23, 2009 at 12:57 AM

Hi, I'm trying to switch my OS from XP to Win7 RC. Every thing works great with Windows7, except Xen, I can't compile it. When I do the prebuild, I get an error that MSbuild cannot be found. It sais that the SDKInstallRootv2.0 registry key does not exists, witch is true so I created it, and I set it to C:\WINDOWS\Microsoft.NET\Framework\v3.5, and I still get the same error. I had the same problem on XP, but when I created the registry key (with the same value), the problem was fixed. I tryed to use C:\Windows\Microsoft.NET\Framework\v2.0.50727 or C:\Windows\Microsoft.NET\Framework\v3.0 or C:\WINDOWS\Microsoft.NET\Framework\,... nothing works.

If I look at the prebuild.bat, MSBuild is located in %SYSTEMROOT%\Microsoft.NET\Framework\v3.5\MSBuild.exe, witch is true.

I created an empty XNA windows game and it compile and execute just fine.

I have the .Net SDK installed.

Is this a Win7 problem, a Vista/Win7 problem, VC# express 2008, .Net 3.5.1, or it's my computer that is stupid? I'm using Xen 1.6.3. Does anyone else have this problem?

Here's the output from the prebuild, Icopied it untill the first error.

Prebuilding xen for XNA GS 3.0 (This may take a minute or so...)

Building xen Shader System

Microsoft (R) Build Engine Version 3.5.30729.4918
[Microsoft .NET Framework, Version 2.0.50727.4918]
Copyright (C) Microsoft Corporation 2007. All rights reserved.

CopyFilesToOutputDirectory:
Xen.Graphics.ShaderSystem -> C:\XEN\xen\bin\x86\Xen.Graphics.ShaderSystem.dll
CopyFilesToOutputDirectory:
Xen.Graphics.ShaderSystem.x360 -> C:\XEN\xen\bin\Xbox 360\Xen.Graphics.ShaderSystem.dll
CopyFilesToOutputDirectory:
XenFxRegistrySetup -> C:\XEN\xen\bin\Xen.Graphics.ShaderSystem.CustomTool\registry\XenFxRegistryS
etup.exe
CopyFilesToOutputDirectory:
XenFxRegistryTest -> C:\XEN\xen\bin\Xen.Graphics.ShaderSystem.CustomTool\registry\XenFxRegistryTe
st.exe
CopyFilesToOutputDirectory:
Xen.Graphics.ShaderSystem.CustomTool -> C:\XEN\xen\bin\Xen.Graphics.ShaderSystem.CustomTool\Xen.G
raphics.ShaderSystem.CustomTool.dll
CopyFilesToOutputDirectory:
CmdXenFX -> C:\XEN\xen\bin\Xen.Graphics.ShaderSystem.CustomTool\CmdXenFX.exe
CopyFilesToOutputDirectory:
XenShaderUpdate -> C:\XEN\xen\bin\Xen.Graphics.ShaderSystem.CustomTool\XenShaderUpdate.exe

Register Visual Studio Custom Tool
Skipping registration (File is already registered)...
Building Xen.Ex Shaders
Building Xen.Ex Filters FX
Building Xen.Ex Graphics2D FX
Building Xen.Ex Shaders FX
Building Xen.Ex Material FX
Building Xen.Ex Material FX (Blending)
Building Xen.Ex Material FX (Instancing)
Building Xen.Ex Gpu Particle Core FX
Building Xen.Ex Gpu Particle 2D Display FX
Building Xen.Ex Gpu Particle 3D Display FX
Building Tutorials.Tutorial_03 FX
Building Tutorials.Tutorial_09 FX
Building Tutorials.Tutorial_16 FX
Building Tutorials.Tutorial_25 FX
Building Xen and Xen.Ex DEBUG
Microsoft (R) Build Engine Version 3.5.30729.4918
[Microsoft .NET Framework, Version 2.0.50727.4918]
Copyright (C) Microsoft Corporation 2007. All rights reserved.

Build started 22/06/2009 7:19:31 PM.
Project "C:\XEN\xen\prebuild\sln\prebuild.sln" on node 0 (Rebuild target(s)).
Building solution configuration "Debug|Mixed Platforms".
Project "C:\XEN\xen\prebuild\sln\prebuild.sln" (1) is building "C:\XEN\xen\src\Xen\Xen.csproj" (2)
on node 0 (Rebuild target(s)).
Project "C:\XEN\xen\src\Xen\Xen.csproj" (2) is building "C:\XEN\xen\src\Xen\Content\Content.content
proj" (3) on node 0 (Clean target(s)).
Deleting file "C:\XEN\xen\src\Xen\Content\obj\x86\Debug\ResolveAssemblyReference.cache".
Done Building Project "C:\XEN\xen\src\Xen\Content\Content.contentproj" (Clean target(s)).

CoreClean:
Deleting file "C:\XEN\xen\bin\x86\Debug\Xen.xml".
Deleting file "C:\XEN\xen\bin\x86\Debug\Xen.dll".
Deleting file "C:\XEN\xen\bin\x86\Debug\Xen.pdb".
Deleting file "C:\XEN\xen\src\Xen\obj\x86\Debug\ResolveAssemblyReference.cache".
Deleting file "C:\XEN\xen\src\Xen\obj\x86\Debug\Microsoft.Xna.Framework.RuntimeProfile.txt".
Deleting file "C:\XEN\xen\src\Xen\obj\x86\Debug\Xen.dll".
Deleting file "C:\XEN\xen\src\Xen\obj\x86\Debug\Xen.pdb".
EntityClean:
Successfully cleaned the output for 0 EDMX files.
EntityDeploy:
Processing 0 EDMX files.
Finished processing 0 EDMX files.
Project "C:\XEN\xen\src\Xen\Xen.csproj" (2) is building "C:\XEN\xen\src\Xen\Content\Content.content
proj" (3:2) on node 0 (default targets).
Could not locate the .NET Framework SDK. The task is looking for the path to the .NET Framework
SDK at the location specified in the SDKInstallRootv2.0 value of the registry key HKEY_LOCAL_MACH
INE\SOFTWARE\Microsoft\.NETFramework. You may be able to solve the problem by doing one of the f
ollowing: 1.) Install the .NET Framework SDK. 2.) Manually set the above registry key to the co
rrect location.
Done Building Project "C:\XEN\xen\src\Xen\Content\Content.contentproj" (default targets).

CopyFilesToOutputDirectory:
Copying file from "obj\x86\Debug\Xen.dll" to "..\..\bin\x86\Debug\Xen.dll".
Xen -> C:\XEN\xen\bin\x86\Debug\Xen.dll
Copying file from "obj\x86\Debug\Xen.pdb" to "..\..\bin\x86\Debug\Xen.pdb".
Done Building Project "C:\XEN\xen\src\Xen\Xen.csproj" (Rebuild target(s)).

Coordinator
Jun 23, 2009 at 2:26 AM
Edited Jun 23, 2009 at 2:27 AM

I've never seen this problem before, however reading here, it suggests it's a problem with a sub registry key not being set to the .net SDK directory, as well as the .net framework directory key.. Perhaps that may help?
I've also read that this error can occur with the XNA framework in other situations (what they are, I'm not sure) however it indicates it doesn't actually break the build... 
Otherwise I wouldn't know, sorry.

Jun 23, 2009 at 5:17 AM

Thanks, I've fixed it.

I've set the registry key to C:\Program Files\Microsoft SDKs\Windows\v6.0A (like in your link) and I added ToolsVersion="3.5" to all .csproj and .contentproj that had it missing from the <Project> node.

See http://forums.xna.com/forums/p/32923/188780.aspx#188780

No more build errors!

Good bye Windows XP!