Search Unity

Hololens Emulator not found in Visual Studio

Discussion in 'VR' started by sherryq6, Oct 18, 2016.

  1. sherryq6

    sherryq6

    Joined:
    Oct 18, 2016
    Posts:
    6
    Hi,

    I am working on this tutorial: https://developer.microsoft.com/en-us/windows/holographic/holograms_101e

    I'm on the last bullet point in Chapter 1. I'm using Unity Hololens 5.4.0f3. When I open the Origami project in Visual Studio 2015 Update 3, I can't find the Hololens Emulator as a device. I only see a green arrow that points to "Start". I have re-installed the Emulator, but it still doesn't show up in VS.

    Also, when I run "Start without debugging" in VS, I get error: "CS5001: Program does not contain a static 'Main' method suitable for an entry point."

    Does anyone know why the Emulator doesn't show up in VS, or why I'm seeing this error?

    Thanks.
     
    Last edited: Oct 18, 2016
  2. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
  3. sherryq6

    sherryq6

    Joined:
    Oct 18, 2016
    Posts:
    6
    Yes, I have the emulator installed.

    So my problem before was that I didn't have the correct version of Windows 10 SDK (10.0.10586). I re-installed VS with the correct version of Windows 10 SDK, opened up VS, and the Emulator showed up as one of the devices.

    Then, I closed VS, opened it again, and Emulator is not an option anymore. In fact, the only option next to the green arrow is "Start".
     
  4. sherryq6

    sherryq6

    Joined:
    Oct 18, 2016
    Posts:
    6
    I'm trying to check if Target Platform Version in VS is 10.0.10586, but when I go to my Project Properties I don't see Target Platform as any of the fields.
     
  5. sherryq6

    sherryq6

    Joined:
    Oct 18, 2016
    Posts:
    6
    If I just go ahead with the "Start" button, where it's supposed to say "Hololens Emulator", then I get a pop-up with error "A project with an Output Type of Class Library cannot be started directly. In order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project."
     
  6. sherryq6

    sherryq6

    Joined:
    Oct 18, 2016
    Posts:
    6
    Sorry, I just realized what I did wrong.

    For some reason, there are 2 Origami VS objects generated from the Unity build -- one under the App folder, and one in the directory above it. I had opened the Origami VS file in the directory above it, and that was the problem.

    Can someone explain why there are 2 Origami VS files though? Or did I just miss something really obvious
     
  7. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
    Could you send a screen shot of what you are seeing please?
     
  8. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    The one at the root of Unity project root wasn't generated by the build - it's meant for editing and debugging scripts in the editor.
     
    Finnegan2100 likes this.
  9. ArthurEmcon2

    ArthurEmcon2

    Joined:
    Nov 18, 2021
    Posts:
    2
  10. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    For whatever reason, it seems "Il2CppOutputProject" is set as the "startup" project. In the solution explorer, find the project that's named after your project, right click on it and set it as startup project.