Search Unity

[UWP][NET] System.IO.DirectoryNotFoundException (wrong path)

Discussion in 'Windows' started by nmuchetti, May 17, 2019.

  1. nmuchetti

    nmuchetti

    Joined:
    May 17, 2019
    Posts:
    9
    Hello,
    when i try to compile the Unity UWP version in Visual Studio i get this error:


    System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\Mariano A\Dektop\PROYECTOS\90sF\SVN\source\Purple Soccer\Builds\xbox 44 20174 3\Golazo\UnityEngine.Networking.dll'.
    1> at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    1> at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
    1> at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
    1> at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters)
    1> at Unity.LoadModulesStep.Execute()
    1> at Unity.Step.Execute(OperationContext operationContext, IStepContext previousStepContext)
    1> at Unity.Operation.Execute()
    1> at Unity.Program.Main(String[] args)

    If you see in the filepath, says "Dektop" instead of "Desktop", i dont know why, i search for this word in the entire visual studio and unity project but i didnt founded anything.
    How i should fix this problem?

    thanks
     
  2. nmuchetti

    nmuchetti

    Joined:
    May 17, 2019
    Posts:
    9
    i changed the directory and it worked
     
  3. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    This used to happen with builds that were in long paths. However, I thought we fixed it. Are you on a very old Unity version?
     
  4. nmuchetti

    nmuchetti

    Joined:
    May 17, 2019
    Posts:
    9
    yes, its fixed, using a shortest path.

    im using unity 2017.4.27
     
  5. Bimbuh

    Bimbuh

    Joined:
    Dec 21, 2018
    Posts:
    12
    I'm currently using Unity 2019.3 and still have the same problem. In my case however, I can't even set the SDK path. When I go to "Edit --> Preferences > External tools and set the path followed by going to Build Settings to build the apk file, the build settings window appears weird and incomplete, followed by about 10 lines having errors of the like...
    DirectoryNotFoundException: Could not find a part of the path 'E:\Carlson\UASDK\build-tools'.

    System.IO.__Error.WinIOError (System.Int32 errorCode, System.String maybeFullPath) (at...)

    'E:\Carlson\UASDK\build-tools'. this path isn't even supposed to be like this, it should be 'tools' and not 'build-tools', I don't know why unity added the 'build' in the error message, of which tmy path or the sdk I extracted upon downloading, has no 'builb-tools'
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    This looks unrelated: you're building for Android, not UWP. Post on the Android forums please.
     
  7. Varaughe

    Varaughe

    Joined:
    Apr 22, 2013
    Posts:
    40
    I try to build for UWP and I get this error:

    DirectoryNotFoundException: Could not find a part of the path "C:\Program Files (x86)\Windows Kits\10\References\10.0.19041.0\Windows.ApplicationModel.CommunicationBlocking.CommunicationBlockingContract\2.0.0.0\Windows.ApplicationModel.CommunicationBlocking.CommunicationBlockingContract.winmd" or "Temp\StagingArea\Data\Managed\Windows.ApplicationModel.CommunicationBlocking.CommunicationBlockingContract.winmd"

    Has anyone any idea?