Search Unity

Cannot build 2018.2.6f1 App from Visual Studio 2017

Discussion in 'Windows' started by redmotion_games, Sep 8, 2018.

  1. redmotion_games

    redmotion_games

    Joined:
    May 6, 2013
    Posts:
    84
    Export from Unity 2018.2.6f1 using these settings appears to work fine. (Running on Windows 10 x64)
    Build settings
    UWP Build settings.JPG
    Project Settings
    UWP Project config settings.jpg

    Question: Is this config above going to work? Is there a link to an updated guide for 2018?

    But when I open the project with Visual Studio 2017 and get this error:


    E:\UnityProjects2018\_builds\xxxxx_UWP\Il2CppOutputProject\Il2CppOutputProject.vcxproj : warning : The build tools for Visual Studio 2015 (v140) cannot be found. Install Visual Studio 2015 (v140) to build using the Visual Studio 2015 (v140) build tools.

    error : Designtime build failed for project 'E:\UnityProjects2018\_builds\xxxxx_UWP\xxxxx\xxxxx.vcxproj' configuration 'Debug|ARM'. IntelliSense might be unavailable.
    Set environment variable TRACEDESIGNTIME = true and restart Visual Studio to investigate.


    Question: Can I use VS2017 to build a UWP app? Or must I download and use VS2015? If 2015 must be used which SDK version works with 2015?

    I have tried Retargeting the solution to v141 - doesn't make a difference as trying to run a debug x64 build on Local Machine gets error:-

    MSB3774: Could not find SDK "WindowsMobile, Version=10.0.17134.0".

    Many thanks in advance,
    Jason.
     
    Last edited: Sep 8, 2018
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    You can definitely use VS2017. In fact, that's actually recommended. However, you need to make sure you have UWP components installed in VS2017. Things I'd check these are installed (that's the list I took from what's installed on my machine, and it works fine):

    "Desktop development with C++"
    "VC++ 2017 version 15.x v14.yz latest v141 tools"
    "Windows 10 SDK (10.0.17134.0)"
    "Universal Windows Platform development"
    "C++ Universal Windows Platform tools"
    "Visual Studio C++ core features"
    "Windows Universal CRT SDK"
    "Visual C++ compilers and libraries for ARM"
    "Visual C++ runtime for UWP"
    "Windows Universal C Runtime"
    "Visual Studio Tools for Unity"
     
  3. redmotion_games

    redmotion_games

    Joined:
    May 6, 2013
    Posts:
    84
    Thanks for your assistance. I've updated the SDK with any missing components through VS2017 Menu > Tool > Get Tools and Features... All those mentioned in your post are now installed.

    Still giving the same error.

    As a test I used VS2017 to create a blank project with build 17134 as min and max target and this ran as Debug/x64 without issues.

    EDIT: An almost blank unity project with one scene containing some unity 3d primitives and no scripts did not.
     
    Last edited: Sep 10, 2018
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Very weird. Do you mind uninstalling and reinstalling Windows 10 SDK? Something there is corrupted, as that is a component that should get installed together with it.
     
  5. redmotion_games

    redmotion_games

    Joined:
    May 6, 2013
    Posts:
    84
    Thanks. I reinstalled everything. It seems to be building almost to the end but now it's a giving a different error now (this is trying to build a very simple test app using the UI in 2d with two text boxes and a button + 1 script):

    DEP0700: Registration of the app failed. [0x80073CF6] AppxManifest.xml(28,27): error 0x80070002: Cannot install or update package Template2D_0pysakmy80jjp because the splash screen image [SplashScreen.png] cannot be located. Verify that the package contains an image that can be used as a splash screen for the application, and that the package manifest points to the correct location in the package where this splash screen image can be found.


    If I right click and build the solution I do get an exe file but when I try to run it I get these two error dialogs:
    exe run error 1.JPG exe run error 2.JPG
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
  7. Oscar-Tsang

    Oscar-Tsang

    Joined:
    Nov 7, 2012
    Posts:
    84
    I have told unity before the generated project have bugs. But Unity never try to correct it. If you want to use unity generated project you must install visual studio 2015.

    Or, for every generated project file, open "ll2CppOutputProject.vcxproj" and find "v140" change to "v141". Then It will work fine even no visual studio 2015 installed.
     
  8. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    What's the case #?
     
  9. visionman50

    visionman50

    Joined:
    Dec 19, 2017
    Posts:
    40
    hi. well using the jaws for windows screen reader, from http://www.freedomscientific.com and also using nvda from http://www.nvaccess.org, and using windows 10 64 bit pro desktop on a toshiba satellite pro and using unity 2018.2.6 64 bit pro, and got a ten pin bowling game BowlMaster and got a couple of static scripts. it starts to build gets to 66 or 99 %, then does not build and no exe and using visual studio 2017 community 15.8.3 latest updated version. so any ideas, why it is not building. this is an assignment for a course and never had this problem before. any ideas. thanks.ps: did try googling, but cannot seem to find an answer why.and in australia.
     
  10. visionman50

    visionman50

    Joined:
    Dec 19, 2017
    Posts:
    40
    wknow. any ideas. frustrated, it starts to build, then don't hear the run dialog, and got visual studio 2017, and no errors when i built and then got a couple of static scripts, so any ideas. how to fix. this is an assignment for a course but my lecturer is off sick, and tried googling and asked a sighted friend, but waiting to hear back from him. any ideas. thanks.ps: did build in visual studio, but no way to then run as an exe. how to do this.
     
  11. redmotion_games

    redmotion_games

    Joined:
    May 6, 2013
    Posts:
    84
    You can't run UWP exes, you have to build and install a package by right clicking on the project and clicking on Store > Create App Packages. And once it's built, you have to rightclick on the .ps1 file and "run with powershell".
    -----------------------------
    Thanks Tautvydas-Zilys, I'm now able to build, install and run the windows app after editing the project file as described in this post:-
    https://forum.unity.com/threads/vs-...unity-2018-2-cant-deploy.545496/#post-3599784
    But while it is running fine on my machine, someone I need to send it to for testing (having issue with touchscreen keyboard not popping up - touchscreen laptop), cannot install it due to issues with the certificates.

    I built the package using the sideloading option.
     
  12. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
  13. ProgOrion

    ProgOrion

    Joined:
    Nov 27, 2016
    Posts:
    13
    Hello,
    I have the same issue from the very first post in this thread. I've tried to reinstall visual studio and all of the components from your list, but unfortunately, it didn't help. Do you have any further advice?
     
  14. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Which error is that? Can you copy paste the whole contents of Visual Studio output window?
     
  15. ProgOrion

    ProgOrion

    Joined:
    Nov 27, 2016
    Posts:
    13
    Sure.

    "
    d:\PROJECTS\2018_win_10_test\ComputerTycoon\Build_Steam_Version_For_Windows_Store\Il2CppOutputProject\Il2CppOutputProject.vcxproj : warning : The build tools for Visual Studio 2015 (v140) cannot be found. Install Visual Studio 2015 (v140) to build using the Visual Studio 2015 (v140) build tools.

    error : Designtime build failed for project 'd:\PROJECTS\2018_win_10_test\ComputerTycoon\Build_Steam_Version_For_Windows_Store\Computer Tycoon\Computer Tycoon.vcxproj' configuration 'Debug|Win32'. IntelliSense might be unavailable.
    Set environment variable TRACEDESIGNTIME = true and restart Visual Studio to investigate.
    "

    And when I'm trying to build:

    "MSB3774: Could not find SDK "WindowsMobile, Version=10.0.17134.0"."
     
  16. ProgOrion

    ProgOrion

    Joined:
    Nov 27, 2016
    Posts:
    13

    I have found the solution to my problem eventually:
    • "ShawnFeatherly
      October 2016


      I got this error as well. A Msft-ie named Jamie spotted the issue. For some reason Unity was including phone stuff in the Visual Studio solution it shouldn't have. To find the bad extras, go to each project in the Visual Studio solution explorer, then click references. If you see any yellow warning icons on a reference, remove that reference. Rebuild and comment out any lines the compiler complains about no longer working (should just be one line)"
    source:
    https://forums.hololens.com/discussion/1879/deploy-error

    I won't support mobile, Unity was set to "PC" instead of all or mobile. If somebody would like to support mobile, then I'm not sure if this solution is good for them or not. But indeed, in my project, I had a yellow reference and removing it made my project to build successfully.