【问题标题】:How to use specific version of nuget dll in solution如何在解决方案中使用特定版本的 nuget dll
【发布时间】:2018-09-10 09:19:01
【问题描述】:

AuthenticationResult 类型同时存在于Microsoft.AspNetCore.Authentication.Abstraction, Version 2.0.0.0Microsoft.AspNetCore.Authentication, Version=1.1.2.0

我想使用版本 1.1.2.0。我该怎么做?

【问题讨论】:

  • 它们当然没有相同的命名空间,所以使用它。

标签: c# .net asp.net-mvc nuget nuget-package


【解决方案1】:

如果您使用 Nuget 包管理器控制台安装包(这是最简单的安装方法),请参阅此 stackoverflow link,它演示了使用版本化包安装。

如果您使用工具/Nuget 包管理器菜单中的“管理 Nuget 包以解决方案”选项,则可以在选择要安装的包时从安装选项中显示的下拉列表中选择版本。

如果你已经安装了这两个包(我发现它们没有相同的命名空间),要使用特定的包版本,你可以将那个特定的命名空间导入到类中

【讨论】:

    猜你喜欢
    • 2013-09-07
    • 1970-01-01
    • 2014-11-01
    • 2022-06-29
    • 2016-04-18
    • 1970-01-01
    • 1970-01-01
    • 2013-02-02
    • 1970-01-01
    相关资源
    最近更新 更多