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.
Unfortunately, activation email could not send to your email. Please try again.

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

Thread ID:

Created:

Updated:

Platform:

Replies:

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

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()

Thanks!

Attachment: SampleApp_161f387c.zip

Matt Shanahan
Replied On December 28, 2015 07:11 PM

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.

Thanks!

Matt Shanahan
Replied On December 28, 2015 09:31 PM

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 12:28 AM

Hi Matt Shanahan,

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

Regards,
Priyanga B

CONFIRMATION

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.

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.

;