Bug 14282 - Must Rebuild Project or else TypeLoadException
Summary: Must Rebuild Project or else TypeLoadException
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 6.4.0
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2013-08-27 14:52 UTC by Frank A. Krueger
Modified: 2016-05-24 19:36 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Frank A. Krueger 2013-08-27 14:52:51 UTC
mtouch (5a0fe54)

When I build an iOS project normally (not clean), the app throws this exception:

System.TypeInitializationException: An exception was thrown by the type initializer for System.EmptyArray`1 ---> System.TypeLoadException: Could not load type 'Praeclarum.IO.DropboxFileSystem[]' from assembly 'Calca, Version=1.0.4987.21134, Culture=neutral, PublicKeyToken=null'.
at System.EmptyArray`1[Praeclarum.IO.DropboxFileSystem]..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at Calca.iOS.AppDelegate+<InitFileSystem>c__async1.MoveNext () [0x00000] in <filename unknown>:0

However, if I Rebuild the project, it works perfectly fine. Does this have to do with new generic value type sharing?

Here are the project settings:

Link SDK Only
Enable Generic Value Type Sharing
Comment 1 Sebastien Pouliot 2013-08-27 15:44:36 UTC
This should be fixed in the upcoming 6.4.4 release (under QA). If not please re-open (status NEW) the issue (or RESOLVED it if it's fixed).

It's not related to generic vlue-type sharing. It's a bug in the build caching (something gets reused and it should not).
Comment 2 Sebastien Pouliot 2016-05-24 19:36:21 UTC
Assuming it was fixed (long ago) and not closed. 

If you are still experiencing this issue please provide all the requested information and re-open the bug report. Thanks!