- Home /
Unity changes my VS solution configuration
Im using Unity 5.2 and Visual Studio Professional 2013. I use json.net to serialize/deserialize json text into objects. I have to set up the solution to Framework 3.5 to work. But Unity constantly changes the project to Framework 3.5 full base class library, changes the solution target platform to "Any CPU" (I need "x86"), and adds a references of json to the EDITOR project (I just need it on the regular project).
How I prevent Unity to do this?
NOTE: In previous version of UnityVS plugin (where you import in Unity) you can wrote a script for this. But in this versions Microsoft already has the UnityVS integrated in Visual Studio.
Anyone else having this issue?
Answer by Myrtanim · Jan 19, 2016 at 08:28 AM
1. Check import settings
If you are using the json.net DLL, then first check the import settings of it in the Unity editor.
Just navigate to your Plugins folder and check the Selected platforms and Platform settings for the DLL.
Since you say, that the reference is added to the Editor project you should also check, if the DLL is within any Editor folder. Only then the reference is moved to the editor project.
2. Alter the project settings of VS project
Beware this is the complicated but more flexible solution!
You could hook up to the Project File Generation API of Visual Studio Tools for Unity.
But first you should compare your own *.csproj
files (with all the hand-made setting) with the one Unity generates. In the end *.csproj
files are just XMLs, so just open them in a text editor.
I think, you need to adjust some nodes in the <PropertyGroup>
node, namly <Platform>
(for changing the target platform), <TargetFrameworkVersion>
and <TargetFrameworkProfile>
(for the .Net framework settings).
Your answer
Follow this Question
Related Questions
move object when player reach trigger 0 Answers
Unity 5.4.2f2 Project Target Framework issues with Visual Studio on Windows 10 0 Answers
Setting App Compatibility level to 4.6, not 4.x 0 Answers
csc.exe has stopped working ,csc.exe has stoped working 0 Answers
Unity freezes when opening Visual Studio 6 Answers