Solved

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

Posted on 2010-09-09
3
688 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
ID: 33637818
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
ID: 33638056
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
ID: 33642658
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 Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

790 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