使用 Visual Studio 2017.3 编译 Unity UWP 构建时出错

Getting error in compiling Unity UWP build with Visual Studio 2017.3(使用 Visual Studio 2017.3 编译 Unity UWP 构建时出错)

本文介绍了使用 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

The command ""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 Sniffer Dog 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"" exited with code 1. Police Sniffer Dog Chase F:Games 4Police 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 构建时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:使用 Visual Studio 2017.3 编译 Unity UWP 构建时出错

基础教程推荐