skuill / LyricsScraperNET

🎼 LyricsScraperNET is a .NET library to search for lyrics of a song from the web.
MIT License
5 stars 1 forks source link

Could not find assembly 'System.Runtime.InteropServices.PInvoke' #8

Closed russkyc closed 1 year ago

russkyc commented 1 year ago

Bug

Build fails after updating to v1.1.0 in both .net6 and .net7 avalonia and wpf projects after updating to v1.1.0

Error:

Microsoft.WinFX.targets(211, 9): [MC1000] Unknown build error, 'Could not find assembly 'System.Runtime.InteropServices.PInvoke, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Either explicitly load this assembly using a method such as LoadFromAssemblyPath() or use a MetadataAssemblyResolver that returns a valid assembly.' 

Environment

skuill commented 1 year ago

Hi @russkyc ! Thank you for finding this issue. The problem is reproduced. The reason is the addition of a new MusixmatchClientLib library to the project, which removes the assembly: image Adding the System.Runtime.InteropServices or System.Runtime.InteropServices.RuntimeInformation nuget packages did not resolve the issue.. I am working on a fix. As soon as I can fix it, I will let you know. Temporarily please stay on the previous version :)

skuill commented 1 year ago

Hi @russkyc! The problem should be fixed in release 1.1.1. Can you please check that the project build with the new version?

russkyc commented 1 year ago

Just tested, @skuill Project now compiles and works normally, thanks for resolving the issue!