A community member has associated this post with a similar question:
Windows Application Package Project throws Could not load file or assembly for UWP project.

Only moderators can edit this content.

Is this Nuget Pkg bug or Windows Application Package Project bug - Could not load file or assembly for UWP app added to the package.

SmilingMoon 981 Reputation points
2021-10-21T17:10:24.307+00:00

When running uwp app by itself, it runs perfect.
But when I add the uwp app to Windows Application Package Project (WAPP) and run WAPP, it throws "Could not load file or assembly.." exception.

142497-image.png

I debugged and pinpointed what caused the issue.
When I add NuGet package "System.Linq.Dyamic.Core" or "BingMapsRESTToolkit.Standard", the issue happens.
All works OK before installing the package to TestUWP project. When I uninstall those, they work again.

I created and uploaded the test projects with a solution in one zip file to onedrive: https://1drv.ms/u/s!AqB-HjXxUE9ngeJIpq7KnBsnPqvdSA?e=r2G3vJ

142539-image.png

Do I have to give up using those packages?
Or, I have to report the bug to the Nuget package community?
Or, this is a bug caused by MS WAPP project that does not handle those cases?

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,399 questions
Universal Windows Platform (UWP)
{count} votes