Omnisharp error about dotnet version - Unity - unity3d

at VSCode launch today I'm receiving this error:
Starting OmniSharp server at 27/5/2022, 12:37:25
Target: f:\UnityProjects\MyGame.sln
[ERROR] Error: Found dotnet version 5.0.407. Minimum required version is 6.0.100.
I read that there have been updates in omnisharp but I really don't know how to fix the issue.
I've installed dotnet 6.0 TLS through a new visual studio installation... is there anything else I can do to bring dotnet working with my Unity project?

If you're using C# extension 1.25.0 they announced a change in the extension's details page:
.NET Framework builds of OmniSharp no longer ship with Mono or the
MSBuild tooling (See announcement omnisharp-roslyn#2339). To ensure
that the C# extension remains usable out of the box for .NET SDK
projects, we have changed the default value of omnisharp.useModernNet
to true.
If you still need Unity or .NET Framework support, you can set
omnisharp.useModernNet to false in your VS Code settings and restart
OmniSharp.
Changing that omnisharp.useModernNet setting to false worked for me.

If you use vscode for web development and your installed dotnet SDK version is < 6, this answer might be useful.
After quite some time I spotted an Ominisharp Log warning this.
[ERROR] Error: Found dotnet version 3.1.419. Minimum required version is 6.0.100.
Solution
Install dotnet SDK 6 alongside or by replacing your current version.
I recommend you install it by using the dotnet-install.{sh | ps1} script.
By running the command below it will install the latest version alongside your current one.
sudo ./dotnet-install.sh -c 6.0 --install-dir /usr/share/dotnet
~ ยป dotnet --list-sdks
3.1.419 [/usr/share/dotnet/sdk]
6.0.300 [/usr/share/dotnet/sdk]

Related

Azure DevOps Pipelene doesn't compile .netstandard 2.0 projects

I'm stuck in a rut with this proble. After converting some solution projects in .netstandard 2.0 the pipeline doesn't compile. Other are .NET Framework 4.8 projects.
Here the errors
Installed SDKs: No .NET SDKs were found.
Install the [6.0.400] .NET SDK or update
[E:\myApplicationFolder\global.json] to match an installed SDK.
Download a .NET SDK: https://aka.ms/dotnet-download
I tried the following steps:
installed VS 2022 and tells to the pipeline to use VS 2022 msbuild
installed the .NET sdk
created the global.json choerent with the solution
checked the environment variables (they point to C:\Program Files\dotnet)
checked the version of .NET SDK
This is the global.json
{
"sdk": {
"version": "6.0.400"
}
}
There are the configuration on the pipeline
I don't have any troubles building the solution with msbuild from powershell.
Any other suggestions? Thanks
Many problems, Azure DevOps isn't updated to the latest version and can't manage .NET 6.0 solutions. I had to specify the msbuild of VS 2022 also to restore nuget packages

Carthage install of Eureka failing due to Swift Version

Starting with a brand new project, I am trying to install Eureka through Carthage. I set up a Cartfile with the specified line: github "xmartlabs/Eureka" ~> 3.0.0 as instructed.
I then execute with: carthage update --platform iOS
The build fails with the message:
Task failed with exit code 65" with the further message that the
project likely failed to compile. Checking the log file as instructed
I see the following: "error: SWIFT_VERSION '3.0' is unsupported,
supported versions are: 4.0, 4.2, 5.0. (in target 'Eureka')
I am using Xcode 10.2.1 and the new project defaults Swift Compiler Language to Swift 5. However, this is for the target of the new project. I see in the error the version is 3.0 for target Eureka.
Do I need to change something else for the default running through the terminal? Do I have some old version of a setting from Swift 3.0 hanging around somewhere?
Thank you, version Eureka 5.0 solved it. Unfortunately I was using the command from the webpage https://eurekacommunity.github.io/"github which says use: "xmartlabs/Eureka" ~> 3.0.0"

Dotnet restore not working

dotnet Version: 1.1.0 (global.json)
NuGet Version : 4.4.1.4656
VS2017 v15.5.2 (as Administrator)
.NET Core 1.1
The solution I am trying to build
Update I:
I just changed the project to run under target framework .NET Core v2.0 & sdk version 2.1.3 and I only get these kind of errors:
Severity Code Description Project File Line Suppression State
Error NU1202 Package Microsoft.Extensions.FileProviders.Physical 1.1.0
is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0).
Package Microsoft.Extensions.FileProviders.Physical 1.1.0 does not
support any target
frameworks. AspNetCoreExample C:\Users\Admin\Source\Repos\Examples\src\AspNetCoreExample\AspNetCoreExample.csproj 1
Update II:
While the following solves the current issue, i am not sure if it solves the root cause for this issue.
Delete the global nuget.config file %AppData%/Nuget/Nuget.config.
I fixed this issue by doing the following:
I migrated the project to .net core 2.0 and changed the global.json to point to sdk 2.1.3.
Removed all references in AspNetCoreExample manually and added the latest version for all of them.
Issues with target framework 1.1
When doing a restore from the solution in VS 2017:
When doing the restore from cmd (dotnet restore)
Running dotnet restore in Package Manager Console
NuGet.targets(103,5): error : Access to the path 'System.Runtime.dll'
is denied
.NET Core SDKs installed:
.NET Host
Now when opening the solution I get:
Comparing the log entries you pasted to their AppVeyor build,
https://ci.appveyor.com/project/Autofac/examples
Your machine's NuGet configuration seems to be broken. Analyze that and fix the issues.
You should add this code to your .csproj file
<RuntimeFramework>2.0.3</RuntimeFramework>
This worked for me.

UWP Deployment Microsoft.NET.Native.Runtime.1.7 not found error

I have recently installed a few updates to windows / visual studio 2017, and now when I create a package of my UWP app and try deploying it to any of the machine where it used to work just fine - installation fails and there is this error message in windows error log:
AppX Deployment operation failed for package 92211ab1-5481-4a1a-9111-a3dd87b81b72_1.0.26.0_neutral_~_n78qa84z3g9aj with error 0x80073CF3. The specific error text for this failure is: Windows cannot install package 92211ab1-5481-4a1a-9111-a3dd87b81b72_1.0.26.0_x86__n78qa84z3g9aj because this package depends on a framework that could not be found. Provide the framework "Microsoft.NET.Native.Runtime.1.7" published by "CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US", with neutral or x86 processor architecture and minimum version 1.7.25531.0, along with this package to install. The frameworks with name "Microsoft.NET.Native.Runtime.1.7" currently installed are: {}
I can not find any reference on the web for this package.
The package installs just fine on the developement machine.
Any help would be greatly appreciated.
EDIT 1:
Screenshot of my dependencies folder below:
UWP Deployment Microsoft.NET.Native.Runtime.1.7 not found
The problem is that there is no Microsoft.NET.Native.Runtime.1.7 dependence in current OS system. And you could install Microsoft.NET.Native.Runtime.1.7 dependence manually.
The Microsoft.NET.Native.Runtime.1.7 dependence will be stored in the Dependencies folder where under the appx folder.
Update1
I have checked your screenshot. It seems that you generate your package in debug mode and I can reproduce the same dependency in this way. The .NET Native tool chain is checked by default in the release mode. So you could regenerate your package in release mode to get files above.
Looks like these dependencies only appear on a Release build, and not in Debug.

Cannot install FsLab with NuGet

Complete VS noob. Fresh install of Visual Studio Community 2015. New project. Trying to install FsLab with NuGet ends with this error:
Unable to find a version of 'Deedle' that is compatible with 'FsLab 1.0.2 constraint: Deedle (= 1.2.5)'
When I search for Deedle the version that NuGet shows is v1.2.5.
I suspect this is a NuGet problem after reading about some issues with its dependency resolution management.
I tried installing Deedle separately and setting NuGet's Dependency behavior to Highest with no luck. In the end I installed Paket which worked with no problems. No time to debug this further for now.