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

.net framework 6.0 ? #124

Open
championchunk opened this issue Mar 19, 2024 · 11 comments
Open

.net framework 6.0 ? #124

championchunk opened this issue Mar 19, 2024 · 11 comments
Labels
question Further information is requested

Comments

@championchunk
Copy link

Hey there, unfortunately i can't run the script anymore from Azure CLI:

You must install or update .NET to run this application.

App: /home/tom/.dotnet/tools/azure-cost
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '6.0.0' (x64)
.NET location: /usr/share/dotnet

The following frameworks were found:
7.0.16 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
8.0.2 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Learn more:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=6.0.0&arch=x64&rid=linux-x64&os=mariner.2.0

How can i fix this ?

Copy link

welcome bot commented Mar 19, 2024

Thanks for opening your first issue! Reports like these help improve the project!

@mivano
Copy link
Owner

mivano commented Mar 19, 2024

I dropped the .NET 7 support (4114a6a) as it is not a long-term supported version and will be end of support soon.

But still; you do have .net 8 installed, so that is what it should use. Can you reinstall version 8?

@mivano mivano added the question Further information is requested label Mar 19, 2024
@mivano
Copy link
Owner

mivano commented Apr 1, 2024

@championchunk any luck? Were you able to solve this issue?

@championchunk
Copy link
Author

@mivano unfortunately not.. according to the message the command is searching for .Net 6 but i only have .Net 7 and .Net 8 installed.

@mivano
Copy link
Owner

mivano commented Apr 2, 2024

Do you have the latest version? Did you try an upgrade?

dotnet tool update --global azure-cost-cli 

@championchunk
Copy link
Author

yes i updated to version 0.39.0 but the message remains the same:

You can invoke the tool using the following command: azure-cost
Tool 'azure-cost-cli' (version '0.39.0') was successfully installed.
PS /home/username> azure-cost detectAnomalies -s 2b9fea8e-4bbe-48fc-a9c0-a159dbd4d14c --dimension ResourceGroupName --significant-change 0.1 --recent-activity-days 5 --threshold-cost 10
You must install or update .NET to run this application.

App: /home/username/.dotnet/tools/azure-cost
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '6.0.0' (x64)
.NET location: /usr/share/dotnet

The following frameworks were found:
7.0.16 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
8.0.2 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Learn more:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=6.0.0&arch=x64&rid=linux-x64&os=mariner.2.0

@brave187
Copy link

brave187 commented Apr 5, 2024

@mivano Having the sam issue. Any update?

@mivano
Copy link
Owner

mivano commented Apr 9, 2024

Sorry not yet. I cant reproduce it, so will need some more time.

@DanielSpindler83
Copy link
Contributor

weird one.
I tested installing on Ubuntu 22.04 via global and local with only dotnet 8 SDK installed (8.0.5) and works fine.
I assume you are installing using global flag?
Have you tried uninstall command and then install again? Making sure the executable file is removed when uninstalled.
(executable would be /home/tom/.dotnet/tools/azure-cost)
I would also try uninstalling dotnet 7 and ensuring you only have latest dotnet 8 SDK installed.

Checking the build of azure-cost-cli it builds for dotnet 6 and dotnet 8 - not sure how the tool decides which one to pull or if both are packaged in same executable.

Another option is to install dotnet 6 SDK?

@MvRoo
Copy link
Contributor

MvRoo commented May 28, 2024

I got this to work as a workaround using this env var: export DOTNET_ROLL_FORWARD=Major.

This was in the azure cloud shell which has both 7.0 and 8.0 installed:
The following frameworks were found:
7.0.17 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
8.0.3 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]

@mivano
Copy link
Owner

mivano commented May 28, 2024

Thanks for checking. The Nuget page shows that 6 and 8 are included.

That tip for uninstalling and reinstalling might be something. The Nuget package contains both, so maybe during installation, it places one in a dedicated folder on the path?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants