3

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?

  • Perhaps [this article](https://stackoverflow.com/questions/48208262/net-standard-2-0-and-system-security-cryptography-protecteddata-protect/48210309#48210309) is a similar problem and answer. – kunif Jan 13 '18 at 07:49
  • Dear @kunif, that only explains this issue, which is the first part of my question. The second part has no answer there. In fact, it doesn't even answer the first part. – mohammad rostami siahgeli Jan 13 '18 at 12:40
  • So how is the likelihood that [this article](https://stackoverflow.com/questions/44178186/error-assembly-specified-in-the-dependencies-manifest-was-not-found) is similar? – kunif Jan 13 '18 at 14:51

1 Answers1

6

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

Mike-E
  • 2,477
  • 3
  • 22
  • 34