问题描述
我正在将 Unity 游戏移植到通用 Windows 平台.但是在 Visual Studio 2017.3 中创建构建时,出现此错误:
I am porting Unity game to Universal Windows Platform. But during creating build in Visual Studio 2017.3, I got this error:
命令 ""F:Games 4Police Sniffer Dog ChaseV1.0WinStore_10UnityToolsAssemblyConverter.exe" -platform=uap -lock="F:Games 4Police Sniffer Dog ChaseV1.0WinStore_10Police Sniffer Dog Chaseproject.lock.json" -bits=64 -configuration=Debug -removeDebuggableAttribute=False -path="." -path="..PlayersUAPx64Debug" "F:Games 4Police Sniffer Dog ChaseV1.0WinStore_10Police Sniffer Dog ChaseAssembly-CSharp-firstpass.dll" "F:Games 4Police Sniffer Dog ChaseV1.0WinStore_10Police Sniffer Dog ChaseAssembly-CSharp.dll" "F:Games 4Police Sniffer Dog ChaseV1.0WinStore_10Police Sniffer Dog ChaseAssembly-UnityScript-firstpass.dll" "F:Games 4Police Sniffer Dog ChaseV1.0WinStore_10Police SnifferDog ChaseAssembly-UnityScript.dll" "F:Games 4Police Sniffer Dog ChaseV1.0WinStore_10Police Sniffer Dog ChaseUnityEngine.dll" "F:Games 4Police Sniffer Dog ChaseV1.0WinStore_10Police Sniffer Dog ChaseUnityEngine.UI.dll" "F:Games 4Police Sniffer Dog ChaseV1.0WinStore_10Police Sniffer Dog ChaseUnityEngine.Networking.dll" "F:Games 4Police Sniffer Dog ChaseV1.0WinStore_10Police Sniffer Dog ChaseLightMixerScripts.dll"" 退出,代码为 1. Police Sniffer Dog Chase F:Games4Police Sniffer Dog ChaseV1.0WinStore_10Police Sniffer Dog ChasePolice Sniffer Dog Chase.csproj 279
我现在删除了 Unity 中的所有错误.在 Unity 中一切正常,但 Visual Studio 在编译期间生成此错误.它发生在我尝试用 Visual Studio 编译的所有游戏中.
I remove all errors in Unity now. Everything is working fine in Unity but Visual Studio generate this error during compilation. Its happened with all games I try to compile with Visual Studio.
推荐答案
根据您的错误,您似乎在这里遇到了同样的问题:.NET 脚本后端与 Visual Studio 2017.3 不兼容.
According to your error, it seems you are having the same issue here: .NET scripting backend and Visual Studio 2017.3 incompatibility.
在面向 UWP、使用 .NET 脚本后端(IL2CPP 脚本后端不受影响)和构建生成的 Visual Studio 项目时,Unity 和 Visual Studio 2017 更新 3 之间存在兼容性问题.
There is a compatibility issue between Unity and Visual Studio 2017 update 3 when targeting UWP, using .NET scripting backend (IL2CPP scripting backend is not affected) and building generated Visual Studio project.
要解决此问题,您可以尝试使用 IL2CPP 脚本后端,或将 Unity 升级到以下版本:
To fix this issue, you can try with IL2CPP scripting backend, or upgrade Unity to the following version:
- 带有修复的 5.5 版本:5.5.4p5
- 具有修复的 5.6 版本:5.6.3p2
- 修复了 2017.1 版本:2017.1.0p5强>
- 已修复的 2017.2 版本:2017.2.0b7强>
这篇关于使用 Visual Studio 2017.3 编译 Unity UWP 版本时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!