How can you use .NET 4.x on a MAC and use VSCode as the editor!
I have those settings set in unity:
In VScode I get the following error:
The reference assemblies for framework ".NETFramework,Version=v4.7.1" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
Failed to load project file '/Data/unity_learn/RIG/Assembly-CSharp.csproj'.
/Data/unity_learn/RIG/Assembly-CSharp.csproj
/Users/doekewartena/.vscode/extensions/ms-vscode.csharp-1.16.0/.omnisharp/1.32.4/omnisharp/msbuild/15.0/Bin/Microsoft.Common.CurrentVersion.targets(1195,5): Error: The reference assemblies for framework ".NETFramework,Version=v4.7.1" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
I can't find a download for 4.x
version for the mac.
Build your next game or real-time 3D Unity application with best-in-class debugging, C# support, and productivity tools included in Visual Studio for Mac.
By default, most Unity projects should use the . NET Standard 2.0 profile.
Unity uses the open-source . NET platform to ensure that applications you make with Unity can run on a wide variety of different hardware configurations. The . NET platform supports a range of languages and API libraries.
NET Standard 2.1 support in Unity 2021 LTS enables us to start modernizing the Unity runtime in a number of ways.
Omnisharp defaults to using dotnet if it's available, which isn't enough for what you need. To make omnisharp use mono (which comes with the needed profiles), you'll need to:
brew install mono
"omnisharp.useGlobalMono": "always"
(auto
The output in VSCode should show something like
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 2 MSBuild instance(s)
1: Mono 15.0 - "/usr/local/lib/mono/msbuild/15.0/bin"
2: StandAlone 15.0 - "/Users/x/vscode/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.8/omnisharp/msbuild/15.0/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: Mono 15.0 - "/usr/local/lib/mono/msbuild/15.0/bin"
If it still complains after doing this (if, let's say, it picks the wrong mono installation), you can also force omnisharp to use homebrew's mono by setting
"omnisharp.monoPath": "/usr/local/"
or a specific installation of mono with
"omnisharp.monoPath": "/usr/local/Cellar/mono/5.14.0.177/"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With