LoadFromContext Occurred

前端 未结 3 570
逝去的感伤
逝去的感伤 2020-12-29 21:29

I have a very simple C# problem that loads a Windows WPF window from a library. Here\'s the code:

public partial class App : Application
{
    public App()
          


        
相关标签:
3条回答
  • 2020-12-29 21:40

    In VS2015 I am getting two exceptions from WpfXamlDiagnosticsTap.dll

    1. The first one is "LoadFromContext" and it occurs when activating the first window.
    2. The second one is "NotMarshalable" and it occurs when closing that window.

    Simply ignoring those two Exception types allows me to run the application, and use the UI Debugging tools. I haven't observed any adverse effects.

    0 讨论(0)
  • 2020-12-29 21:46

    I all of a sudden started seeing this error in VS2015 and fixed it by opening the "Exception Settings" Window (CTRL + ALT + E) and press the "Restore Settings" Button :

    0 讨论(0)
  • 2020-12-29 21:47

    I'm running into the same issue after switching from Visual Studio 2013 to 2015. Some old projects (WPF, .NET 4.5, MVVM Light) produce this error - other not. In visual Studio i can skip the exception but newly created releases stop while loading and try to open the JIT Debugger.

    Until now the only solution seems to be a rollback to Visual Studio 2013.

    ** UPDATE **

    Finally I solved it in VS 2015 by unchecking the following option:

    Tools –> Options –> Debugging –> General –> Enable UI Debugging Tools for XAML

    0 讨论(0)
提交回复
热议问题