When Changing From Debug to Release, Why does 'mscorlib' Loose Its Strong Name Validation?

alaskanroguealaskanrogue USMember ✭✭✭
edited December 2019 in Xamarin.iOS

Switching to a release build. during the build I am running into Could not load file or assembly 'mscorlib, Version=, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A) Sentry.iOS C:\Projects\IdentityCheckpoint\VS2019\Sentry\Sentry\Sentry.iOS\SGEN

In project, the 'mscorlib' is 4.0.50524.0, so it is somewhat understandable, but it isn't a problem in debug mode. I searched the iOS 'csproj' file and found the only matching '' reference in the project in the 'resource.resx' file. I would change it, but I can't find the matching PublicKeyToken to use the working actual 'mscorlib' version. Is anyone else encountering this issue? Is there a solution?


Best Answer


  • alaskanroguealaskanrogue USMember ✭✭✭

    @LandLu The parameter was already set to Auto (same as Debug configuration), so I set it to Off which allowed an operational build and deploy executable. Interesting though was the fact that after the deploy, having selected Run instead of Deploy, the app ran in what seemed like debug mode in the IDE stopping at breakpoints. So did disabling the serialization result in not generating symbol-less binaries?

    It appears that this is a known issue because you had a solution. Is this issue already reported?

  • LandLuLandLu Member, Xamarin Team Xamurai

    You could try to report this issue on the VS forum. Or open a support ticket here:

Sign In or Register to comment.