.net core wpf編譯錯誤 Could not find assembly 'System.Runtime.InteropServices.PInvoke, Version=4.0.0.0

今天測試.net core 3.1下的WPF程序,編譯時出現如下錯誤:

'Could not find assembly 'System.Runtime.InteropServices.PInvoke, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

執行Nuget安裝包指令:

 Install-Package System.Runtime.InteropServices.PInvoke -Version 4.0.0-rc2-24027 -Source https://dotnet.myget.org/F/dotnet-core/api/v3/index.json

安裝完成後編譯就正常了。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章