[Unity-Windows-Build] Cannot find type 'X' in module 'Y'

I am building a project for Windows Phone (8.1) in Unity. I have installed Windows SDK 8.1, MS VS 2013 and I have required .NET frameworks installed in my Windows 8.1 Laptop.

When I build the project in Unity, it gives me VS .sln project. I opened it in VS 2013 and tried to build it. But, I am getting a error i.e.

Cannot find type System.Security.Cryptography.SymmetricAlgorithm in module mscorlib.dll

I have read posts about this kind of error and those didn’t serve my purpose because I didn’t import the mentioned namespace in the error in anywhere of the Unity Project. I searched in the plugins too.

I also changed the target framework in MonoDevelop to 4.5. I am using Unity 5.3 and MonoDevelop as IDE.

Any Help is highly appreciated.

@karl_jones Can I have your or your any known person’s concern about my problem?

Sounds like you are missing a .Net dependency.
Changing the target framework in mono wont change Unity, Unity is .Net 3.5 at most.
Maybe try this Error to compile on windows phone plataform - Questions & Answers - Unity Discussions

Isn’t mscorlib.dll not available on Windows Phone? Instead of System.Security.Cryptography, generally for Windows Phone we need to use Windows.Security.Cryptography instead.

EDIT: Ah so you say you haven’t used this namespace, and that you have checked your plugins. My guess is that there’s still a plugin that uses this namespace somewhere… I’m not sure how to check plugins besides ripping half of them out at a time (requires writing stubs a lot of the time) and checking to see if the error disappears.

Thank You for your information. The namespace must be in my project. Point is : I have to find it where it is and replace it with Windows.Security.Cryptography. Am I right?

Dear karl.jones, thank you for your reply. The answer in the post (given link) is not clear to me. I didn’t understand anything. Sorry if you find my query novice :frowning:

I my experience, yes that is how I would proceed. Just know that Windows.Security has a different API than System.Security!