Editing MSBuild project files in Visual Studio
Being able to edit your Visual Studio generated projects is one of the fundamental goals of MSBuild. Being able to edit your project file to customize and extend is not something that just happened to work :) MSBuild and Visual Studio 2005 were designed right from the start to enable you to do this. If you ask me, this is the "essence of MSBuild"
So let's say you are working on your project, and have your project loaded in the IDE - What's the easiest way for you to be able to quickly drop into the MSBuild project file (either .csproj or .vbproj) so that you can edit the project to customize your build?
Pretty simple - if you are using one of the builds past the June CTP, you can do this in two steps.
1. Right click on your project in solution explorer and select Unload Project
2. Right click on the project (tagged as unavailable in solution explorer) and click "Edit yourproj.csproj"
It's that simple. No more notepad. No more File->Open->blah->blah->blah. Besides, you get full inellisense based on the MSBuild schema! Wait - there's something better. We will not touch any of the customizations you make to your projects. Customizations will work inside the IDE as well as from the command line - but we will not mess with your changes!
[Author: Faisal Mohamood]
Comments
Anonymous
December 02, 2005
Is there an easy way to check out the project file from TFS without checking every single file in the project? That would be rather handy..Anonymous
January 16, 2006
Thanks a lot. This tip is very useful. I have blogged about this...Anonymous
April 06, 2006
Anyone who has edited Visual Studio project xml using Notepad (the no man's land of intellisense) will...Anonymous
August 28, 2006
Final update Sorry, I'm not able to figure out what's wrong with this, and since Frank has a better solutionAnonymous
August 28, 2006
Been pulling my hair to find an way to open up a .csproj file in the Visual Studio 2005 IDE. After lotsAnonymous
September 16, 2006
Been pulling my hair to find an way to open up a .csproj file in the Visual Studio 2005 IDE. After lotsAnonymous
September 16, 2006
Final update Sorry, I'm not able to figure out what's wrong with this, and since Frank has a better solutionAnonymous
October 21, 2008
The comment has been removedAnonymous
November 14, 2008
The comment has been removedAnonymous
November 14, 2008
Aha, appears to be a glitch with WiX: when I have a WiX project loaded I can't edit the .csproj for another project, but if I unload the WiX project I can. Disregard my previous message. :PAnonymous
December 02, 2008
That's maybe the best VS tip I've ever stumbled upon. Thanks!Anonymous
June 09, 2009
PingBack from http://hairgrowthproducts.info/story.php?id=307