-
Notifications
You must be signed in to change notification settings - Fork 252
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
No dotnet restore --configuration option #7050
Comments
As indicated in #5895 (comment),
To work with other conditions you will need to handle them yourself by passing the extra property values to restore, and ensuring that restore is done appropriately before each build. |
@nkolev92 this is not about where to put conditions in, this is about the ability to pass a configuration or any other variable to the |
dotnet build implicitly invokes restore. Restore does not evaluate based on the Configuration pivot. So You can verify that by consecutively running all these commands and seeing that the timestamps of the assets file do not change. |
I've found a workaround with:
It really does evaluate the condition and references the right package. In Debug I reference a nuget package while in Release I point to a localy compiled dll. |
Additionaly, for people running Docker, it is very important that the |
Thank you @turowicz . By the way, it works also this way : |
From @bcuff on June 21, 2018 22:52
Steps to reproduce
Create a csproj file with conditional package references
Example:
Expected behavior
dotnet restore should respect the --configuration parameter.
Actual behavior
dotnet restore doesn't have a --configuration option
Environment data
dotnet --info
output:Copied from original issue: dotnet/cli#9537
The text was updated successfully, but these errors were encountered: