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.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Can't compile using Visual Studio 2015

Discussion in 'Windows' started by monark, Sep 30, 2015.

  1. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,595
    Apologises if this is answered somewhere, so far all my searches have drawn a blank.

    I have Unity 5.2.1p1 installed along with the Community version of Visual Studio 2015.
    No matter what additional SDKs I try and install I always get the following errors, and have been unable to get a successful build for any Windows Store platform.

    For Windows Universal 8.1
    For Windows Universal 10

    Any details on how to clear these missing file errors, they appear to be down to Visual Studio missing files but none of the SDK links I've followed and installed from seem to fix the issue.
     
  2. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,595
  3. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,595
    Hmm still can't build Universal 10 apps.... :(
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,527
    Hey, when you installed VS 2015, did you check the checkbox for "Windows Universal Apps"? It's not checked by default, and if it's not installed, you won't be able to build in Unity.
     
  5. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,595
    I didn't but then as per that blog I went through and did a "modify" and added all the components they suggested.
    I now have a ton more stuff in MSbuild. Is this something separate to that?

    I can build 8.1 apps now but the Universals still give an error.
     
  6. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,595
    Ah ok, looks like that option is still unchecked, I'll try added those tools too.
     
  7. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,595
    So having jumped though several hoops, including having to upgrade to Windows 10, I have now managed to install the "Windows Universal Apps" option. Unfortunately I still get the following error

     
  8. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,668
    Which version do you use?
    Because I think we release a fix for this UniversalApiContract bug.
     
  9. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,595
    5.2.1p2
     
  10. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,668
  11. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,595
    just trying 5.2.1p4
     
  12. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,595
    So it now complies without errors but when I open the Visual Studio project it says there's nothing there to run. Solution has 0 projects. I'm not very familiar with VS 2015 any ideas what is going on now?
     
  13. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,527
    That's strange.. are you sure you built to an empty folder after upgrading Unity version? Did you open the right solution file?
     
  14. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,595
    Yes and yes. I deleted the entire build folder and rebuilt from scratch.

    I also did a rebuild and run which throws this error

     
  15. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,527
    Looks like our forum truncated your message. Can you upload the log here and post the link?

    http://pastebin.com
     
  16. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,595
    Where it says "truncated" at the end that was the Unity console. Is a complete log created somewhere else?
     
  17. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,595
    I've found it, try this

     
  18. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,527
    The log file is put here:

    Code (csharp):
    1. %LOCALAPPDATA%\Unity\Editor\Editor.log
    Since you mentioned it's truncated in Unity console, did you try instead of hitting "build and run", do "build", then open VS solution and running from there?
     
  19. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,595
    Yes that was the first thing I posted about, well the first thing I posted after finally getting it to work at all

    I also posted the output from the editor log just above your last reply....
     
  20. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,527
    The editor log you posted doesn't contain the failure. It gets deleted everytime you launch Unity - you probably reproduced the issue in previous session.
     
  21. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,595
    Oh right it had Crash!!! in it so I assumed that was the one.
     
  22. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,595
    Try this one, just redone from "build and run"

     
  23. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,527
    Looks like that's the issue. There is a known bug (that was fixed internally last week) that makes apps targeting Windows 10 have wrong default icon sizes.

    As a workaround, build to a folder (rather than clicking build and run), open up the generated ".sln" file, and run from there.
     
  24. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,595
    Ah opening the .sln (which was what I was doing before) is finally showing up a solution and letting me build it! hurrah.
     
  25. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,668
    Yes, unfortunately build&run is quite unreliable, I'd advise against using it. It hardly saves you any time.
     
  26. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,595
    Quite happy not to use it, I was just having trouble opening the .sln file before as it didn't contain anything, not sure what has changed. The only thing I did differently was use build and run wait for it to fail then open the .sln file.