If you are creating a Hololens app with Unity3D, you probably spend some time to get used to having 3 open tools to work: Unity, a Visual Studio 2015 IDE for the edition of C# and other Visual Studio 2015 IDE for build, debug, and deploy (if you need to debug and deploy, of course).
So, I found myself in the following scenario: time to deploy or debug an App from Visual Studio to the Hololens and Visual Studio returns a timeout with the following error message:
Microsoft Visual Studio
Unable to activate Windows Store app ‘<your package names goes here>!App’. The activation request failed with error ‘The system cannot find the file specified’.
See help for advice on troubleshooting the issue.
It’s pretty simple: the remote app in the device cannot be launched. If I also try to launch the app in the Hololens device from the “start menu”, the app seems not to respond.
But it gets weird. I’ve not have made any change in the project of Unity, I only rebuilt the Unity project to get new Visual Studio files. A workaround which works is repeating all the steps from zero in a new project, and, you know: everything works fine. But sometimes, it gets back and thrown this error.
This is a list of some of the tests that I did, and at the end was still having the same problem.
- Delete the app on the device and deploy the binaries it again
- Clean and Rebuild from the Visual Studio’s build IDE
- Change the certificate from Visual Studio’s build IDE and increase the version number
- Change the name of the app from within the Visual Studio build IDE, along with the name of the publisher
- Close the build IDE and delete the directories that create Unity for the compilation
And luckily, I reached a stage which allowed me to continue working from Unity without having to replicate all the work from scratch. Let me share all the necessary steps:
- In Unity access to the Player Settings
- Menu [Edit / Project Settings / Player]
- In the panel Inspector, select Windows as a platform
- In [Publishing Settings / Certificate], create a new certificate
And it works! Is curious because is similar to what I tried to perform from the IDE but without success. Creating the cert From Unity, it seems to work.
I’ll keep this post as a reminder for the next time.
Update: Thanks to Dimi in the comments, this behaviour also applies when we are upgrading Unity projects. Now we have the version 5.5 and the upgrade process may also break the certificate signature. So, this fix will restore the project.
Greetings @ Toronto