You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
…r NuGet package.
This allows us to put platform-specific dependencies in the NuGet package, and fixes the issue of getting FileNotFound 'System.Security.Cryptography.Algorithms' on net46 by adding that assembly to our NuGet package.
Along with this change, I refactored the nuspec to include all files under the "PackagesLayout" folder, which means we no longer have to duplicate each file. "Build" just needs to place the file in the correct spot under "PackagesLayout".
Fix#45
mmitche
pushed a commit
to mmitche/sdk
that referenced
this issue
Jun 5, 2020
When trying to build in Dev15 using the
Microsoft.DotNet.Core.Sdk
nuget package, we get the following error: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.The text was updated successfully, but these errors were encountered: