Unity Windows build and Visual .NET version differs

Hi there,
I’m working on a port of my game to Windows Store and I got stuck on porting the .NET code. I have some of xml dependant structures and while in Visual Studio everything works just fine (also intellisense is suggesting certain methods/attributes) Unity returns build errors - for example “XmlDocument does not contain a definition for SelectSingleNode” etc.

Of course I understand the difference and I don’t mind having few #ifdefs but I just can’t work on Visual since, like I said before, it suggests/accepts older .NET version than the one that is used to generate Windows solution.

I need to build it using “Net Core” and with .NET scripting backend so changing to IL2CPP doesn’t fit me.

So, the question is - is there a way to change Visual’s (Community 2015, Update 3) .NET references to be the same as Unity’s one.

Kind regards,
Mariusz.

You could #ifdef all the scripts out that don’t compile, build the project with “C# projects” build option enabled and that will produce VS projects that target the right .NET profile. Then, you’ll be able to remove those ifdefs and have fully functional intellisense.

Thank you Tautvydas! Worked like a charm. :slight_smile: