Bug 57634 - UWP: TypeLoadException on load when targeting Creators Update
Summary: UWP: TypeLoadException on load when targeting Creators Update
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 2.3.4
Hardware: PC Windows
: High normal
Target Milestone: ---
Assignee: Jimmy [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2017-06-20 16:57 UTC by James Montemagno [MSFT]
Modified: 2017-08-11 18:28 UTC (History)
4 users (show)

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


Attachments
Bug Example Project (189.01 KB, application/x-zip-compressed)
2017-06-20 16:57 UTC, James Montemagno [MSFT]
Details


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:
Status:
RESOLVED NOT_REPRODUCIBLE

Description James Montemagno [MSFT] 2017-06-20 16:57:48 UTC
Created attachment 23011 [details]
Bug Example Project

This may be a re-opening of https://bugzilla.xamarin.com/show_bug.cgi?id=40740, but that may have had a different fix.

1.) Open Sample Project (notice target is set to 15063 and min version is 10586, which is the default in 2017 when you create a new UWP project)
2.) Run sample
3.) Exception thrown in constructor of Forms App
System.TypeLoadException: 'Could not find Windows Runtime type 'Windows.UI.ViewManagement.StatusBar'.'


Workaround:

Target older versions of UWP
Comment 1 Jimmy [MSFT] 2017-06-20 22:39:34 UTC
Hey James, I'm not seeing the crash when running the sample project or with a new project. It launched successfully on both a Mobile v15063 and v14393 emulator and the desktop. 

The last comment in that old bug mentioned that in their case it was not related to Xamarin. Can you try if a non-Forms UWP project with the same target also crashes for you?
Comment 2 Jimmy [MSFT] 2017-08-11 18:28:57 UTC
I tried this again with VS2017 15.3 and I still did not experience the exception mentioned, so this may indicate an issue with the VS or UWP SDK install on the machine instead.