I need to integrate a C# xaml library on uwp. I refer to this(https://github.com/TautvydasZilys/unity-uwp-il2cpp-with-csharp-project-example) to modify the post-generation project the modification works on unity 2019, But on Unity 2020, a prompt box of `Load GameAssembly fail` will appear. Does anyone know this problem? What is the possible reason?
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.
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.
i have checked this, copy the GameAssembly.dll to the path, is the same result. have you try your project (https://github.com/TautvydasZilys/unity-uwp-il2cpp-with-csharp-project-example) on `untiy 2020.3`
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>