'Blazor WASM app "Cannot load file or assembly" for referenced project

I have an ASP.NET hosted Blazor WASM app (.net 6) that references a .net 6 class library named xxxxxx.Contracts which is a library shared between the client and the server.

This has been working just find for some time, but suddenly when I try to run my app I get an exception as soon as any reference is made to any of the types within that class library.

Does anyone know why?

Network and console windows



Solution 1:[1]

Cleaning the solution didn't work, but deleting all the bin/obj folders then rebuilding the app did. I used the cleanup tool.

https://www.nuget.org/packages/dotnet-cleanup/

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Peter Morris