The type or namespace name ‘RSASignaturePadding’ does not exist in the namespace ‘System.Security.Cryptography’ (are you missing an assembly reference?) in Unit Test Project.

Was getting the below error while trying to build a unit test project (framework version 4.5.2) in VS 2012.

Delete the .messages file as suggested in some forums, but that didn’t help.

Just tried building the project by changing the Target Framework to 4.6.

That worked and after that on switching back the target version to 4.5.2 also worked.

Helpful post

https://social.msdn.microsoft.com/Forums/vstudio/en-US/2de45cd4-2744-4a91-91a2-785f305c1ef7/errors-on-trying-to-add-fakes-assembly-on-system?forum=vsunittest

Hope it helps..


Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

Share your thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s