.net framework 6.0 ?
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 ?
Thanks for opening your first issue! Reports like these help improve the project!
I dropped the .NET 7 support (https://github.com/mivano/azure-cost-cli/commit/4114a6a64746f4c215986a79d832c5d585423085) 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?
@championchunk any luck? Were you able to solve this issue?
@mivano unfortunately not.. according to the message the command is searching for .Net 6 but i only have .Net 7 and .Net 8 installed.
Do you have the latest version? Did you try an upgrade?
dotnet tool update --global azure-cost-cli
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
@mivano Having the sam issue. Any update?
Sorry not yet. I cant reproduce it, so will need some more time.
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?
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]
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?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.