Windows Application Package Project throws Could not load file or assembly for UWP project.

SmilingMoon 981 Reputation points
2021-10-19T20:50:11.61+00:00

141808-image.png

When running uwp app by itself, it runs perfect. When I add the uwp app to Windows Application Package Project (WAPP), it throws "Could not load file or assembly.." exception on the spot meeting the first "await".

Where can I specify the version of the library in WAPP? I cannot find any place for version specification.

UWP runs good by itself, but when run WAPP, the exception occurs. I think this is caused by mismatch of the referencing .NET library version between WAPP and UWP app itself. Where should I start from?

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

Accepted answer
  1. SmilingMoon 981 Reputation points
    2021-11-02T00:22:46.4+00:00

    After long struggle, here is the solution: create branch new projects from scratch.

    Nuget package issue is one thing.
    Also, there must be a bug in Package project. When I use the existing UWP project which has been submitted to Store many times, package project cannot find the dependencies.

    So, I created new UWP project and added to Package project and rebuild entire project little by little carefully: copying codes and adding the Nuget packages.
    It worked.

    0 comments No comments

0 additional answers

Sort by: Most helpful