Hololens Apps Will No Longer Build - Cites Metadata file missing and c-Sharp.firstpass not found
Asked Answered
A

6

6

I have followed the exact steps Microsoft lists under multiple projects within their Microsoft Holographic - Academy tutorials. I completed them all, and all of them worked just fine from creation to export and testing. This is using Unity3D / C# which gets compiled into a Visual Studio Solution (sln) file.

After completing those, I went on to build my own app - which built just fine as well. No problem!

Now when I try to build - I get a strange error that the c-Sharp.firstpass file (the exported/cross-compiled dll from what I understand) can not be found.

Now even the projects that built successfully won't build any more.

I will paste the exact error below.

Things I have tried:

  • Creating a new project and pasting all of the previous assets into it - then rebuilding.
  • Cleaning the VS project
  • Restarting my computer
  • Restarting Unity3D
  • Uninstalling and reinstalling Visual Studio (recommended version)
  • Uninstalling and reinstalling Unity3D (recommended version)
  • Following the tutorials step-by-step again
  • Searching StackOverflow and attempting every solution whose question remotely resembled my issue
  • Asking on Unity Answers (2 days ago)
  • Building the project file to different drives, folders, locations, etc.
  • To not give up

There seems to be a referencing issue - so I have also unreferenced/referenced the mentioned file.

Thanks for any and all help. To be clear, this is a Windows 10 Universal app being developed for the Microsoft Hololens. However, the device itself seems to have little to nothing to do with the build process in this case, other than targeting it.

Best,

Addyarb

The error:

The command ""D:\Development\Hololens Builds\PlanetApp\Unity\Tools\SerializationWeaver\SerializationWeaver.exe" "D:\Development\Hololens Projects\Planetarium\UWP\Assembly-CSharp-firstpass\bin\x86\Release\Unprocessed\Assembly-CSharp-firstpass.dll" -pdb -verbose -unity-engine="D:\Development\Hololens Builds\PlanetApp\Planetarium\Unprocessed\UnityEngine.dll" -unity-networking=D:\Development\Hololens Builds\PlanetApp\Planetarium\Unprocessed\UnityEngine.Networking.dll "D:\Development\Hololens Projects\Planetarium\UWP\Assembly-CSharp-firstpass\obj\x86\Release\x86\Release"" exited with code 1. Assembly-CSharp-firstpass D:\Development\Hololens Projects\Planetarium\UWP\Assembly-CSharp-firstpass\Assembly-CSharp-firstpass.csproj 180

Metadata file 'D:\Development\Hololens Projects\Planetarium\UWP\Assembly-CSharp-firstpass\bin\x86\Release\Assembly-CSharp-firstpass.dll' could not be found Assembly-CSharp D:\Development\Hololens Projects\Planetarium\UWP\Assembly-CSharp\CSC

Metadata file 'D:\Development\Hololens Projects\Planetarium\UWP\Assembly-CSharp\bin\x86\Release\Assembly-CSharp.dll' could not be found Planetarium D:\Development\Hololens Builds\PlanetApp\Planetarium\CSC

Artema answered 25/5, 2016 at 20:45 Comment(4)
Hololens is academically well debugged. Use their dedicated forum to talk to the Microsoft devs.Draughts
Thanks Hans, I've posted my question there as well.Artema
check this post on Unity forums: forum.unity3d.com/threads/…Suffragist
Finally it worked for me with VS 2015 SP3 and Windows SDK 10.0.14393 forum.unity3d.com/threads/…Andro
E
3

--UPDATE---

My previous answer still applies so I won't remove it. But for fixing this specific issue, make sure you place your generated app in a folder structure that does not contain any spaces. There seems to be a bug in SerializatioWeaver.exe that does not properly read the path and won't be able to find necessary Unity extensions.


Make sure you are using the correct Unity3D version built for HoloLens. Always use the latest version compatible as announced on the HoloLens academy forums - at the time of writing this, that version is 5.4 Beta 18 and you can download it here

Always download the installer from the link provided on the HoloLens forum as the regular Unity builds are different. You need the special Unity3D version built for HoloLens

When installing a new version, always install in a new location than the previous one. After you install Unity, always install the UWP Runtime that you can find on the same page that I linked above (the UWP runtime is built specifically for each version so always re-download and install after Unity). When installing the UWP Runtime, make sure you select the right location for the Unity 3D install folder (the folder you just installed your unity into).

If everything is installed correctly, your builds should start working again.

Energetics answered 28/5, 2016 at 18:56 Comment(2)
Thanks Alex. I was able to reproduce this error today and found the solution (based on yours). I was trying to update my icons/app name and ended up putting a space in my title. When I went to build - I was given a similar error as mentioned before. However, when I rebuilt the solution from Unity and tried again with no space in the name, I received the same error. My solution was to regenerate the certificate by going to File>Build Settings>Player Settings>Publishing Settings>Create and then creating a new certificate.Artema
To add to this, if you 'rename' (i.e. add a space into) your project/app name, Unity/VS will generate another sln - but in the same folder. I'm not sure if that affects exporting/building, but it would make sense that it would throw a wrench into things.Artema
A
1

After about 3 days with no results, I factory reset the hololens and the computer I am working with. After reinstalling all relevant software, my builds worked just fine. I saved to the same drives/folders and everything.

If you take this approach, remember to back up your work!

This certainly isn't the 'best' way to handle this issue, since I can't just factory reset for each bug. But I was no closer to solving this issue and, well, time is money.

Goodluck and thank you for the answers!

Artema answered 30/5, 2016 at 19:36 Comment(1)
I wonder why did you accept an answer if it did not work for you? I'm trying to find solution to this problem as well and would really not want to factory reset my computer.Suffragist
S
1

I fixed a similar missing DLL issue in the produced SLN by using a HoloLens project kit for Unity https://github.com/microsoft/HoloToolkit-Unity as opposed to starting from scratch. Obvious but got me going.

Stockstill answered 8/6, 2016 at 16:33 Comment(0)
K
0

I had the same problem today, and solved it by moving the entire project into a folder with a shorter path. This may not be your issue, but it worked for me for some reason. You will also have to find all the absolute paths in the .sln file and change them to match the new shorter path so your projects will load. There is also a path you'll have to change in the .userprefs folder if I remember correctly.

Good luck! Hope this works for you, although I don't even understand why it worked for me.

Knighton answered 29/5, 2016 at 5:22 Comment(0)
S
0

I just wanted to put this out there because I went through all the other answers and still could not get it to work. After playing around with this for 2 days I decided to scratch all the examples I downloaded for Unity/HoloLens projects and start fresh. I read somewhere that the latest version of unity works with HoloLens, someone else pointed out that projects from Unity 5.4 and 5.6 wouldn't work after opening in a new version. Someone suggested the metadata files must have changed since then. I downloaded the latest version of unity which is currently 2017.2.0b7, and afterwords under "Additional Downloads" I went to Windows Component Installers and downloaded Windows Store (.NET) Target Support. As @AlexDrenea mentioned, this is an important step. Afterwords I made sure Visual Studio 2017 was installed, up to date, and all additional features were installed. I had to re run the installer and make sure "Universal Windows Platform development" and "Game development with Unity" was selected.

As for the project, I started from scratch and modified the build settings the same way I found in online tutorials, with one difference. I didn't check the "Unity C# projects" setting. After some research I found that this does not need to be set. After that I was able to build to the emulator and device without errors

tldr; Don't use old examples or projects when working with Unity and HoloLens, always use the latest version of Unity compatible w/ HoloLens, and the latest version of VisualStudio and start projects from scratch. Unless they are for your version.

Swacked answered 17/8, 2017 at 14:17 Comment(0)
A
0

It seems to me the problem you are having is an incompatibility between Unity3D and Visual Studio 2017 (15.3) Follow the below link to see references for this issue. Hololens Build Failing - The command AssemblyConverter.exe exited with code 1

Solutions:

Arabele answered 26/8, 2017 at 1:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.