C
C#2y ago
EddieV

❔ Cannot start OmniSharp due to error on MacOS

The error said I haven't install .NET 6 SDK for arm64 even though I tried to install it TWICE. I can still run code and stuff, however the Intellisense or the Code Outline doesn't seem to work because they need OmniSharp. How do I fix this?
OmniSharp server started with .NET 6.0.402
.
Path: /.vscode/extensions/ms-dotnettools.csharp-1.25.7-darwin-arm64/.omnisharp/1.39.6-net6.0/OmniSharp.dll
PID: 83500

[STDERR] Unhandled exception.
[ERROR] A .NET 6 SDK for arm64 was not found. Please install the latest arm64 SDK from https://dotnet.microsoft.com/en-us/download/dotnet/6.0.
OmniSharp server started with .NET 6.0.402
.
Path: /.vscode/extensions/ms-dotnettools.csharp-1.25.7-darwin-arm64/.omnisharp/1.39.6-net6.0/OmniSharp.dll
PID: 83500

[STDERR] Unhandled exception.
[ERROR] A .NET 6 SDK for arm64 was not found. Please install the latest arm64 SDK from https://dotnet.microsoft.com/en-us/download/dotnet/6.0.
12 Replies
ZacharyPatten
ZacharyPatten2y ago
what is the output of dotnet --list-sdks
EddieV
EddieVOP2y ago
6.0.402 [/usr/local/share/dotnet/x64/sdk] It seems my installation didn't work. So I tried another method here https://github.com/isen-ng/homebrew-dotnet-sdk-versions, a successful installation. But after checking dotnet --list-sdks nothing changed...
installer: Package name is Microsoft .NET SDK 6.0.408 (arm64)
installer: Upgrading at base path /
installer: The upgrade was successful.
installer: Package name is Microsoft .NET SDK 6.0.408 (arm64)
installer: Upgrading at base path /
installer: The upgrade was successful.
So how do I fix it? I have tried many things and none worked 😦 Thank you, let me check it out I think I did something, now the omnisharp seems to work but my entired code is covered in blood red and I couldn't run it (could before lol) The type or namespace name 'System' could not be found in the global namespace (are you missing an assembly reference?) @Diddy When I tried to run code, it said no project to run Even though I'm in the folder of a project Ok, I think I found something: In the .csproj if I change TargetFramework to net7.0 -> no more code errors highlighted, but I couldn't run the programme If I keep it at nêt.0 -> all code erros highlights, but I could run the code
Florian Voß
Florian Voß2y ago
mhm in .net 6+ app System should be known due to Implicite usings
EddieV
EddieVOP2y ago
No matter what I tried, the SDK kept stuck as 6.0.402
Florian Voß
Florian Voß2y ago
might check your .csproj file if implicite usins are enabled or not if its disbabled you might have to add using System;
EddieV
EddieVOP2y ago
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
@Florian Voß This is my .csproj file
Florian Voß
Florian Voß2y ago
mhm so its enabled no idea then
EddieV
EddieVOP2y ago
I'm thinking about the last resort would be wiping .NET and its related components completely from my mac then do a clean install But it seems uninstalling also complicated Why 😦
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
EddieV
EddieVOP2y ago
Okay, I have no idea what just happened but I closed VSCode following @TeBeClone suggestion. Checking dotnet --list-sdks all of sudden it's now 7.0 I change target framework in the .csproj and everything works perfectly Anyway, thank y'all for the support.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity. Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server