Skip to content

Could not load file or assembly 'System.Security.Cryptography.Algorithms' on net46 #45

Closed

Description

@eerhardt

When trying to build in Dev15 using the Microsoft.DotNet.Core.Sdk nuget package, we get the following error:

The "GenerateDepsFile" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load file or assembly 'System.Security.Cryptography.Algorithms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'System.Security.Cryptography.Algorithms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at Microsoft.DotNet.Core.Build.Tasks.DependencyContextBuilder.GenerateRuntimeSignature(IEnumerable`1 runtimeExports)
at Microsoft.DotNet.Core.Build.Tasks.DependencyContextBuilder.Build(String projectName, String projectVersion, CompilationOptions compilerOptions, LockFile lockFile, NuGetFramework framework, String runtime)
at Microsoft.DotNet.Core.Build.Tasks.GenerateDepsFile.Execute()

This is because this assembly is not deployed with the .NET Framework v4.6. Instead, apps are expected to deploy this assembly when they target net46.

There are other CoreFX libraries that have the same situation (ex. System.IO.FileSystem), but those assemblies appear to be deployed with MSBuild in Dev15. However, System.Security.Cryptography.Algorithms is not.

To workaround this error for now, we will package System.Security.Cryptography.Algorithms in our nuget package, so it can be loaded on net46.

Activity

  1. added a commit that references this issue on Oct 10, 2016
    16079d2
  2. added a commit that references this issue on Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions