How to get PlatformUI.DialogWindow work without Visual Studio 2013? RRS feed

  • Question

  • Hi All,

    I'm moving my VS Package project from VS2010 to VS2013. In our project we are using PlatformUI.DialogWindow as our base class for the WPF based dialog window.  Our dialog window works well with VS2013.

    The problem is that, we reuse the dialog window code in our standalone tool application, which works without Visual Studio, this worked before in VS2010.

    The another senario will aslo face this problem. In our code, we use nunit to run the UT. After merge into VS2013, the UT fails due to this issue.

    In VS2013, it get a exception during Xaml Parse as the image attached. After checking the innerexception, it seems the application is unable to get SVsSettingManager interface and raise the problem.

    I create a small sample to reproduce this issue. When you build my sample you can find, the dialog can be popup inside VS but not ouside VS, a WPF application. And if we change the reference to Shell.10.0, everything works well. You can find the sample here: https://skydrive.live.com/redir?resid=BA4AFDF5E8437DDD%217132

    What I guess is that it could related to VS2013 theme, and once I use the DialogWindow outside the VS, it can't find/query the correct interface to adjust the theme.

    My question is how can we override this?

    Thanks in advance.


    MSC on Computer Science (Parallel algorithm)

    Monday, January 6, 2014 7:52 AM


  • It wasn't designed to be used outside of VS, in fact doing so doesn't really even make a lot of sense, since its sole goal in life is to enable you to enter a proper modal state in VS (normal WPF modal code doesn't work properly in VS).

    There is no way to make this work as code was added in 2013 to deal with high DPI displays, that code has a reliance on the VS service provider, which won't exist in your app.
    • Marked as answer by Li Yifeng Tuesday, January 14, 2014 8:19 AM
    Monday, January 6, 2014 10:28 PM