Search code examples
visual-studioblend

Using Blend and VS on the same file


I have usually closed VS before I open a solution in Blend and then close Blend before opening the same solution again in VS. This avoids the "file has been changed...should we reload?" messages. Those messages always bothered me.

But, is it perfectly safe to open a solution with VS, then open a XAML file from VS (right click, Design In Blend) in Blend, save it(from Blend) and then keep working in VS? I'm worried I'll forget to reload or will be working in VS on a file modified by Blend that wasn't saved.


Solution

  • It's safe. When you switch back to VS, it should notice that the file has changed and ask you if you'd like to reload it - if not, it's definitely a bug. :)

    VS2015 also allows you to opt in to automatic file refreshes, so you don't have to deal with the pesky dialog every time you make a change in Blend.

    EDIT: here is a screencap of the dialog, with the checkbox you can check to enable automatic refresh. You can also set it under Tools -> Options -> Environment -> Documents.

    enter image description here