Bug 58485 - Error MCG0024 in .NET Stardard Forms UWP Project.
Summary: Error MCG0024 in .NET Stardard Forms UWP Project.
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows (show other bugs)
Version: 2.3.5
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2017-07-29 17:09 UTC by Gian Maria B
Modified: 2017-10-02 14:10 UTC (History)
4 users (show)

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

2 solutions: OK and ERR (737.63 KB, application/x-zip-compressed)
2017-07-29 17:09 UTC, Gian Maria B

Description Gian Maria B 2017-07-29 17:09:40 UTC
Created attachment 23901 [details]
2 solutions: OK and ERR

I create a blank empty (VS 2017 last update) Xamarin.Forms ( PCL solution, then I changed it to .NET Standard 1.4 (see https://blog.xamarin.com/building-xamarin-forms-apps-net-standard) and it builds correctly in debug and release mode (see attachement OK). 
Then I add Nuget Package Syncfusion.Xamarin.SfDataGrid ( (see attachement ERR) and when I rebuild the UWP project I get the error:

MCG0024:UnresolvableTypeReference Unresolvable type reference 'Xamarin.Forms.Platform.UWP.FormsDatePicker' in 'Assembly(Name=Xamarin.Forms.Platform.UAP, Version=, Culture=neutral, PublicKeyToken=null)' found. Please check the references in your build system. A reference is either missing or an assembly is missing an expected type.

If I uncheck "Compile with .NET Native tool chain" (UWP project properties) the build is OK but the Create App Package will fail with the same error
Comment 1 Jimmy [MSFT] 2017-07-31 20:31:02 UTC
It looks like the FormsDatePicker class for WinRT/UWP is removed in 2.3.5: https://github.com/xamarin/Xamarin.Forms/pull/731

The is probably being caught during build when ".NET Native toolchain" is enabled because of the analysis it does in order to compile to native code, but there is likely a runtime exception thrown instead when running debug builds.

Syncfusion will need to update their control so it does not use FormsDatePicker so I would recommend reaching out to them about this. In the meantime you can continue to use the Xamarin.Forms package instead and I will make sure this is noted in future release notes as this is a breaking change. Thank you!

Note You need to log in before you can comment on or make changes to this bug.