Skip to content
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

What's the equivalent of dotnet publish -r win-x64 in MSBuild #10070

Closed
John0King opened this issue Jan 26, 2019 · 4 comments
Closed

What's the equivalent of dotnet publish -r win-x64 in MSBuild #10070

John0King opened this issue Jan 26, 2019 · 4 comments
Milestone

Comments

@John0King
Copy link

the msbuild version won't restore during publish and cause a error when I separate the dotnet restore and dotnet publish
this is what I try

1. dotnet restore -r win-x64
2. msbuild /p:RuntimeIdentifier=win-x64 /p:configuration=release
then  there is a error
The project was restored using Microsoft.NETCore.App version 2.2.0, but with current settings, version 2.2.1 would be used instead

how do I solve this problem ?

@livarcocc
Copy link
Contributor

Invoke it with 'msbuild /restore /t:Publish /p:RuntimeIdentifier=win-x64 /p:configuration=release'

@livarcocc
Copy link
Contributor

Let me know if that works for you.

@John0King
Copy link
Author

@livarcocc Thanks , It works


I saw you put a "Discussion" lable on this , Is that mean you are consider to make the msbuild /t:publish as same as the dotnet publish ?

@livarcocc
Copy link
Contributor

I saw you put a "Discussion" lable on this , Is that mean you are consider to make the msbuild /t:publish as same as the dotnet publish ?

@John0King not at all. We move all issues that are not clearly a bug to discussion. That means the issue is a question or a feature conversation, etc. We have no plans to add implicit restore to msbuild /t:publish.

@msftgits msftgits transferred this issue from dotnet/cli Jan 31, 2020
@msftgits msftgits added this to the Discussion milestone Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants