I am trying to run a project I created on .NET 5 (on another machine) on my MacOS machine running Monterey 12.1 and I got this error:
It was not possible to find any compatible framework version
The framework 'Microsoft.AspNetCore.App', version '5.0.0' (arm64) was not found.
- The following frameworks were found:
3.1.20 at [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
6.0.1 at [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
I thought it was strange since I remembered having installed it previously, but proceeded and installed (SDK 5.0.404) it again. And got the same error.
Then went and run dotnet --list-runtimes and got the following output:
Microsoft.AspNetCore.App 3.1.20 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.20 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
I am totally lost. It seems even though I am installing the whole SDK package and later on tried also just with the runtime installation, my machine refuses to see it as installed.
The issue seems to be that the only version available of .NET5 for Mac is x64, and there is no ARM64 version for that version. ARM64 for Mac is only fully supported since .NET6
Related
I was working on a .netcore project on a Mac Mini with M2 CPU.
I saved the .cs file, and the .net rebuild started (It was running with dotnet watch run).
Instead of success, I received this:
dotnet watch 🚀 Started You must install .NET to run this application.
App: /Users/xxxx/xxxx/bin/Debug/net6.0/api
Architecture: arm64 App host version: 6.0.13 .NET location: Not found
I have two SDKs installed. The output of dotnet --info
.NET SDK: Version: 7.0.102 Commit: 4bbdd14480
Runtime Environment: OS Name: Mac OS X OS Version: 13.2 OS
Platform: Darwin RID: osx.13-arm64 Base Path:
/usr/local/share/dotnet/SDK/7.0.102/
Host: Version: 7.0.2 Architecture: arm64 Commit:
d037e070eb
.NET SDKs installed:
6.0.405 [/usr/local/share/dotnet/sdk]
7.0.102 [/usr/local/share/dotnet/sdk]
.NET runtimes installed: Microsoft.AspNetCore.App 6.0.13
[/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.2
[/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.13
[/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.2
[/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
The funny!! thing it happened suddenly, everything was working fine one moment, and the next, now it says .net is not installed at all.
Does anyone have a problem like this?
I am trying to use the Oracle Explorer extension in vscode. When I first installed it, vscode popped up this dialog asking me to install .Net Core Runtime. I followed the link and installed the SDK and runtime (Ubuntu). It seems to have installed correctly. When I type
dotnet --info
I get this output, which looks okay to me:
.NET SDK (reflecting any global.json):
Version: 6.0.101
Commit: ef49f6213a
Runtime Environment:
OS Name: linuxmint
OS Version: 20.3
OS Platform: Linux
RID: linux-x64
Base Path: /usr/share/dotnet/sdk/6.0.101/
Host (useful for support):
Version: 6.0.1
Commit: 3a25a7f1cc
.NET SDKs installed:
6.0.101 [/usr/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.1 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
However, when I re-open vscode I still get the dialog telling me that the Oracle Explorer extension requires the .NET Core Runtime.
I thought it might be a problem with the $PATH variable. This is the output of $PATH:
bash: /home/jh/bin:/home/jh/packages/anaconda3/bin:/home/jh/packages/anaconda3/condabin:/home/jh/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/jh/.dotnet/tools: No such file or directory
/home/jh/.dotnet/tools does not exist. I tried adding the directories from the "dotnet --info" output to PATH but that didn't work either. I'm in uncharted territory here so that's about as far as I got.
Any help is appreciated.
The extension doesn't currently support the .NET Core Runtime 6.0 (found in an answer here).
I installed the 5.0 Runtime and everything worked fine.
hopefully somebody can help me to solve this issue.
I am working on a macOS Monterey 12.0.1 and I installed visual studio code 2. Everything works fine so far, but when I open a bicep file. I Get this error.
Downloading the .NET Runtime.
Downloading .NET version(s) 5.0.11 ....... Error!
Failed to download .NET 5.0.11:
Command failed: "/Users/user/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-1.3.0/dist/install scripts/dotnet-install.sh" -InstallDir "/Users/user/Library/Application Support/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/5.0.11" -Version 5.0.11 -Runtime dotnet
dotnet_install: Error: Could not find `.NET Core Runtime` with version = 5.0.11
dotnet_install: Error: Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support
Error!
.NET Acquisition Failed: Installation failed: Error: Command failed: "/Users/user/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-1.3.0/dist/install scripts/dotnet-install.sh" -InstallDir "/Users/user/Library/Application Support/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/5.0.11" -Version 5.0.11 -Runtime dotnet
dotnet_install: Error: Could not find `.NET Core Runtime` with version = 5.0.11
dotnet_install: Error: Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support
I am sure that .NET is installed as you can see if I run botnet --info
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.11 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.11 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.11 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.11 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
but as I can understand, the path is totally different and I don't know if that is the main issue. I have another Mac Laptop and I am able to use bicep in VsCode without any issue.
Did this happened to anyone and might help me to solve this issue as I couldn't find any valid solution.
I'm completely new to dotnet and vscode so I might be missing something trivial. I just want to get F# running in VSCode on my Mac. I first tried installing dotnet from brew:
brew cask install dotnet-sdk
This seems to be working fine from the command line since I could do both dotnet new and dotnet build:
dotnet new console -lang F# -o myproj
Now I installed Visual Studio Code, also from brew:
brew cask install visual-studio-code
I then installed the Ionide-fsharp plugin, opened the myproj folder from vscode and restarted it. I'm then greeted with:
I then searched for FSharp.dotnetRoot in the settings and tried to configure this:
But it didn't help (I also tried setting the folder to /usr/local/share/dotnet and /usr/local/share/dotnet/sdk/3.1.100 but nothing worked).
So I completely uninstalled everything (including wiping my ~/.vscode folder) from brew and re-installed everything from the official Microsoft documentation. In the docs it says that the F# support should be built-in to vscode on macosx, but it still recommended me to install Ionide-fsharp when I opened the folder again, so I obeyed. But I just ran into exactly the same problem again.
So my question is: How can I install vscode with working F# support on MacOSX?
Here's my output from vscode "about":
Version: 1.41.0
Commit: 9579eda04fdb3a9bba2750f15193e5fafe16b959
Date: 2019-12-11T17:58:38.338Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Darwin x64 19.2.0
and this is from dotnet --info:
.NET Core SDK (reflecting any global.json):
Version: 3.1.100
Commit: cd82f021f4
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.15
OS Platform: Darwin
RID: osx.10.15-x64
Base Path: /usr/local/share/dotnet/sdk/3.1.100/
Host (useful for support):
Version: 3.1.0
Commit: 65f04fb6db
.NET Core SDKs installed:
3.1.100 [/usr/local/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.1.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
How do I target .Net Core 2.1 on a Mac?
When I change the .csproj content to target netstandard2.1 I get the following error
"/usr/local/share/dotnet/sdk/2.1.300/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(150,5):
error : The current .NET SDKdoes not support targeting .NET Standard
2.1. Either target .NET Standard 2.0 or lower, or use a version of the .NET SDK that supports .NET Standard 2.1.
[/Users/user/Documents/Projects/vsCode/DotNet/AlexaDemo/data/data.csproj]"
Dotnet --info returns
dotnet --info .NET Core SDK (reflecting any global.json): Version:
2.1.300 Commit: adab45bf0c
Runtime Environment: OS Name: Mac OS X OS Version: 10.13 OS
Platform: Darwin RID: osx.10.13-x64 Base Path:
/usr/local/share/dotnet/sdk/2.1.300/
Host (useful for support): Version: 2.1.0 Commit: caa7b7e2ba
.NET Core SDKs installed:
2.0.0 [/usr/local/share/dotnet/sdk]
2.1.4 [/usr/local/share/dotnet/sdk]
2.1.300 [/usr/local/share/dotnet/sdk]
.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.0
[/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.0
[/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.0.0
[/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.5
[/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.0
[/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
I am using vsCode on Mac if that makes any difference.
Thanks
The answer is there is no dotnetstandard2.1 as of yet.
classlib projects should target NET Standard 2.0 and console, mvc and api projects should target netcoreapp2.1.
I believe targeting a specific release of dotnet Core is not available on VS or VSCode for mac. However, using Rider #jetbrains, I was able to choose the framework version when creating a new solution.
Best