半吊子的程序狗 2020-07-06 09:20 采纳率: 0%
浏览 478
已采纳

nuget安裝mongodb.driver報錯

求助:nuget安裝mongodb.driver報錯,錯誤信息如下:

嘗試載入專案屬性視窗時發生錯誤。請關閉視窗後再試一次。
無效的靜態方法引動過程語法: "[MSBuild]::IsOsPlatform('Windows')"。找不到方法 '[MSBuild]::IsOsPlatform'。 靜態方法引動過程的格式應為: $([FullTypeName]::Method()),例如 $([System.IO.Path]::Combine(a, b))。 D:\TestMongoDB\testMongo\packages\MongoDB.Libmongocrypt.1.0.0\build\MongoDB.Libmongocrypt.targets

https://stackoverflow.com/questions/59583165/how-to-install-mongodb-driver-in-visual-studio-2013,
解決辦法:Removed the condition from project file and then worked

  • 写回答

1条回答 默认 最新

  • threenewbee 2020-07-06 15:29
    关注

    MSBuild]::IsOsPlatform('Windows')
    不支持调用 IsOsPlatform
    如果你肯定是windows版本,简单去掉,就能编译了

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?