I have a console application in visual studio 2015.(.Net FrameWork 4.8)
I've added 3 dlls to this app by NuGet installation like below :
System.Security.Cryptography.Algorithms System.Security.Cryptography.Encoding System.Security.Cryptography.Primitives
But i have error in this line of c# :
using System.Security.Cryptography.Algorithms;
The type or namespace name 'Algorithms' does not exist in the namespace 'System.Security.Cryptography' (are you missing an assembly reference?)
What is the problem and how can i fix it?
CodePudding user response:
Two things to note here:
- The
AesGcmimplementation you're looking for is not available for .NET Framework 4.8, hence the failure to resolve the desired type name. For a cross-platform implementation it looks like you'll need to upgrade to .NET 5.0 System.Security.Cryptography.Algorithmsis not a namespace - it's just the name of the assembly (the DLL file on disk) that contains a number of cryptographic algorithm implementations. All public types contained in the corresponding DLL are namespaced toSystem.Security.Cryptography, so the qualified type name forAesGcmwould have been:System.Security.Cryptography.AesGcm
