'System.Security.Cryptography.ProtectedData',版本:'4.4.0'找不到 [英] 'System.Security.Cryptography.ProtectedData', version: '4.4.0' can not be found

查看:58
本文介绍了'System.Security.Cryptography.ProtectedData',版本:'4.4.0'找不到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm trying to deploy a .NET Core application on Windows Server 2012 Datacenter.

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

I have installed .NET Core Windows Server Hosting bundle and also made sure uCRT is installed (installed it manually)

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

By executing dotnet assemblyname.dll I'm receiving this error:

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

Error: An assembly specified in the application dependencies manifest (program_name.deps.json) was not found: package: 'System.Security.Cryptography.ProtectedData', version: '4.4.0' path: 'runtimes/win/lib/netstandard2.0/System.Security.Cryptography.Protecte dData.dll'

我在谷歌上搜索,但找不到问题以及如何解决.这是什么问题,我应该如何解决?

I Googled around, but couldn't find the problem and how to solve it. What is the problem, and how should I solve it?

推荐答案

确保在您的应用程序根目录下有一个 runtimes 文件夹.我自己早些时候遇到了这个问题.

Ensure there is a runtimes folder under your root application directory. I myself ran into this problem earlier.

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

In my case, I was doing a robocopy to a publishing directory and was not using the /S (or /E) flag to copy the sub-directories. Using these flags ensured the runtimes folder was there at the destination site and my application then ran without the exception in question.

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

The entire relative path to the .dll from where the application is running should be: .\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll

这篇关于'System.Security.Cryptography.ProtectedData',版本:'4.4.0'找不到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆