Missing System.Security.Cryptography

10,428

I had what sounds like a similar problem in a newly created C# console application. By default System reference showed some of System.Security, but not any of the Cryptography stuff. I had to right click 'References', 'Add Reference' and select 'System Security' after which I had access to the Cryptography stuff.

I'm fairly new to C# so sorry if my description isn't up to snuff or if this solution doesn't apply to mobile apps. Maybe helps someone else. thx

Share:
10,428
Nagriar
Author by

Nagriar

Software engineer

Updated on June 16, 2022

Comments

  • Nagriar
    Nagriar about 2 years

    I want to use the HMACSHA1 class in a project but the namespace System.Security.Cryptography is missing. If I add the reference System.Security, I find the namespace Cryptography but without the class HMACSHA1. And I can't find the namespace Windows.Security.Cryptography which seems to replace System.Security.Cryptography.

    My projet targets the framework .NET 4.5and the .NET for Windows Store apps and He use Nuget on Visual 2012 on Windows 7.

    Someone have a solution to this problem ?