本文介绍了使用 Visual Studio 2017.3 编译 Unity UWP 版本时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将 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:

这篇关于使用 Visual Studio 2017.3 编译 Unity UWP 版本时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-29 11:25