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. Dismiss Notice

Compile issue for Windows store app

Discussion in 'Windows' started by Jase-NZ, Jun 11, 2014.

  1. Jase-NZ

    Jase-NZ

    Joined:
    Jul 31, 2013
    Posts:
    26
    Hi there,
    I have the Windows Dev kit for Windows 8.1 installed on the D drive.
    Yet when compiling for Windows Store App I get the following error.

    Could not start compilationException: 'C:\Program Files (x86)\Windows Kits\8.1\References\CommonConfiguration\Neutral\Windows.winmd' not found, do you have Windows 8.1 SDK installed?
    UnityEditor.Scripting.Compilers.MicrosoftCSharpCompiler.StartCompiler () (at C:/BuildAgent/work/aeedb04a1292f85a/Editor/Mono/Scripting/Compilers/MicrosoftCSharpCompiler.cs:138)
    UnityEditor.Scripting.Compilers.ScriptCompilerBase.BeginCompiling () (at C:/BuildAgent/work/aeedb04a1292f85a/Editor/Mono/Scripting/Compilers/ScriptCompilerBase.cs:47)
    UnityEditor.HostView:OnGUI()

    Anyone else have this issue? Is there a way to tell Unity that it's actually installed on a different drive?

    update: I can create a Windows Store App from Visual Studio though.

    kind regards
    jase
     
    Last edited: Jun 11, 2014
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,491
    Looks like a bug.. could you fill a bug report?

    In the meanwhile, we can look for a workaround. Could find the exact path where the windows.winmd file is located?
     
  3. Jase-NZ

    Jase-NZ

    Joined:
    Jul 31, 2013
    Posts:
    26
    Hi Tautvydas,
    No worries will do.
    The path I have is D:\Program Files (x86)\Windows Kits\8.1\References\CommonConfiguration\Neutral
    I have all Apps on D: and only the OS on C: (small SSD).

    kind regards
    jase
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,491
    Alright I found a workaround for you. It's pretty ugly, but should do the trick for now, until the bug is fixed.

    Create a new .bat file next to Unity.exe with such content:

    Code (csharp):
    1. set ProgramFiles(x86)=D:\Program Files (x86)
    2. start unity.exe
    Then, use this bat file to launch unity, instead of the real executable. You can change all Unity shortcuts to target this file instead of the .exe, so you don't have to go looking for it every time.
     
  5. Jase-NZ

    Jase-NZ

    Joined:
    Jul 31, 2013
    Posts:
    26
    Hi there,
    that resolved that part, but unfortunately i now have the following

    Could not start compilationDirectoryNotFoundException: Directory 'D:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5.1' not found.
    System.IO.Directory.GetFileSystemEntries (System.String path, System.String searchPattern, FileAttributes mask, FileAttributes attrs) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.IO/Directory.cs:514)
    System.IO.Directory.GetFiles (System.String path, System.String searchPattern) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.IO/Directory.cs:308)
    UnityEditor.Scripting.Compilers.MicrosoftCSharpCompiler.GetNETMetroAssemblies () (at C:/BuildAgent/work/aeedb04a1292f85a/Editor/Mono/Scripting/Compilers/MicrosoftCSharpCompiler.cs:70)
    UnityEditor.Scripting.Compilers.MicrosoftCSharpCompiler.StartCompiler () (at C:/BuildAgent/work/aeedb04a1292f85a/Editor/Mono/Scripting/Compilers/MicrosoftCSharpCompiler.cs:143)
    UnityEditor.Scripting.Compilers.ScriptCompilerBase.BeginCompiling () (at C:/BuildAgent/work/aeedb04a1292f85a/Editor/Mono/Scripting/Compilers/ScriptCompilerBase.cs:47)
    UnityEditor.HostView:OnGUI()

    since one doesn't have the choice on the install path of .net but one does have the choice over sdk's.

    kind regards
    jase
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,491
    Okay, this could get ugly.

    Are you using any WINRT APIs in your scripts that are guarded with #if NETFX_CORE/#endif? If not, you could switch to Mono compiler for scripts in player settings (under compilation overrides, select 'none').

    Another option would be to copy all the files from "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5.1" to "D:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5.1".
     
  7. Jase-NZ

    Jase-NZ

    Joined:
    Jul 31, 2013
    Posts:
    26
    I've copied over the .net framework and it seems to be working for now. I might re-install some things to remove this issue, as updates wont work with copied files - Thanks for your help.

    kind regards
    jason
     
  8. Christopher-Anderson-GISP

    Christopher-Anderson-GISP

    Joined:
    Mar 5, 2015
    Posts:
    15
    I'm having a similar issue. i have unity 5.3 installed on a win8.1 machine. Below is my path. if you'll notice the folder is named .NETFramework instead of .NETCore. I am unable to change the name. has this bug not been fixed yet?
    C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1
     
  9. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,491
    The bug that the OP encountered has been fixed a while ago (probably for over a year).

    ".NETFramework" is definitely not the correct path. ".NETFramework" is for desktop applications, while for Windows Store applications have to use ".NETCore".

    Maybe you actually don't have the SDK installed, just like the error message says??