Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Resolved VS error when deploying Hololens2 app. Cannot find GameAssembly.lib

Discussion in 'AR' started by Fdo_decea, Jul 30, 2021.

  1. Fdo_decea

    Fdo_decea

    Joined:
    Jul 29, 2017
    Posts:
    12
    My client and me are having problems to deploy the app in his machine (in my machine it works perfectly), so he can test the app in his headset (we work remotely). He has cloned the project and I've checked via teamviewer that he has the correct Unity settings and VS settings.. I can remotely build the app successfully in Unity but when I try to build and deploy the vs solution via VS 2019, I always get the same error in his machine....

    This is the error (MapFileParser.exe / Cannot find GameAssembly.lib):



    It says that it cannot open the library GameAssembly.lib.. I realised that the Build folder does not contain the file GameAssembly.lib. Somehow that library is not being generated...

    Please, someone who can help me with this issue ? I've tried many things so far. The machine has all the tools, proper software versions, I've followed all the steps of MS official documentation....
    Also, I've tried with deploying via WIFI and USB, same result.


    Thanks!
     

    Attached Files:

  2. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    it probably fails to build for whatever reason that isn't being reported clearly. I'd check the "output" view in Visual Studio as it usually contains more info than the errors view for things like this.
     
  3. Fdo_decea

    Fdo_decea

    Joined:
    Jul 29, 2017
    Posts:
    12
    Thanks for replying !

    Please, could you specify what's the "output" view ? I don't see any window/tab with that name in VS..
     
  4. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    The Output window/tab in VS. Has a drop down to allow you to select different sources for viewing output from.
     
  5. Fdo_decea

    Fdo_decea

    Joined:
    Jul 29, 2017
    Posts:
    12
    Sorry for the ignorance, but I cannot find the dropdown that you are mentioning...
     

    Attached Files:

  6. Fdo_decea

    Fdo_decea

    Joined:
    Jul 29, 2017
    Posts:
    12
    hmmm okay I guess I found it :)

    upload_2021-8-1_23-46-38.png
     
  7. Fdo_decea

    Fdo_decea

    Joined:
    Jul 29, 2017
    Posts:
    12
    It looks like the Output doesn't say too much extra info, isn't it?...
    Code (CSharp):
    1. Build started...
    2. 1>------ Build started: Project: Il2CppOutputProject, Configuration: Release ARM64 ------
    3. 1>Building GameAssembly.dll with MsvcWinRtToolChain
    4. 1>    Msvc Install Version: 15.0
    5. 1>    Msvc Install SDK Directory: C:\Program Files (x86)\Windows Kits\10
    6. 1>    Msvc Linker Path: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30037\bin\HostX64\ARM64\link.exe
    7. 1>    Msvc Compiler Path: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30037\bin\HostX64\ARM64\cl.exe
    8. 1>
    9. 1>    Output directory: C:\WETRepositories\Wetbaseball BP\ws_baseball\ws_baseball\ws_baseball\Build\Test\build\bin\ARM64\Release
    10. 1>    Cache directory: C:\WETRepositories\Wetbaseball BP\ws_baseball\ws_baseball\ws_baseball\Build\Test\build\obj\il2cppOutputProject\ARM64\Release
    11. 1>il2cpp.exe didn't catch exception: System.IO.IOException: Data error (cyclic redundancy check).
    12. 1>
    13. 1>   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    14. 1>   at System.IO.FileStream.ReadCore(Byte[] buffer, Int32 offset, Int32 count)
    15. 1>   at System.IO.FileStream.Read(Byte[] array, Int32 offset, Int32 count)
    16. 1>   at System.Security.Cryptography.HashAlgorithm.ComputeHash(Stream inputStream)
    17. 1>   at Unity.IL2CPP.Common.HashTools.HashOfFile(NPath path)
    18. 1>   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
    19. 1>   at System.String.Concat(IEnumerable`1 values)
    20. 1>   at Unity.IL2CPP.Building.Hashing.FileHashProvider.HashOfAllFilesWithProviderExtensionInDirectory(NPath directory)
    21. 1>   at Unity.IL2CPP.Building.Hashing.HeaderFileHashProvider.Initialize(IEnumerable`1 cppSourceCompileInstructions)
    22. 1>   at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    23. 1>   at il2cpp.Program.DoRun(String[] args, List`1 foundAssemblies)
    24. 1>   at il2cpp.Program.Run(String[] args, Boolean setInvariantCulture)
    25. 1>   at il2cpp.Program.Main(String[] args)
    26. 1>
    27. 1>Unhandled Exception: System.IO.IOException: Data error (cyclic redundancy check).
    28. 1>
    29. 1>   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    30. 1>   at System.IO.FileStream.ReadCore(Byte[] buffer, Int32 offset, Int32 count)
    31. 1>   at System.IO.FileStream.Read(Byte[] array, Int32 offset, Int32 count)
    32. 1>   at System.Security.Cryptography.HashAlgorithm.ComputeHash(Stream inputStream)
    33. 1>   at Unity.IL2CPP.Common.HashTools.HashOfFile(NPath path)
    34. 1>   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
    35. 1>   at System.String.Concat(IEnumerable`1 values)
    36. 1>   at Unity.IL2CPP.Building.Hashing.FileHashProvider.HashOfAllFilesWithProviderExtensionInDirectory(NPath directory)
    37. 1>   at Unity.IL2CPP.Building.Hashing.HeaderFileHashProvider.Initialize(IEnumerable`1 cppSourceCompileInstructions)
    38. 1>   at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    39. 1>   at il2cpp.Program.DoRun(String[] args, List`1 foundAssemblies)
    40. 1>   at il2cpp.Program.Run(String[] args, Boolean setInvariantCulture)
    41. 1>   at il2cpp.Program.Main(String[] args)
    42. 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(46,5): error MSB3073: The command ""C:\WETRepositories\Wetbaseball BP\ws_baseball\ws_baseball\ws_baseball\Build\Test\Il2CppOutputProject\\IL2CPP\build\deploy\net471\il2cpp.exe" --libil2cpp-static --compile-cpp -architecture=ARM64 -configuration=Release -platform=winrt -outputpath="C:\WETRepositories\Wetbaseball BP\ws_baseball\ws_baseball\ws_baseball\Build\Test\\build\bin\ARM64\Release\GameAssembly.dll" --data-folder="C:\WETRepositories\Wetbaseball BP\ws_baseball\ws_baseball\ws_baseball\Build\Test\\build\bin\ARM64\Release\\" -cachedirectory="C:\WETRepositories\Wetbaseball BP\ws_baseball\ws_baseball\ws_baseball\Build\Test\\build\obj\il2cppOutputProject\ARM64\Release\\" -generatedcppdir="C:\WETRepositories\Wetbaseball BP\ws_baseball\ws_baseball\ws_baseball\Build\Test\Il2CppOutputProject\\Source"  --profiler-report --additional-defines=WINDOWS_UWP --additional-defines=UNITY_UWP --additional-defines=UNITY_WSA_10_0 --additional-defines=UNITY_WSA --additional-defines=UNITY_WINRT --additional-defines=PLATFORM_WINRT -dotnetprofile=unityaot -verbose --relative-data-path=Data/il2cpp_data --map-file-parser="C:\WETRepositories\Wetbaseball BP\ws_baseball\ws_baseball\ws_baseball\Build\Test\Il2CppOutputProject\\IL2CPP\MapFileParser\MapFileParser.exe" --compiler-flags="-d2ssa-cfg-jt-"" exited with code -532462766.
    43. 1>Done building project "Il2CppOutputProject.vcxproj" -- FAILED.
    44. 2>------ Build started: Project: WetBaseballClean, Configuration: Release ARM64 ------
    45. 2>LINK : fatal error LNK1181: cannot open input file 'C:\WETRepositories\Wetbaseball BP\ws_baseball\ws_baseball\ws_baseball\Build\Test\build\bin\ARM64\Release\GameAssembly.lib'
    46. 2>Done building project "WetBaseballClean.vcxproj" -- FAILED.
    47. ========== Build: 0 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========
    48. ========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========
    49.  
     
  8. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    @Fdo_decea

    This is not an error message I have seen before. Is there a virus scanner program running on this machine? I wonder if it is intercepting the file access and causing some problems.
     
    dcasunity likes this.
  9. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    There could also be a problem with the disk causing this.