【问题标题】:SSH.NET with Azure Functions on Visual Studio 2015SSH.NET 与 Visual Studio 2015 上的 Azure Functions
【发布时间】:2017-08-22 10:18:11
【问题描述】:

我正在尝试使用 Visual Studio 2015 运行具有 Azure 功能的简单 SFTP 客户端。 问题是我不知道如何将 nuget 引用添加到 SSH.NET。 在project.json已尝试添加:

{
"net40": {
  "dependencies": {
    "Renci.SshNet": "2016.0.0.0"
  }
}

} }

我也尝试过使用"net46:",但无论我做什么,我都会收到NotFound https://api.nuget.org/v3-flatcontainer/renci.sshnet/index.json

稍后我可能需要添加更多 nuget 包,所以我想知道如何将 nuget 包添加到我的函数项目中

【问题讨论】:

    标签: azure visual-studio-2015 nuget azure-functions ssh.net


    【解决方案1】:

    试试这个

    {
      "frameworks": {
        "net46": {
          "dependencies": {
            "SSH.NET": "2016.0.0"
          }
        }
      }
    }
    

    编辑:另请注意,Visual Studio 2017 中的新工具将标准 .NET csproj 与标准 nuget 和其他 VS 工具一起用于这些依赖项,因此可能值得一试。

    【讨论】:

    • 这确实有效!我不再收到有关 nuget 包的任何投诉。但是我的代码都不能使用它?! “使用 Renci.SshNet”和我的所有相关代码都无法识别
    最近更新 更多