task or msbuild.exe with NAnt?

The NAntContrib assumes .NET Framework V2.0. If you want to use .NET 3.5, you’ll need to call MsBuild.exe directly. As you upgrade to new versions of .NET, you need only modify the MSBuildPath property. Here’s an example: <property name=”MSBuildPath” value=”C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe”/> <target name=”build”> <exec program=”${MSBuildPath}”> <arg line=””${SolutionFile}”” /> <arg line=”/property:Configuration=${SolutionConfiguration}” /> <arg value=”/target:Rebuild” /> <arg value=”/verbosity:normal” … Read more

How do I specify the platform for MSBuild?

In MSBuild or Teamcity use command line MSBuild yourproject.sln /property:Configuration=Release /property:Platform=x64 or use shorter form: MSBuild yourproject.sln /p:Configuration=Release /p:Platform=x64 However you need to set up platform in your project anyway, see the answer by Julien Hoarau.

MSBuild target package not found

I just got this working without installing VS2010 by following these steps on the build server: If .NET Framework 4 isn’t installed, install it Install the Web Deployment tool from http://www.iis.net/download/webdeploy From the C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0 folder on your dev machine copy the “Web” and “Web Applications” folders to the equivalent directory on your build server. … Read more

Why does MSBuild look in C:\ for Microsoft.Cpp.Default.props instead of c:\Program Files (x86)\MSBuild? ( error MSB4019)

I got this problem when publishing a cocos2d-x application using their command line tool, which calls MSBuild. I’m using Win 7 64-bit, VS2013 express, cocos2d-x version 3.3, .NET Framework 4.5 installed. I fixed the problem by setting the following before running the cocos.py publish command: SET VCTargetsPath=C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120

How to set PreProcessorDefinitions as a task propery for the msbuild task

This can be done without modifying the original project: the first thing done in Microsoft.Cpp.Targets, which is normally one of the last things imported in a normal C++ project, is to check if there’s a property called ForceImportBeforeCppTargets and if so, import it. So suppose you want to add ADDITIONAL to the preprocessor definitions you … Read more

How can I install the VS2017 version of msbuild on a build server without installing the IDE?

The Visual Studio Build tools are a different download than the IDE. They appear to be a pretty small subset, and they’re called Build Tools for Visual Studio 2019 (download). You can use the GUI to do the installation, or you can script the installation of msbuild: vs_buildtools.exe –add Microsoft.VisualStudio.Workload.MSBuildTools –quiet Microsoft.VisualStudio.Workload.MSBuildTools is a “wrapper” … Read more

Microsoft.WebApplication.targets was not found, on the build server. What’s your solution?

To answer the title of the question (but not the question about the output you’re getting): Copying the following folder from your dev machine to your build server fixes this if it’s just web applications C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications Remove x86 according to how your build breaks. If you have other project types you will probably … Read more