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

Load GameAssembly.dll failed

Discussion in 'Windows' started by hugohuang, May 2, 2021.

  1. hugohuang

    hugohuang

    Joined:
    Nov 20, 2016
    Posts:
    4
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,505
    Where does the error box appear? Can you show a screenshot?
     
  3. hugohuang

    hugohuang

    Joined:
    Nov 20, 2016
    Posts:
    4
    this is a sample project which can reproduce this issue
    https://github.com/sdkbox/AdDealsUnitySample

    1. open with unity 2020.3.6
    2. export uwp + build type: xaml project
    3. open the generated project with vs 2019
    4. launch in vs 2019 (x64)
    5. launch failed.

    If I switch to unity 2019 and perform steps 2-5 above, then work fine.

    I didn't see any error logs. So I don't know why.

    thanks.
     

    Attached Files:

  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,505
    I suspect the project is misconfigured and doesn't copy GameAssembly.dll to the final app directory.
     
  5. hugohuang

    hugohuang

    Joined:
    Nov 20, 2016
    Posts:
    4
    i compare the output between unity 2019 with unity 2020, it's same.
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,505
    When you get that error dialog, don't close it. Instead, alt tab, open task manager, find your game in it in the "Details" tab, right click it and press Open File Location. Is GameAssembly.dll in that folder? If it's not, it means the project is either misconfigured or doesn't properly build.
     
  7. hugohuang

    hugohuang

    Joined:
    Nov 20, 2016
    Posts:
    4
  8. Wilderness378

    Wilderness378

    Joined:
    Nov 8, 2021
    Posts:
    1
    I met the same issue today. I add the following config to the c# project file and the problme is fixed for me on 2020.3 and 2021.2


    <ItemGroup>
    <!--Add this line-->
    <Content Include="$(UnityWSAPlayerDir)Players\UAP\il2cpp\$(PlatformTarget)\$(Configuration)\baselib.dll" />
    <Content Include="$(SolutionDir)build\bin\$(Platform)\$(Configuration)\GameAssembly.dll" />
    <Content Include="$(SolutionDir)build\bin\$(Platform)\$(Configuration)\GameAssembly.pdb" />
    </ItemGroup>
     
  9. ErrorList

    ErrorList

    Joined:
    May 27, 2016
    Posts:
    1
    Could you clarify more about c# prolect file where u placed the above config?