- Home /
VS Code C# Not Working With unity2018 and NET Framework 4.x
set unity3d 'scripting runtime version = .net 4.x equivalent', and had install the .net 4.7.2(win10), but in the end that open code by vscode to create the 'Assembly-CSharp.csproj' , then 'TargetFrameworkVersion = v4.5'.
so 'C# for Visual Studio Code (powered by OmniSharp)' just no work... anyone can help me to understand where is wrong?
the strange thing is when i get the TargetFrameworkVersion = v4.5 by unity3d2018.3.2, but the TargetFrameworkVersion = v4.6 in unity3d2018.1.0......
i check my system .net versions , and it is 4.7.2
Thanks god I am not the only one who has this problem,I am struggling with this recently. I've found that if I set the TargetFrameworkVersion in Assembly-CSharp.csproj to 4.6 manually,the problems are all gone.But when I reopen the script in Unity Editor,the version is reset to 4.5 again and the problems are back.I really hope they can fix it in the releases .
Answer by Captain_Pineapple · Jan 21, 2019 at 06:59 AM
Hey there,
that is an issue that i also stumbled upon a few weeks ago when i wanted to change my editor to visual studio code. I cannot find the reference atm but i found an issue somewhere that stated that this problem is known and will be fixed in unity 2019.1 . Until then you should just use monodevelop ("shudder") or visual studio. Lets pray to the god of releases to hurry up :)
Your answer
Follow this Question
Related Questions
Why is my managed plugin not being referenced. 1 Answer
Updated unity project from 2017 to 2019 versions, now visual studio doesn't work 0 Answers
How to handle in-game events and app versioning? 1 Answer
Transition question on 2D Game Kit based on change of version 1 Answer
Deformed rig on version change 1 Answer