July 2003 - Posts

Add-Ins Gallery Update

Here are a few more example add-ins...

  1. Lutz Roeder's Reflector runnain as an Add-In
  2. Lutz Roeder's Documentor runnain as an Add-In (it would be quite strait forward to keep in sync with the code you're editing if you fancy and add-in project)
  3. Screenshot of Control Inspector running as an add-in inspecting Visual Studio Convert which also appears as an add-in.
  4. Command Prompt Add-In using the Pavel Zolnikov's Command Prompt Explorer Bar control.  Here is a version that can be run as an add-in.
  5. SqlBuddy running as an Add-In. SqlBuddy expects to find the Icons directory relative to the current directory. When running inside Visual Studio.NET the current directory is \Program Files\Microsoft Visual Studio .NET\Common7\IDE\. As a work around you can copy the Icons directory there. A better solution would be for the application to look for the Icons relative to AppDomain.CurrentDomain.BaseDirectory.
  6. Here is a screenshot of Messenger.NET running as an add-in. Messenger.NET is a messenger client. It is minimalist compared the the Microsoft Messanger, but that is it's beauty! It will happily run in a tool window without beeping, flashing and generaly bothering you!
Please email here with screenshots and links to your add-ins!
Posted by Jamie Cansdale | 4 comment(s)
Filed under:

Command Prompt Add-In

I've uploaded a build of Pavel Zolnikov's excelent Command Prompt Explorer Bar ready to drop in as an add-in.  Be sure to check out the original version.  It is now one of my can't live without utilities!

You can find it on the Manged Add-Ins Gallery here.  For information about running add-ins see "Building the Reflector Add-In"

Posted by Jamie Cansdale | with no comments
Filed under:

Add-In Toolbox Explained

Yesterday I posted a picture of the new add-in toolbox. I should really explain what the different items do...

Add-In Toolbox Context Menu

  • Connect starts the application in a new app domain as an add-in.  Forms will be created as tool windows inside Visual Studio (unless they are modal).  Modal dialogs will appear on top of Visual Studio.
  • Disconnect will call Application.Exit from within the add-ins app domain.  After the main thread returns the app domain will be unloaded.  If it doesn’t exit of its own accord within 2 seconds the app domain will be unloaded anyway.
  • Exit will call Application.Exit from within the add-ins app domain.  It won’t force an exit if the application doesn’t exit of its own accord.  Most applications have a built in way of exiting.
  • Reload will call Disconnect and then Connect from a thread inside the default app domain.  The ‘Add-Ins Toolbox’ is in fact the application you can see called ‘ManagedAddIns’.  Because reload is called from with the default app domain the ‘Add-Ins Toolbox’ is capable of reloading itself (useful for me during development!).
  • Browse will navigate to the application’s directory.  For URL hosted add-ins (e.g. Wahoo!) this will typically bring up the application’s home page.  For local add-ins it will bring up the application’s directory.
  • Configure will edit the applications .config file within Visual Studio.NET.  If an application doesn’t already have a .config file a default will be used.  The default included binding redirects to allow the application to run in both VS.NET 2002 and 2003.  It also included some commented out custom tool window examples.  At the moment the ‘managedAddIns’ configuration section requires the core Managed Add-Ins assembly to exist within the application’s search path.  If the assembly doesn’t already exist it will be copied into the application’s directory.
  • Delete will remove the application from the add-ins toolbox.  It won’t delete the application itself!
  • External will run the application outside of Visual Studio.  At the moment the application won’t appear in any tool windows.  I have architected Managed Add-Ins in such a way that I am hoping out of process add-ins will be possible.  Some applications for some reason don’t like running in the VS.NET process.  Hopefully running them out of process will solve this issue.

Add-In Toolbox Toolbar

  • Home takes you to the Managed Add-Ins Home Page.
  • Search takes you to the Managed Add-Ins Gallery.  This contains screenshots and links to applications that work as add-ins.  In future there should be so many we need a search box. Come on people submit your add-ins.. ;o)
  • Open lets you choose an application to be added using a file dialog box.
  • ComboBox lets you enter a URL or path of an application to be added.
  • Connect will connect the application specified in the ComboBox (alternatively you can just hit return).

You can find the latest version here. Voting isn’t compulsory, but encouraged. ;o) You can find it under "Building the Reflector Add-In - turboslug".

New Add-In Toolbox

As you can see I have just given the 'Add-In Toolbox' a much needed lick of paint and dose of sanity. You will no longer have to click save after every change and loose your add-ins if you reinstall! I have used Lutz Roeder's CommandBar for .NET to give it a Windows XP theme. I started using it because I found the Windows Forms toolbar such a pain to work with. In contrast I have found the CommandBars a pleasure use!

The new install includes Managed Add-Ins, the Reflector Add-In and Jason Bock's FileGenerator add-in (this lets you bulk export decompiled source). It doesn't include Reflector, but will download and install it the first time it loads. You will have to make sure you have uninstalled any previous versions of the Reflector Add-In before you install.  Here is a direct link to the new install. It isn't referenced on the main site yet.

I would be grateful if someone could confirm that the install is working okay on a fresh machine. It should work with Visual Studio.NET 2002 and/or 2003. Could you comment here when you get it working? It should be a very strait forward install (in contrast to the alpha versions).

BTW if you haven't voted already there are now just a few votes in it! There are some strong entries and the competition is worth checking out. Of cause your support would be appreciated... ;o)

Gallery First Few...

  1. Lutz Roeder's Reflector runnain as an Add-In
  2. Screenshot of Control Inspector running as an add-in inspecting Visual Studio Convert which also appears as an add-in.
  3. Command Prompt Add-In using the Pavel Zolnikov's Command Prompt Explorer Bar control
Please email here with screenshots and links to your add-ins! You must have some ideas?  ;o)
Posted by Jamie Cansdale | with no comments
Filed under:

Managed Add-Ins Gallery

You've got to start somewhere. Here's a rather sparse Managed Add-Ins Gallery. Please send your screenshots and links here.
Posted by Jamie Cansdale | 3 comment(s)
Filed under:

GetAssemblyName

But, maybe you don't need to load that Assembly, anyway. If you just need info about it, you could call AssemblyName.GetAssemblyName() with the path to the file. That will temporarily load the file to get the info, and then immediately unload it. That call will not cause it to show up as an Assembly in the AppDomain. [Suzanne Cook - Unloading an Assembly

Ah, so that is how you do it!  I was going through all sorts of convoluted ways to simply find out if a DLL was managed (without loading it).  It looks like that one call will do the trick.

Posted by Jamie Cansdale | with no comments
Filed under:

Quick Launch

I've uploaded new versions of Managed Add-Ins and the Reflector Add-In. I've added a 'Quick Launch' menu to quickly start and stop your add-ins. I think this was needed before going properly beta (i.e. feature complete). You can dowanlod the new versions from here.

Just for fun I've also made Wahoo! available out of the box. Could you comment here if you know of any other utilities and games that are runnable from a URL?

P.S.

Remember to press the save icon after adding new add-ins.  Also the quick launch menu is only populated when VS.NET first loads.  I know this isn't ideal, but it works for the moment.

Posted by Jamie Cansdale | 7 comment(s)
Filed under:

Reflector Add-In RC1

If there are a few downloads and no complaints, this is the version that is going out.  Please comment here and let me know how you get on...

Building the Reflector Add-In

I've just written an article for the Code Project describing how you can easily create an VS.NET add-in like the Reflector one I posted screen shots of a while ago. I'm sorry I haven't got back to many of you who expressed interest in it. This reason is because I haven't been happy with the installation procedure (it too many steps). I'm very close to having an installer ready that does everything. I will email you all when this is ready. Hopefully then you can put your beta testing skills to more interesting problems than installation! If you would like to know when this is ready please drop me an email here.

In the mean time have a read of my article. I have entered Managed Add-Ins for the Visual Studio .NET add-in competition. Please check out the other entries and vote. At the moment it's a very close run.

Here is a screen shot showing how to run pretty much any Windows Forms application as an add-in.

After compiling your solution, right click on the project you want to run and select 'Managed Add-In..'. At this point the application should appear in a tool window. You can carry on developing with it running in the background as the assemblies it uses are shadow copied. When you want to refresh the add-in simply select 'Managed Add-In..' again. If you want to save the add-in for next time you load VS.NET or add 3rd party add-ins you have have to use the add-ins toolbox (accessible from 'Tools/Managed Add-Ins..'). You can drag-and-drop EXE files onto the toolbox. To launch them double click or right click and 'connect'.

I'm going to be setting up a gallery with screen shots and links to applications that work well as add-ins. If you have written or found and application that works well, please send me a screen shot and a link.  You can find Managed Add-Ins and the latest revision of my article here www.managedaddins.net. If you use the Reflector Add-In installer that is there, please let me know how you get on. Otherwise drop me a mail and I'll let you know when a version I am happy with is ready.

Posted by Jamie Cansdale | 2 comment(s)
Filed under:
More Posts