SeanOMik
SeanOMik
CC#
Created by SeanOMik on 11/12/2024 in #help
VSCode set dotnet sdk directory
I have a specific version of dotnet installed on my machine for a project, I can't replace the system wide one installed through my package manager since other things rely on it. I tried to set these in settings.json:
"dotnet.dotnetPath": "/home/seanomik/.local/share/mise/installs/dotnet/9.0.100-rc.2.24474.11",
"dotnetAcquisitionExtension.sharedExistingDotnetPath": "/home/seanomik/.local/share/mise/installs/dotnet/9.0.100-rc.2.24474.11"
"dotnet.dotnetPath": "/home/seanomik/.local/share/mise/installs/dotnet/9.0.100-rc.2.24474.11",
"dotnetAcquisitionExtension.sharedExistingDotnetPath": "/home/seanomik/.local/share/mise/installs/dotnet/9.0.100-rc.2.24474.11"
However, vscode isn't using it. When I start vscode I get a warning saying nuget restore failed, I view logs and see this:
/usr/share/dotnet/sdk/8.0.403/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(166,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 9.0.
/usr/share/dotnet/sdk/8.0.403/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(166,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 9.0.
How could I set the path and actually get vscode to use it?
1 replies
CC#
Created by SeanOMik on 11/5/2024 in #help
Compiling C# as a WASM component
I'm trying to follow the guide here for compiling C# as a WASM component: https://component-model.bytecodealliance.org/language-support/csharp.html When I run dotnet build though, I get this error:
Restore complete (0.4s)
You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
dotnet-guest-test failed with 1 error(s) (2.8s) → bin/Debug/net9.0/wasi-wasm/dotnet-guest-test.dll
/home/seanomik/.nuget/packages/microsoft.dotnet.ilcompiler.llvm/10.0.0-alpha.1.24525.6/build/Microsoft.NETCore.Native.targets(363,5): error MSB3073: The command ""\tools\\ilc" @"obj/Debug/net9.0/wasi-wasm/native/dotnet-guest-test.ilc.rsp"" exited with code 127.
Restore complete (0.4s)
You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
dotnet-guest-test failed with 1 error(s) (2.8s) → bin/Debug/net9.0/wasi-wasm/dotnet-guest-test.dll
/home/seanomik/.nuget/packages/microsoft.dotnet.ilcompiler.llvm/10.0.0-alpha.1.24525.6/build/Microsoft.NETCore.Native.targets(363,5): error MSB3073: The command ""\tools\\ilc" @"obj/Debug/net9.0/wasi-wasm/native/dotnet-guest-test.ilc.rsp"" exited with code 127.
I'm on Arch Linux and installed dotnet-sdk-preview-bin to get dotnet 9.0
1 replies