How to modify project files (csproj) in Visual Studio in XML format

Recently I wanted to modify the xml that makes up a C# project file (csproj) so that Code Analysis would use British English (en-GB) dictionary for the spelling checks (as explained here). The problem I found was that there’s no easy way to do this without leaving Visual Studio IDE; you can try to ‘open file’ and point at the csproj, but this ‘throws a wobbly’ as the project is already open as a project (assuming you have the solution open), to get around this you have to close the solution or unload the project; what a faff!

Then the very next day a colleague showed me a plugin for Visual Studio 2008 called “PowerCommands for Visual Studio 2008“. One of the features it has is to “Edit Project File”, this is basically just a shortcut for unload project followed by open file.

Simple but awesome!

What would be even better would be a power command (or other plugin), for setting the CodeAnalysisCulture for a project with a single click, or even better for every project in a solution.


About Alex McMahon

I am a software developer, interested in .net, agile, I've previously specialised with .net 3.0 technologies like WCF, whereas now I am trying to specialise in agile development and best practice and patterns. I am obsessed with looking at the latest technologies, tools, and methods, and trying them out. I am currently employed by Rockwell Collins in the UK.
This entry was posted in development, Visual Studio 2008. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s