-
Notifications
You must be signed in to change notification settings - Fork 552
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
fixed dotnet command in makefile #3039
Conversation
@@ -154,7 +154,7 @@ nuget-install: | |||
.PHONY: template-install | |||
template-install: | |||
@printf "Installing ${GREEN}C# Template packages${DEFAULT}\n" | |||
@-dotnet new uninstall $(THISDIR)/source/templates/csharp/ | |||
@-dotnet new --uninstall $(THISDIR)/source/templates/csharp/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When running dotnet new --uninstall on my system, I get this: Warning: use of 'dotnet new --uninstall' is deprecated. Use 'dotnet new uninstall' instead
. Is there a way to detect the .NET version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@GreenData17 what version of dotnet are you using? You might have an older dotnet version where using only uninstall
isn't possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am using the dotnet-sdk-6.0 from the AUR. (its the version mentioned in the documentation)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
weird I am also using the same one, you should leave it as is, what error were you getting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some more information for finding the problem:
I use arch and install applications mostly via yay.
To install the dotnet sdk I executed yay -S dotnet-sdk-6.0
.
When executing dotnet --version
I get the version "6.0.131".
Hope this helps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For dotnet6 and older, --uninstall
should be used according to the docs. https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-new#description The change to subcommands was introduced in .net 7.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, so for users like me, who only have the sdk 6.0 installed the command should have --uninstall
.
And the warning probably only appears for users who have newer versions or multiple sdk's installed.
@selkij how is it for you, do you have a newer version installed? and what do you think should happen with this problem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also use the net6.0 sdk
No description provided.