VS2017 build failed

Hello,
trying ‘build solution’, ‘build hololens’, ‘run in hololens simulator’ in VS2017 for simple project (camera, light, sphere). error:

The command ““F:\HOL bld\Unity\Tools\AssemblyConverter.exe” -platform=uap -lock=“F:\HOL bld\Hololens\project.lock.json” -bits=64 -configuration=Release -removeDebuggableAttribute=False -uwpsdk=10.0.15063.0 -path=”." -path=“C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Players\UAP\dotnet\x64\Release” “F:\HOL bld\Hololens\UnityEngine.dll” “F:\HOL bld\Hololens\UnityEngine.Analytics.dll” “F:\HOL bld\Hololens\nunit.framework.dll” “F:\HOL bld\Hololens\UnityEngine.UI.dll” “F:\HOL bld\Hololens\UnityEngine.HoloLens.dll” “F:\HOL bld\Hololens\UnityEngine.Networking.dll” “F:\HOL bld\Hololens\UnityEngine.VR.dll”" exited with code 1. Hololens F:\HOL bld\Hololens\Hololens.csproj 263

Unity 5.6.1, VS2017

I am assuming you either just installed VS2017 or updated it to 15.3

There is a problem with Unity and VS2017-15.3

Currently, the only version that I believe to be patched for this issue is the 2017.2 beta. You will likely have to update to the version of Unity or find a way to go back to 15.2 to get the fix. Another option would be to use VS2015 update 3.

You can see more info here.

Thank you for help, but i can’t build with 2017.2 beta:
on open project:
Error loading launcher://unity/C:/Users/Hololens/AppData/Roaming/Unity/Packages/node_modules/unity-editor-home/dist/index.html?code=6VNnhGRoeAjst4eLFvkZIw009f&locale=en&session_state=57dfdd83f9c969649cfa50cf66220c567ee840b48dea39273d49298ea652b78f.9LF9bHFl2UT021CXHcLIsw00af#/login

on build:
UnityException: Failed to run reference rewriter with command --target=“Temp\StagingArea\Data\Managed\UnityEngine.Analytics.dll” --additionalreferences=“Temp\StagingArea\Data\Managed” --platform=“C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.15063.0\Facade\Windows.winmd” --dbg=pdb --framework=“Temp\StagingArea\Data\Managed”

Build completed with a result of ‘Failed’
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x00207] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:172
at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00050] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:83
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

reinstall 5.6.1 + VS 2017 15.2
now it works.
Thank you.

1 Like