'System.Security.Cryptography.ProtectedData',版本:'4.4.0' [英] 'System.Security.Cryptography.ProtectedData', version: '4.4.0' can not be found
问题描述
我正在尝试在Windows Server 2012 Datacenter上部署.NET Core应用程序。
I'm trying to deploy a .NET Core application on Windows Server 2012 Datacenter.
我已安装。NET Core Windows Server主机捆绑包,并确保已安装 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.Protecte
dData.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'
我在Google周围搜索,但是找不到问题及其解决方法。
有什么问题,我应该如何解决?
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屋!