Reputation: 8810
We've got a solution that builds in AnyCPU which we build on x64 machines. It contains a couple of projects that reference the Silverlight SDK (which only targets x86). When we build the solution in Visual Studio 2010 everything builds fine.
We're trying to automate builds, and when we fire msbuild on that solution file, both of the projects that rely on the Silverlight SDK fail to build, while the other 50 or so build just fine. If I call devenv.exe to build the soltuion it builds the whole solution fine (as I would expect).
I imagine that I can create a build file of some sort to address this, but I'd rather not have to maintain another build file apart from our existing solution file. Is there any way to tell msbuild to build the "correct" environment for each project without a separate build file?
If not, then I gather that msbuild build files are basically just .proj files. Is there a better reference for how to configure one than the MSBuild reference, or is that really the silest place to start?
Upvotes: 0
Views: 380
Reputation: 641
Without more specifics on the exact error you are seeing I am guessing you are haveing this issue because the 64-bit version of msbuild is running on your build server. Since Visual Studio 2010 is 32-bit you do not see this issue there.
To have team build to use the 32-bit msbuild set the MSBuild Platform setting to X86 on the Process tab under advanced in the build configuration.
Your other projects can still target AnyCPU, even target x64 but thats is not recommended unless you know you need it, and will compile fine.
Helpful picture here.
More info can be found here close to the bottom of this post.
Hope this helps.
Upvotes: 4