Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

UWP / IL2CPP / Running .exe after build: The code execution cannot proceed

Discussion in 'Windows' started by plmx, Nov 19, 2017.

  1. plmx

    plmx

    Joined:
    Sep 10, 2015
    Posts:
    308
    For deploying a project for Windows Mixed Reality, I've successfully created an IL2CPP-based project which I've built using VS2017 with the VC++ 2015.3 v140 toolset, x64 platform, and master configuration.

    I'm now trying to actually run that project (outside of Visual Studio). I've found the .exe in build/bin/x64/Master, but running it yields "The code execution cannot proceed because VCRUNTIME140_APP.dll was not found. Reinstalling the program may fix this problem", and another similar message with vccorlib140_app.dll.

    I feel I am missing something vital here to create the final build. Am I supposed to be copying some files around to create the final directory with everything in it (similar to the directory I get when building, in Unity, for other platforms)? Or did I fail to do something else? I am supposed to use IL2CPP and VS2017, right (https://developer.microsoft.com/en-us/windows/mixed-reality/porting_guides)? (the problem without installing the VC++ 2015.3 v140 toolset was this error message: "MSbuild Error: The builds tools for v140 (Platform Toolset = 'v140') cannot be found").

    Thanks!
     
  2. plmx

    plmx

    Joined:
    Sep 10, 2015
    Posts:
    308
    Since the build target is basically the Windows Store, the solution is create an APPX, install that (using the provided Powershell command), and *then* run the app via the Windows menu.
     
  3. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,529
    ^ yeah, that's the right solution. Windows Store apps do not support double clicking on the executable.
     
    plmx likes this.
  4. Trancefate

    Trancefate

    Joined:
    Feb 26, 2018
    Posts:
    1
    If this is the case, how do I get this program to my friends? I'm not understanding how I'm supposed to share my project when EXE isn't running without special developer license you have to pay for...
     
  5. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,529
    Create AppX Package from generated VS project and share that. AppX packages can be double clicked.