'System.Security.Cryptography.ProtectedData', version: '4.4.0' can not be found

大城市里の小女人 提交于 2019-12-11 13:39:57

问题


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

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

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

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?


回答1:


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

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.

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



来源:https://stackoverflow.com/questions/48237249/system-security-cryptography-protecteddata-version-4-4-0-can-not-be-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!