- Home /
Problem with changing Unity 2017 to .Net 4.6
I don't know if this is the right place to post this question, if not then my apologies. I am trying to test the .Net 4.6 support in Unity 2017 beta, the problem is: even after I change the script runtime version in player settings to 4.6, the project itself remains on .Net 3.5 so while Unity Editor sees no error, inside VS there is a lot of error, due to it not recognizing the new framework.
I tried restarting changing the framework from the project build settings in VS, but once I go unity it refreshes the .csproj file resetting all the settings I've made.
Is there something I am missing?
We have the same problem here, on one dev's machine it works like a charm, and on the other's it does not. Which is pretty annoying because VS keeps showing a lot of errors.
Answer by dajyareo · Aug 19, 2017 at 10:01 PM
I fixed this by removing the following line from the csproj files:
<LangVersion Condition=" '$(VisualStudioVersion)' != '10.0' ">4</LangVersion>
Unfortunately this will only last until the csproj file is regenerated :P At least it's a work-around until they fix this bug.
Answer by cyliax · Jun 14, 2017 at 07:17 AM
Same problem here. Tried b7 and now b9 with no success. Switched back and forward to 4.6 support, no changes. Is there anything I can do, to have a proper VS2015 solution with C# language version 6 support?
I found out that something happens with the .csproj files. I had four files, two of them with the appendix .CSharp.csproj and two without. In those *.CSharp.csproj files the v3.5 .Net framework was used. I don't know why Unity has generated them? Now I works with b7 and b9... but I'm not sure why.
Your answer
![](https://koobas.hobune.stream/wayback/20220612123931im_/https://answers.unity.com/themes/thub/images/avi.jpg)