Solved

vs2010 not doing "build and run" for C#/WPF app when xaml or cs file is modified

Posted on 2010-09-09
3
678 Views
Last Modified: 2013-11-27
I have a C# WPF application.
When I edit a xaml file (or a xaml.cs file or just a cs file) and hit F5 to start debugging, vs2010 doesn't recompile my C# app on one of my 2 machines (I have vs2010 installed on two machines (one Vista, one Win7)
On my Win7 machine, the app builds and then runs under the debugger (and I see my window changes that I just made in the xaml).
On my Vista machine, the app is not rebuilt and I don't see my xaml window changes.

I've compared my Tools/Options/Projects and Solutions/Build and Run settings on the 2 machines, and both are set to "Save all changes" before building, "Always build"  out of date projects on run, and "do not launch" on build error.

What's going on?
I doubt it's ths OS, but the Vista machine was upgraded from VS2005 so maybe some weird setting was migrated/set during that process?
Also, note that in a C++ app, if I edit a .cpp file and hit F5, the app is properly rebuilt first - this only seems to be happening in the C# app
0
Comment
Question by:povjetset
  • 2
3 Comments
 
LVL 6

Expert Comment

by:rajeshjamnadas
Comment Utility
Goto Tools-Customise- In that u can reset all setting if the problem is caused because of 2005 updation.
let me know if this work
0
 

Author Comment

by:povjetset
Comment Utility
the only thing I see to reset in Tools-Customize is a given menu (e.g. Build menu) but that didn't help (not surprising, as I hadn't customized that).

Also, I did in fact upgrade from VS2005 on the other machine as well (there may have been fewer settings there as it was a newer second machine; the Vista was my primary dev machine)
0
 

Accepted Solution

by:
povjetset earned 0 total points
Comment Utility
Just figured it out...
If I right click on the Solution and click on Configuration Manager, then made sure that my C# project was checked in the "Build" column.
Not sure why it wasn't (maybe because I created the project on the other machine and copied it over), but once I checked it, now the Build & Run works as expected.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now