Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How Can I Tell NuGet What MSBuild Executable to Use?

Tags:

nuget

msbuild

NuGet apparently has some logic to determine what MSBuild Executable to use. Is there a way to override this behavior? Or at least a way to tell it to use the x86 MSBuild instead of x64?

MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin\amd64'.

like image 233
aolszowka Avatar asked Dec 24 '22 08:12

aolszowka


1 Answers

From the command-line documentation, you can specify -MSBuildPath or -MSBuildVersion on the command line.

MSBuildPath (4.0+) Specifies the path of MSBuild to use with the command, taking precedence over -MSBuildVersion.

MSBuildVersion (3.2+) Specifies the version of MSBuild to be used with this command. Supported values are 4, 12, 14, 15. By default the MSBuild in your path is picked, otherwise it defaults to the highest installed version of MSBuild.

like image 97
Rainer Sigwald Avatar answered Jan 01 '23 16:01

Rainer Sigwald