-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
msbuild /t:restore behaves differently for BuildTools MSBuild than VS Enterprise MSBuild #4821
Comments
I can't be certain the above is precisely the same issue that I encountered, but it seems to be similar/related, so I will add my notes: While working on VSTS builds for Visual Studio 2017 (DotNetCore 1.1.1 sdk/tooling) we first installed vs2017 on a build agent. Due to the fact that we needed to authorize private VSTS NuGet package feeds we found that we needed to explicitly run NuGet.exe v4.0 to get our .sln and .csproj code to restore. (Like We then tried to support the same build definition on another agent, this time using the vs2017 build tools installer (rather than the full visual studio install). Once we had the build tools installed, the
The working agent's build step output looks like this:
Again, this could possibly be some other agent configuration nuance, and we have the workaround of just installing the full visual studio on our build agent, but I really would expect this to have been functionally equivalent... |
Update: After finishing a vs2017 install (Community Edition) on the failing agent, the restore started working again. There definitely is a discrepancy between VS install and BuildTools Install. |
Yep, I saw in the file system that the BuildTools does not install the NuGet related targets. There are also a lot of other targets that I found that were missing in BuildTools (deploy related ones). Furthermore, if you have config transforms, you'll also need to install the Windows SDK to get aspnet_merge.exe to properly work. |
We should add NuGet.Tools.vsix to build tools workload -- this will enable msbuild /t:restore, etc... |
Is there a workaround to this? Can a NuGet targets file be placed somewhere in the MSBuild install folder so that msbuild /t: restore works? |
I think there is #3660 already. |
@kraigb my workaround was to copy the entire NuGet directory |
Anyone got an update on this? Is the best workaround still to copy files from a dev machine with VS 2017 installed? Thanks! |
@jamescrowley This is fixed in the latest Visual Studio 15.4 release that went out yesterday, 9 October 2017. |
Dupe of #5562 |
Details about Problem
NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe):
NuGet version (x.x.x.xxx): 4
dotnet.exe --version (if appropriate): N/A
VS version (if appropriate): 2017
OS version (i.e. win10 v1607 (14393.321)): Win 10 1607 14393.693
Worked before? If so, with which NuGet version: 2.8.x
Detailed repro steps so we can see the same problem
Run
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\amd64\MSBuild.exe" /t:restore some.sln
Compare results with
"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\amd64\msbuild.exe" /t:restore some.sln
BuildTools is missing some nuget related things and #1 works while #2 does not. #2 complains of "target 'restore' does not exist" in the projects within solution.
...
The text was updated successfully, but these errors were encountered: