You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NuGet during restore doesn't respect the same compat shims as MSBuild when running in VS 15 command prompt #3387
changed the title [-]NuGet during restore doesn't respect the same compat shims as MSBuild when running VS 15[/-][+]NuGet during restore doesn't respect the same compat shims as MSBuild when running in VS 15 command prompt[/+]on Aug 30, 2016
The above sets the fallback search paths used for importing projects from $(MSBuildExtensionsPath). Any app hosting msbuild needs this to support the same search paths.
Sarabeth-Jaffe-Microsoft commented on Aug 30, 2016
This could be because NuGet is picking up the wrong/different version of MSBuild - and not the willow version. @Sarabeth-Jaffe-Microsoft Is there an environment variable to figure out what the "current" msbuild is?
Sarabeth-Jaffe-Microsoft commented on Aug 31, 2016
@davkean There's no environment variable except for VSINSTALLDIR if you're in a VS command prompt. Willow provides a COM API that could be used to locate Willow and thus MSBuild.
Activity
[-]NuGet during restore doesn't respect the same compat shims as MSBuild when running VS 15[/-][+]NuGet during restore doesn't respect the same compat shims as MSBuild when running in VS 15 command prompt[/+]radical commentedon Aug 30, 2016
nuget.exe.configwould need to add the search paths like (taken from https://github.com/Microsoft/msbuild/blob/xplat/src/XMakeCommandLine/app.config )The above sets the fallback search paths used for importing projects from
$(MSBuildExtensionsPath). Any app hostingmsbuildneeds this to support the same search paths.Sarabeth-Jaffe-Microsoft commentedon Aug 30, 2016
@radical The toolset which includes search paths is only loaded from
msbuild.exe.config, so no need to add anything tonuget.exe.config.radical commentedon Aug 30, 2016
Oh, I misunderstood then. I thought the program was hosting msbuild and so not running msbuild.exe .
davkean commentedon Aug 30, 2016
This could be because NuGet is picking up the wrong/different version of MSBuild - and not the willow version. @Sarabeth-Jaffe-Microsoft Is there an environment variable to figure out what the "current" msbuild is?
Sarabeth-Jaffe-Microsoft commentedon Aug 31, 2016
@davkean There's no environment variable except for
VSINSTALLDIRif you're in a VS command prompt. Willow provides a COM API that could be used to locate Willow and thus MSBuild.rrelyea commentedon Sep 1, 2016
We are working to incorporate that COM API now. Assigning this bug to @drewgil, as he is doing that work.
rrelyea commentedon Jan 3, 2017
@nkolev92 - With Drew's work finished to properly find msbuild.exe in VS 2017 installs, this should be fixed now. Can you please confirm?
nkolev92 commentedon Jan 4, 2017
Looks good.
Tested with:
NuGet version: 4.0.0-RC3-2162
OS version: Windows 10 RS1_Release 14393.693