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

fixed dotnet command in makefile #3039

Closed
wants to merge 1 commit into from

Conversation

GreenData17
Copy link

No description provided.

@@ -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/
Copy link
Member

@MishaProductions MishaProductions Jul 10, 2024

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?

Copy link
Contributor

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

Copy link
Author

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)

Copy link
Contributor

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?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those three:

Screenshot from 2024-07-10 00-50-48

After adding the double dashes, all of them disappeared.

Copy link
Author

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.

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.

Copy link
Author

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?

Copy link
Contributor

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

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

Successfully merging this pull request may close these issues.

4 participants