After migrating from packages.config to PackageReferences (.NET4.5 Project) the build (msbuild) is broken.
error CS0246: The type or namespace name 'anynugetpackage' could not be found (are you missing a using directive or an assembly reference?)
Building with VisualStudio works perfectly. So I did a little research and found out that the restore of the packages also works fine with msbuild.
The problem only exists for shared projects (.shproj) where the reference of the PackageReference is not applied correctly.
A workaround is to add a fix reference to the PackageReference's lib, but like this I lose all advantages of PackageReference compared to the packages.config
You can have a look at the project and the different solutions (branches):
packages.config
PackageReference
PackageReferenceWorkaround
For build and errorlog see github actions.
Is there any better way to handle it?