NuGet/Home

NuGet.exe restore: allow specifying Solution Configuration to use for .sln, for example -Properties similar to pack.

Open

#7 575 ouverte le 1 déc. 2018

Voir sur GitHub
 (11 commentaires) (7 réactions) (0 assignés)HTML (292 forks)batch import
Priority:2Product:NuGet.exeStyle:PackageReferenceStyle:Packages.ConfigType:Featurehelp wanted

Métriques du dépôt

Stars
 (1 459 stars)
Métriques de merge PR
 (Merge moyen 464j 23h) (1 PR mergée en 30 j)

Description

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.

Guide contributeur