Click here to Skip to main content
6,596,602 members and growing! (18,134 online)
Email Password   helpLost your password?
General Programming » Macros and Add-ins » VS.NET Addins     Intermediate

Visual Studio 2005 Add-in that adds diff tools, an explore command, subversion support, and web project reporting

By Matthias Hertel

With this add-in, you get new tools and commands that boost your productivity while developing, and some helpful reports especially for web projects. Version 1.0.
C#, Windows, .NET 2.0VS2005, Dev
Posted:1 Feb 2006
Updated:29 May 2006
Views:78,436
Bookmarked:89 times
Announcements
Loading...
 
Search    
Advanced Search
Add to IE Search
printPrint   add Share
      Discuss Discuss   Broken Article?Report  
12 votes for this article.
Popularity: 4.28 Rating: 3.97 out of 5
2 votes, 16.7%
1

2
1 vote, 8.3%
3
2 votes, 16.7%
4
7 votes, 58.3%
5

Introduction

In Visual Studio .NET, I missed some useful commands and tools, so I started developing macros and add-ins for this development environment. This project started with some special web reports, and grew up to a collection of useful tools that help developing and controlling my work and files. The result was an add-in for Visual Studio 2003 that adds commands for comparing files and folders, an explore command, and some useful reports for web projects.

Now, this version is a port to .NET 2.0 and Visual Studio 2005, of the original project that is still available at CodeProject.

After installing, there are new commands available in the command window as well as in the context menu of the Solution Explorer. Most of them use a new Tool window to output the results of the commands and to offer new functionalities in the context of the reported items.

If you are interested in detailed descriptions, see the original article. Here, I want to give some hints that were useful while porting the original project, that might help you to port yours.

The Diff Code

I've got several requests from users who where searching for a diff algorithm. So, the C# code that is used to compare two files can now also be found as a separate CodeProject project: An O(ND) Difference Algorithm for C#.

Manual Setup

This is the biggest change for building add-ins: there is no more need for COM registrations and registry hacks!

All you need to start using this add-in is to extract all the files from the WebReports8_setup.zip archive to the folder "C:\Documents and Settings\[your name]\My Documents\Visual Studio 2005\AddIns". You might have to create this folder first if it doesn't exist yet.

When Visual Studio 2005 starts, it searches this path and will find the WebReports8.AddIn that holds all the additional information.

There are also other folders that can be used. You can see all the folders that are scanned in the Extra.Options dialog in the add-in section.

Changed Libraries

Visual Studio .NET 2003 shared some libraries for handling the menu part with the Office products. This is no longer true, and the import of Microsoft.Office.Core is obsolete.

Now, you have to use the namespaces EnvDTE80 and Microsoft.VisualStudio.CommandBars. There are some minor differences between the old and the new libraries, but the overall functionality is the same. There is still some casting of the COM types necessary.

Most of the code changes are in the Connect.cs class that handles the registration, and is called by the Visual Studio 2005 events.

Resources

Resources can now be built into managed satellite DLLs. You will not need a C compiler any more to create an empty DLL that will hold the resources.

There are some good articles on that topic, and of course, the MSDN helps a lot: Creating Managed Satellite DLLs.

I have added the batch file buildRes.bat to the sources that help calling the resgen and other tools.

resgen.exe Icons.resx
al.exe /t:lib /embed:icons.resources 
       /culture:en-US /out:Webreports8.resources.dll

md bin\en-us
copy WebReports8.resources.dll bin\en-us

rem -- cleanup --
del WebReports8.resources.dll

The resx files can be edited by VS.NET.

I actually created two DLLs because they are language specific and I wanted to support English and German.

The project also contains a postBuild script that copies all the files that are used at runtime to the addins folder. If you compile the project by yourself, you should check this script and change the path to the addins folder to your specific installation and username.

Helpful Links

History

  • 2006.05.27 - Version 1.1 - German resources added.
  • 2006.03.21 - Version 1.0 - some fixes (as suggested by Carlos Quintero).
  • 2006.01.31 - Version 0.9 - Just a port to the new Visual Studio environment.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Matthias Hertel


Member
see http://www.mathertel.de
Occupation: Team Leader
Company: Deutsche Bank Bauspar AG
Location: Germany Germany

Other popular Macros and Add-ins articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 18 of 18 (Total in Forum: 18) (Refresh)FirstPrevNext
QuestionThis Add-in works for VS2008 ? PinmemberPablo B.8:50 17 Jul '08  
GeneralRe: This Add-in works for VS2008 ? Pinmembermediademon5:19 13 Jan '09  
GeneralCongratulations and please allow an off-topic add-in question PinmemberAlexandru Matei11:05 4 Dec '06  
GeneralRe: Congratulations and please allow an off-topic add-in question Pinmemberjoshcoady11:25 16 Jan '07  
GeneralRe: Found the reason of my problem PinmemberAlexandru Matei21:45 16 Jan '07  
GeneralVS 2005 SP1 Pinmemberjoshcoady22:51 16 Jan '07  
GeneralRe: VS 2005 SP1 PinmemberAlexandru Matei23:06 16 Jan '07  
Generalnice example... Pinmemberbdaniel70:04 23 May '06  
GeneralBUG: it breaks other add-ins PinmemberCarlos J. Quintero23:27 16 Mar '06  
NewsRe: BUG: it breaks other add-ins PinmemberMatthias Hertel11:40 17 Mar '06  
GeneralLicense Pinmemberphilcrosby12:54 2 Mar '06  
JokeRe: License [modified] PinmemberMatthias Hertel7:24 4 Mar '06  
GeneralPath may not be correct Pinmemberbailes11:02 1 Feb '06  
NewsRe: Path may not be correct PinmemberChristopher Scholten6:36 8 Mar '06  
AnswerRe: Path may not be correct PinmemberMatthias Hertel10:59 2 Jun '06  
AnswerRe: Path may not be correct PinmemberChristopher Scholten23:27 5 Oct '06  
GeneralEmpty menu Pinmemberz33z10:08 1 Feb '06  
AnswerRe: Empty menu PinmemberMatthias Hertel11:02 2 Jun '06  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 29 May 2006
Editor: Smitha Vijayan
Copyright 2006 by Matthias Hertel
Everything else Copyright © CodeProject, 1999-2009
Web16 | Advertise on the Code Project