We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

When Referencing Assemblies: "The type initializer for 'Syncfusion.UI.Xaml.Controls.Notification.SfHubTile' threw an exception"

Thread ID:





121545 Dec 28,2015 10:27 PM UTC Dec 29,2015 05:28 AM UTC WinRT 3
Tags: SfHubTile
Matt Shanahan
Asked On December 28, 2015 10:27 PM UTC

I'm trying to reduce my app deployment size by referencing the assemblies directly, rather than referencing the SDK. I've got it narrowed down to the assemblies I need, but even when referencing all of the assemblies, I'm getting an error:
{"The type initializer for 'Syncfusion.UI.Xaml.Controls.Notification.SfHubTile' threw an exception."}

To reproduce this, I've put together a sample, but here's all that I need to do to get the exception to occur:

SfHubTile sampleHub = new SfHubTile();

Again, I'm referencing the assemblies, not the SDK. If I use the SDK, everything works fine, but my app size is much larger than I'd like.

Here's the stack trace:
   at Syncfusion.UI.Xaml.Controls.Notification.SfHubTile..ctor()
   at SampleApp.MainPage..ctor()
   at SampleApp.SampleApp_WindowsPhone_XamlTypeInfo.XamlTypeInfoProvider.Activate_0_MainPage()
   at SampleApp.SampleApp_WindowsPhone_XamlTypeInfo.XamlUserType.ActivateInstance()


Attachment: SampleApp_161f387c.zip

Matt Shanahan
Replied On December 29, 2015 12:11 AM UTC

I think I figured it out.

Included in the SDK are several Themes that aren't embedded in the DLLs. In the Redist\CommonConfiguration\neutral folder, I copied the Syncfusion.SfHubTile.Universal folder into the root of my Shared project, then changed the build action of every file to Content. After that, the sample app launches without error. I'm going to implement this into my actual app now but unless I write back, I think this matter is resolved.


Matt Shanahan
Replied On December 29, 2015 02:31 AM UTC

Just one more thing to follow up with. When adding the files in the Redist\CommonConfiguration\neutral folder, also add the .pri files at the bottom that correspond with the assemblies that have been referenced. Add those into the root of the Shared project and set the build action to Content, and it worked!

Priyanga Balasubramaniam [Syncfusion]
Replied On December 29, 2015 05:28 AM UTC

Hi Matt Shanahan,

We are glad that your issue has been fixed. Please let us know if you need any other assistance

Priyanga B


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon