【问题标题】:'System.Security.Cryptography.ProtectedData', version: '4.4.0' can not be found'System.Security.Cryptography.ProtectedData',版本:'4.4.0' 找不到
【发布时间】:2018-06-22 13:32:58
【问题描述】:

我正在尝试在 Windows Server 2012 Datacenter 上部署 .NET Core 应用程序。

我已经安装了.NET Core Windows Server Hosting bundle 并且还确保安装了uCRT(手动安装)

通过执行dotnet assemblyname.dll 我收到此错误:

错误:应用程序依赖项中指定的程序集 未找到清单(program_name.deps.json): 包:'System.Security.Cryptography.ProtectedData',版本:'4.4.0' 路径:'runtimes/win/lib/netstandard2.0/System.Security.Cryptography.Protecte dData.dll'

我在 Google 上四处搜索,但找不到问题以及如何解决它。 是什么问题,我应该如何解决?

【问题讨论】:

  • 也许this article是一个类似的问题和答案。
  • 亲爱的@kunif,这只是解释了这个问题,这是我问题的第一部分。第二部分在那里没有答案。事实上,它甚至没有回答第一部分。
  • 那么this article相似的可能性有多大?

标签: c# deployment server .net-core


【解决方案1】:

确保在您的应用程序根目录下有一个runtimes 文件夹。我自己之前遇到过这个问题。

就我而言,我正在对发布目录执行robocopy,并且没有使用/S(或/E)标志来复制子目录。使用这些标志可确保目标站点上存在 runtimes 文件夹,然后我的应用程序运行时没有出现异常。

运行应用程序的 .dll 的整个相对路径应该是: .\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-09-04
    • 1970-01-01
    • 2012-04-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-01-01
    相关资源
    最近更新 更多