NuGet.exe restore: allow specifying Solution Configuration to use for .sln, for example -Properties similar to pack.
#7.575 geöffnet am 1. Dez. 2018
Repository-Metriken
- Stars
- (1.459 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 464T 23h) (1 gemergte PR in 30 T)
Beschreibung
Details about Problem
NuGet product used: NuGet.exe
NuGet version (x.x.x.xxx): 4.9.1.5694
dotnet.exe --version (if appropriate): 2.2.0-preview1-007622
VS version (if appropriate): 15.9.2
OS version (i.e. win10 v1607 (14393.321)): Win10
Worked before? If so, with which NuGet version: not a regression
Detailed repro steps so we can see the same problem
Have an .sln file with two configurations: Debug and Release. Have a project that only fails to build in Debug.
You should be able to restore nuget packages by specifying:
nuget restore My.sln /Configuration Release
Currently restore fails because nuget chooses the default (Debug) configuration which doesn't build.
Unfortunately the workaround of using msbuild /r /p:Configuration=Release or dotnet restore doesn't work because many solutions still include projects that have no understanding of NuGet, and so the Restore target isn't there.