简体   繁体   中英

Unity3d project crashes VSCode

Medium-size Unity3d project. Opens fine in VSCode on OS X, opening it in VSCode on Windows results in deep freeze (and crash).

What I found so far: Unity3d creates .csproj files with target .Net framework "v2.0". Target persists between development environments. OmniSharp logs lots of warnings like:

[WARNING:OmniSharp.MSBuild.MSBuildProjectSystem] The primary reference "System.Xml.Linq" could not be resolved because it has an indirect dependency on the framework assembly "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v2.0". To resolve this problem, either remove the reference "System.Xml.Linq" or retarget your application to a framework version which contains "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089".

Manually switching target framework to "v3.5" in .csproj files resolves warnings and avoids VSCode freeze, but as soon as I add new file to project Unity regenerates .csproj files.

Any ideas why it works on Mac, but refuses to work (without modifications) on Windows?

Solved it. Turns out it was integration plugin that switched target framework to "v2.0" from Unity's default (and working) "v3.5".

Pull request submitted :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM