Zeus and MSBUILD Issues

Find Tips and tricks on how to better use the Zeus editor. Feel free to post your own tips but please do not post bug reports, feature requests or questions here.
Site Admin
Posts: 2446
Joined: Fri Aug 13, 2004 5:10 pm

Zeus and MSBUILD Issues

Postby jussij » Thu May 08, 2014 6:37 am

The MSBUILD utility generally works very well but things can sometimes get out of wack :(

For example, lets assume you're running the older Visual Studio 2008 but you also have the latest SDK and/or a later version of Visual Studio is also installed on that same machine.

When any Visual Studio 2008 project is imported into Zeus it will setup the following as the debug make command line (inside the workspace options):

Code: Select all

MsBuild.exe $PDD$PF /t:Build /p:Configuration=Debug /p:OutputPath=./bin/Debug/ /v:m

Now when you go to make this imported project inside of Zeus you might get this error:

Code: Select all

Microsoft (R) Build Engine version 4.0.30319.18408
[Microsoft .NET Framework, version 4.0.30319.18444]
Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB4192: The project file "C:\Projects\MyProject.vcproj" is in the ".vcproj" or ".dsp" file format, which MSBuild cannot build directly. Please convert the project by opening it in the Visual Studio IDE or running the conversion tool, or, for ".vcproj", use MSBuild to build the solution file containing the project instead.

What's gone wrong is Zeus by default will always find the latest version of the MSBUILD but the Visual Studio 2008 project file is only designed to work with the earlier MSBUILD 3.5 version and hence the reason the newer MSBUILD is suggesting an upgrade to the project file.

To fix this just locate the correct (older) MSBUILD using these commands:

Code: Select all

cd c:\
dir msbuild.exe /s

and somewhere in the resulting output you'll see this:

Code: Select all

 Directory of C:\Windows\Microsoft.NET\Framework\v3.5

11/06/2009  07:14 AM            87,888 MSBuild.exe

So we nee to change the earlier command line to be this instead:

Code: Select all

C:\Windows\Microsoft.NET\Framework\v3.5\MsBuild.exe $PDD$PF /t:Build /p:Configuration=Debug /p:OutputPath=./bin/Debug/ /v:m

But this gets us only one step closer as after that change you may (or may not) see this error:

Code: Select all

vcbuild.exe : error VCBLD0004: Project "C:\Projects\MyProject.vcproj" does not contain a configuration called 'Debug|BPC'.

This error relates to the fact that you are running on a x64 machine but the project is defined as a Win32 build, which can be seen by opening the VS project file and finding this section:

Code: Select all


Making this change to the command line (by fully qualifying the platform) should fix this final issue:

Code: Select all

C:\Windows\Microsoft.NET\Framework\v3.5\MsBuild.exe $PDD$PF /t:Build /p:Configuration=Debug,Platform=Win32 /p:OutputPath=./bin/Debug/ /v:m

Cheers Jussi

Return to “Tutorials, Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 3 guests