.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

安装完成后编译就正常了。

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