繁体   English   中英

Unity3d项目使VSCode崩溃

[英]Unity3d project crashes VSCode

中型Unity3d项目。 在OS X上的VSCode中打开正常,在Windows上的VSCode中打开它将导致深度冻结(并崩溃)。

到目前为止,我发现:Unity3d使用目标.Net框架“ v2.0”创建.csproj文件。 目标在开发环境之间保持不变。 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".

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

有什么想法为什么可以在Mac上运行,但拒绝(未经修改)在Windows上运行?

解决了。 原来是集成插件将目标框架从Unity的默认(正在运行)“ v3.5”切换到了“ v2.0”。

拉取请求已提交:)

暂无
暂无

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

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