Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

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

Discussion in 'Windows' started by shohagmist, Dec 23, 2015.

  1. shohagmist

    shohagmist

    Joined:
    May 19, 2015
    Posts:
    37
    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.
     
  2. shohagmist

    shohagmist

    Joined:
    May 19, 2015
    Posts:
    37
    @karl.jones Can I have your or your any known person's concern about my problem?
     
  3. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,901
  4. GarthSmith

    GarthSmith

    Joined:
    Apr 26, 2012
    Posts:
    1,240
    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.
     
  5. shohagmist

    shohagmist

    Joined:
    May 19, 2015
    Posts:
    37
    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?
     
  6. shohagmist

    shohagmist

    Joined:
    May 19, 2015
    Posts:
    37
  7. GarthSmith

    GarthSmith

    Joined:
    Apr 26, 2012
    Posts:
    1,240
    I my experience, yes that is how I would proceed. Just know that Windows.Security has a different API than System.Security!