Search Unity

Problems using UWM with IL2CPP for Hololens

Discussion in 'Windows' started by DonRolph, Oct 11, 2018.

  1. DonRolph

    DonRolph

    Joined:
    Oct 3, 2016
    Posts:
    12
    I am using Unity 2018.2.11f1. I am using Visual Studio 2017. I am building images for Hololens.

    I can build images smoothly with Visual Studio 2017 with the .NET scripting back end.

    However, it looks like this is being depreciated. So I am trying to use the IL2CPP scripting back end with Visual Studio 2017.

    It builds the player in Unity smoothly and creates the Visual Studio project.

    However when I try to build the project in Visual Studio 2017 I get the following error message:

    "the build tool for Visual Studio 2015 (v140) can not be found"

    and the option to build for an attached device does not appear.

    This functionality did work under Unity 3D 2017.4.12f1.

    Thoughts?
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Can you post a screenshot of the issue? I wonder how visual studio tells you about this error. Does it not offer to upgrade it to Visual Studio 2017 build tools?
     
  3. DonRolph

    DonRolph

    Joined:
    Oct 3, 2016
    Posts:
    12
    Here is the screen shot. VisualStudio2017IL2CPPerrors.gif VisualStudio2017IL2CPPerrors.gif
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    What happens if you right click on "Debug2 (load failed)" and click reload project?
     
  5. DonRolph

    DonRolph

    Joined:
    Oct 3, 2016
    Posts:
    12
    You do not get the screen allowing you to load to the device. The evidence suggests that the IL2CPP functionality when applied to the Hololens builds a player designed for Visual Studio 2015 not Visual Studio 2017.

    I have loaded additional modules for mobile device in Visual Studio.
    I have looked for obvious components not installed in visual Studio.
    I have done a full repair of the Visual Studio installation.

    If I build with .NET scripts everything works.
    If I build with IL2CPP scripting then I get the error. It is highly consistent.
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Can you show that screen? Is "Debug2" set as a startup project?
     
  7. DonRolph

    DonRolph

    Joined:
    Oct 3, 2016
    Posts:
    12
    The option in the black ellipse is present with .NET and missing in IL2CPP scripting. This option allow me to deploy the image on the Hololens. Without it, it deploys on the local machine.

    dotnetbuild.gif
     
  8. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Can you show how IL2CPP project looks like on your machine after the project is fully loaded? The last time you showed it, one of the projects didn't load for some reason (but you said you can load it manually). Device option is present on my machine.
     
  9. DonRolph

    DonRolph

    Joined:
    Oct 3, 2016
    Posts:
    12
    OK I am attaching a screen shot of the Unity configuration items and the visual Studio configuration.

    I was able this morning to build and deploy "hello cube" to hololens, so it is now working.

    I can make the following statements:

    1) it is working now (at least for this case: I will test more)
    2) it is unclear what is different from Friday
    3) I still have the warning message about the 2015 build tools: there is still some sort of issue

    Based on this testing my sense is:

    a) there is still an issue
    b) it seems to be correlated with the Unity 3D 2018.2.11f1 build install: there is weak evidence that with a pure install of 2017.4.12f1 the IL2CPP scripting works cleanly.

    I will keep testing.

    Thanks for your help!

    Unity2018-2-12f1-il2cpp-config.gif VisualStudio2017successfulBuuildConfig.gif
     
  10. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    What I'm guessing happened was that "Startup project" in VS solution got somehow set to Il2CppOutputProject instead of "Debug2". That would cause the issue you're describing from my initial testing.

    As for the build tools warning: can we have a bug report on that?
     
  11. DonRolph

    DonRolph

    Joined:
    Oct 3, 2016
    Posts:
    12
    Yup - that would do it.

    I will get a bug report in.
     
  12. DonRolph

    DonRolph

    Joined:
    Oct 3, 2016
    Posts:
    12
    Ok yes I can reproduce the problem by:

    - setting the IL2CPP project to the startup project

    And I can correct it by:

    - setting debug2 as the startup project

    So I can turn the problem on and off and we can consider it closed for now.I suspect an oddity during the Unity3D 2018.2.11f1 installation.

    Thanks!