- Home /
Set LangVersion in Assembly-CSharp.csproj file to 6 or Default (while using new Entity package)
Hello,
recently I had a look at the new Entity Component System (using Unity 2018.2.2f1).
Unfortunately I noticed that a few certain events (starting Unity/loading the project, double-clicking a message in the Unity console to go to the corresponding line of code) seem to recreate the "Assembly-CSharp.csproj" file in the project folder.
The main problem is that when the "Entities" package (version 0.0.12-preview.5) is loaded in the package manager in line 4 of the Assembly-CSharp.csproj
<LangVersion>6</LangVersion
gets replaces with
<LangVersion>7</LangVersion>
Because of this MonoDevelop (5.9.6) disables all its code completion and highlight features.
Opening the Assembly-CSharp.csproj file and setting the value back to 6 or "Default" (case sensitive!) and going back to MonoDevelop reloads the project quickly and re-enables the features. As far as I've seen this also does not seem to break anything in Unity, the project still runs fine. However, the file gets replaced again and again.
So is there any way to manually tell Unity to set the value to 6 or "Default" when it rebuilds the file? The only alternative I see is writing a small macro (e.g. with AutoHotKey) to reset the value every time the file has changed but that's a bit of a hack...
P.S.: YES, I know that MonoDevelop has been deprecated from Unity 2018.1 onward but the code highlighting of its Monokai theme is still superior to all IDE alternatives I've seen to date.
Your answer
Follow this Question
Related Questions
Exporting a unity asset as a Package,but have not Preview Picture?help me please 0 Answers
Set Resolution 2 Answers
MonoDevelop failed to start 2 Answers
Is it possible to use DataContractJsonSerializer? 2 Answers
Change syntax window background colour 0 Answers