views:

39

answers:

2

I have just started with WPF so am probably missing something simple here. I have a window that I am editing in VS 2010. When I change the XAML by hand and then run the application (F5) the window remains as before my edit, however if I do a rebuild and then run the application my changes show up.

Is there any way to get VS to recognise that I have changed my XAML file and recompile it automatically when I press F5?

A: 

You can change a VS setting to save all files before Build/Run. Go to

Tools->Options->Projects and Solutions->Build and Run

Update Before building and On Run, when projects are out of date values to Save all changes and Always build respectively.

akjoshi
I have before run set to Save All Changes and On Run set to Always Compile, but still no joy.
Martin Brown
Works fine for me, I verified this on both VS 2008 and VS 2010. Files are automatically saved before running. Can be due to some other issue like you have multiple projects and project dependencies are not right or somehitng like that.
akjoshi
A: 

It turns out that my UI project was not set to build in the configuration I had selected. Although it was set to build in Debug x86 I had set the current config to Debug Any CPU.

Martin Brown