locked
ERROR: The type initializer for 'MS.Internal.JoltHelper' threw an exception RRS feed

  • Question

  • This is my  C# code, threw an exception "ERROR: The type initializer for 'MS.Internal.JoltHelper' threw an exception"

    Please help me handle this.

    System.Windows.Interop.SilverlightHost host = Application.Current.Host;
    bool isSupported = host.IsVersionSupported("5.1.50907.0");
    System.Windows.Media.Color pluginBackground = host.Background;
    bool loaded = host.IsLoaded;
    Uri source = host.Source;
    System.Windows.Interop.Settings settings = host.Settings;
    settings.EnableFrameRateCounter = true;
    settings.EnableRedrawRegions = true;
    settings.MaxFrameRate = 60;
    bool windowless = settings.Windowless;
    bool htmlAccessEnabled = settings.EnableHTMLAccess;
    System.Windows.Interop.Content content = host.Content;
    bool isFullScreen = content.IsFullScreen;
    double actualWidth = content.ActualWidth;
    double actualHeight = content.ActualHeight;

    Friday, July 27, 2018 5:06 PM

All replies

  • Hi,

    I have some questions unclear about this.

    What kind of project you are developing, Windows 8.1 or UWP?

    What's the detail error message and which line of the code the throw the exception?

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, July 30, 2018 1:53 AM