@Maurizio Bonelli , Welcome to Microsoft Q&A, based on my research, I could solve the above error.
First, please install Nuget-Package System.Runtime.WindowsRuntime
.
Second, please add Windows.winmd from the following path:
C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.19041.0
Like the following:
Third, please rebuild your project and you will see the project is built successfully.
Hope my solution could help you.
Best Regards,
Jack
If the answer is the right solution, please click "Accept Answer" and upvote it.If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.