简体   繁体   English

Unity3d项目使VSCode崩溃

[英]Unity3d project crashes VSCode

Medium-size Unity3d project. 中型Unity3d项目。 Opens fine in VSCode on OS X, opening it in VSCode on Windows results in deep freeze (and crash). 在OS X上的VSCode中打开正常,在Windows上的VSCode中打开它将导致深度冻结(并崩溃)。

What I found so far: Unity3d creates .csproj files with target .Net framework "v2.0". 到目前为止,我发现:Unity3d使用目标.Net框架“ v2.0”创建.csproj文件。 Target persists between development environments. 目标在开发环境之间保持不变。 OmniSharp logs lots of warnings like: OmniSharp记录许多警告,例如:

[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. 在.csproj文件中手动将目标框架切换为“ v3.5”可以解决警告并避免VSCode冻结,但是一旦我向项目添加新文件,Unity就会重新生成.csproj文件。

Any ideas why it works on Mac, but refuses to work (without modifications) on Windows? 有什么想法为什么可以在Mac上运行,但拒绝(未经修改)在Windows上运行?

Solved it. 解决了。 Turns out it was integration plugin that switched target framework to "v2.0" from Unity's default (and working) "v3.5". 原来是集成插件将目标框架从Unity的默认(正在运行)“ v3.5”切换到了“ v2.0”。

Pull request submitted :) 拉取请求已提交:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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