-
Notifications
You must be signed in to change notification settings - Fork 1k
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
dotnet build -r runtime --no-restore fails in 2.1.301 #2344
Comments
Looks like a duplicate of #2312 |
@dsplaisted to comment and close. |
Here's the documentation of this behavior: https://docs.microsoft.com/en-us/dotnet/core/deploying/runtime-patch-selection @livarcocc @nguerrera Should we consider setting the |
Also @KathleenDollard for discussion on whether we should change the behavior of the |
Maybe it would help if NuGet actually re-evaluated the project file for each RID, since putting <RuntimeIdentifiers>osx-x64;win-x64</RuntimeIdentifiers> no longer helps to fetch all RID-specific packages in advance (in fact, it will even go ahead and download old versions that |
@dasMulli When we were designing the runtime roll-forward for 2.1.300, we considered having separate restores for each RID. We may do so eventually but it would be a significant amount of work. The design we were thinking of was that there would be a separate assets file per combination of Configuration, TargetFramework, and RuntimeIdentifier. Note that if you want to do self-contained publish for different RIDs, you can set the |
This issue was moved to dotnet/cli#9514 |
Repro Steps
dotnet new console --no-restore
dotnet restore -r win-x64
dotnet build -r win-x64 --no-restore
These steps work as expected in CLI 2.1.300. However, in CLI 2.1.301 the build step fails:
The error message is misleading, since the
RuntimeIdentifier (-r)
is set during both restore and build.A workaround is to remove the
--no-restore
from thedotnet build
command:Is this a bug or by design? Is it expected that
dotnet build -r runtime --no-restore
should always work afterdotnet restore -r runtime
?CC: @JunTaoLuo
The text was updated successfully, but these errors were encountered: