Monday, January 29, 2007

VS 2005 IDE Tip - Solution Specific Code Formatting/Settings Macro

vs.Eco - Another Visual Studio IDE Tip

"...

Many of us work on multiple projects at the same time, and some of those have different coding conventions. For example, you might be involved in a work-related project that uses company-defined conventions, but also participate on open source projects with their own coding styles. However, currently visual studio settings for Code Formatting are global and cannot be easily overridden.

Here’s what Paul came up with:

For each solution, create a .vssettings file containing the editor options you want to modify and add it to the solution. Then create a macro hooked up to the “Solution Opened” event to import the .vssettings file automatically.

The macro is really simple (add it to the EnvironmentEvents module): ..."

Very nice. This technique provides for Solution specific .vssettings files. Simple and yet pretty darn cool idea.

See the original post for the macro code (I didn't want to be a TOTAL leach... this time... ;)

No comments:

Post a Comment

NOTE: Anonymous Commenting has been turned off for a while... The comment spammers are just killing me...

ALL comments are moderated. I will review every comment before it will appear on the blog.

Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...

I reserve, and will use, the right to not approve ANY comment for ANY reason. I will not usually, but if it's off topic, spam (or even close to spam-like), inflammatory, mean, etc, etc, well... then...

Please see my comment policy for more information if you are interested.

Thanks,
Greg

PS. I am proactively moderating comments. Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...