Hololens 构建失败

编程入门 行业动态 更新时间:2024-10-11 01:17:35
本文介绍了Hololens 构建失败 - 命令 AssemblyConverter.exe 以代码 1 退出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

更新到最新版本的 VS 2017(版本 15.3.2)后,我从 Unity 生成的 Hololens 构建不断失败并显示此消息:

After updating to the latest version of VS 2017 (version 15.3.2) my Hololens builds generated from Unity keep failing with this message :

命令C:TestFileHoloBuildVSAppUnityToolsAssemblyConverter.exe"-platform=uap -lock=C:TestFileHoloBuildVSAppHoloBuildproject.lock.json"-bits=32 -configuration=Debug -removeDebuggableAttribute=False -uwpsdk=10.0.15063.0 -path=."-path=C:Program FilesUnityEditorDataPlaybackEnginesMetroSupportPlayersUAPdotnetx86Debug";C:TestFileHoloBuildVSAppHoloBuildAssembly-CSharp.dll"C:TestFileHoloBuildVSAppHoloBuildUnityEngine.dll"C:TestFileHoloBuildVSAppHoloBuildUnityEngine.Analytics.dll"C:TestFileHoloBuildVSAppHoloBuild unit.framework.dll"C:TestFileHoloBuildVSAppHoloBuildUnityEngine.UI.dll"C:TestFileHoloBuildVSAppHoloBuildUnityEngine.HoloLens.dll"C:TestFileHoloBuildVSAppHoloBuildUnityEngine.Networking.dll"C:TestFileHoloBuildVSAppHoloBuildUnityEngine.VR.dll""退出代码 1. HoloBuild C:TestFileHoloBuildVSAppHoloBuildHoloBuild.csproj 292

The command ""C:TestFileHoloBuildVSAppUnityToolsAssemblyConverter.exe" -platform=uap -lock="C:TestFileHoloBuildVSAppHoloBuildproject.lock.json" -bits=32 -configuration=Debug -removeDebuggableAttribute=False -uwpsdk=10.0.15063.0 -path="." -path="C:Program FilesUnityEditorDataPlaybackEnginesMetroSupportPlayersUAPdotnetx86Debug" "C:TestFileHoloBuildVSAppHoloBuildAssembly-CSharp.dll" "C:TestFileHoloBuildVSAppHoloBuildUnityEngine.dll" "C:TestFileHoloBuildVSAppHoloBuildUnityEngine.Analytics.dll" "C:TestFileHoloBuildVSAppHoloBuild unit.framework.dll" "C:TestFileHoloBuildVSAppHoloBuildUnityEngine.UI.dll" "C:TestFileHoloBuildVSAppHoloBuildUnityEngine.HoloLens.dll" "C:TestFileHoloBuildVSAppHoloBuildUnityEngine.Networking.dll" "C:TestFileHoloBuildVSAppHoloBuildUnityEngine.VR.dll"" exited with code 1. HoloBuild C:TestFileHoloBuildVSAppHoloBuildHoloBuild.csproj 292

我在构建输出中有这个错误:

I have this error in the build output :

1>System.Collections.Generic.KeyNotFoundException:字典中不存在给定的键.(任务 ID:275)

1> System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. (TaskId:275)

1>在 System.Collections.Generic.Dictionary`2.get_Item(TKey key) (TaskId:275)

1> at System.Collections.Generic.Dictionary`2.get_Item(TKey key) (TaskId:275)

1>在 UnityEditor.Scripting.Compilers.NuGetPackageResolver.Resolve() (TaskId:275)

1> at UnityEditor.Scripting.Compilers.NuGetPackageResolver.Resolve() (TaskId:275)

1>在 Unity.UWPAssemblyResolver..ctor(String projectLockFile, String requiredUWPSDKVersion) (TaskId:275)

1> at Unity.UWPAssemblyResolver..ctor(String projectLockFile, String desiredUWPSDKVersion) (TaskId:275)

1>在 Unity.OperationContext.SetPlatform(Platform platform, String projectLockFile, String uwpSDK) (TaskId:275)

1> at Unity.OperationContext.SetPlatform(Platform platform, String projectLockFile, String uwpSDK) (TaskId:275)

1>在 Unity.ParseArgsStep.Execute() (TaskId:275)

1> at Unity.ParseArgsStep.Execute() (TaskId:275)

1>在 Unity.Step.Execute(OperationContext operationContext, IStepContext previousStepContext) (TaskId:275)

1> at Unity.Step.Execute(OperationContext operationContext, IStepContext previousStepContext) (TaskId:275)

1>在 Unity.Operation.Execute() (TaskId:275)

1> at Unity.Operation.Execute() (TaskId:275)

1>在 Unity.Program.Main(String[] args) (TaskId:275)

1> at Unity.Program.Main(String[] args) (TaskId:275)

我尝试了许多新项目,但结果相同,错误消息相同.

I have tried with many fresh projects but the result is the same with the same error message.

正如某些线程中所建议的,我尝试删除并重新添加一些引用,尝试在 Unity 中弄乱一些构建设置.

As suggested in some threads, I tried removing and adding back some references, tried messing with some build settings in Unity.

我完全不确定这个问题是因为更新 Visual Studio.有没有人遇到过同样的问题?我怎样才能构建我的项目?

I'm not sure at all that this issue is because of updating Visual Studio. Has anyone faced the same issue ? How may I be able to build my projects ?

推荐答案

此问题与 Unity 中的一个错误有关,该错误使其无法与 Visual Studio 2017 (15.3) 一起使用.这里有一些关于它的链接.我相信您可以安装 Unity 补丁,但我发现最简单的解决方案是将 Visual Studio 降级到 2015 版本.如果您有权访问 Visual Studio 2017 (15.2),那也可以.

This problem is related to a bug in Unity that makes it not work with Visual Studio 2017 (15.3). Here are some links regarding it. I believe you can install a Unity patch, but the easiest solution I found was to downgrade Visual Studio to the 2015 version. If you have access to Visual Studio 2017 (15.2) that would work as well.

以下是相关链接:

  • forum.unity3d/threads/net-scripting-backend-and-visual-studio-2017-3-incompatibility.487833/

    forum.unity3d/threads/build-error-assembly-csharp-dll-could-not-be-found-hololens.458493/

    希望这有帮助!

  • 更多推荐

    Hololens 构建失败

    本文发布于:2023-11-13 06:24:01,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1583689.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:Hololens

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!