Solved

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

Posted on 2010-09-09
3
683 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

867 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

16 Experts available now in Live!

Get 1:1 Help Now