Share via


Automation Add-Ins [Jesse Kaplan]

First off I'd like to apologize for the long pause between posts. We've been working heads down on some pretty exciting add-in stuff that we can't announce just yet and haven't had as much time as we'd like to spend on this blog. We're wrapping that work up now though so you should see the stream of posts picking up.

To start us off I'd like to post a quick sample to responds to a lot of questions I've been getting.

All of our samples so far have been pretty simplistic with very shallow object models that are focused on the add-ins providing a service to the host. The two most common questions I recieve about our model is how it applies when the host is actually providing a service to the add-in (think of an automation scenario) and how to express events in the pipeline. Attached is a sample that shows a complete pipeline demonstrating some typical patterns in a host automation scenario. It doesn't include an actual host or add-in but as you'll see when you look at the two views that the programming experience for both would still be smooth even with the more complex object model.

 

Note: The attached samples was built for a pre-RTM version of .NetFX 3.5 and will not work on the RTM build. For an updated sample please see our codeplex site: https://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=clraddins&ReleaseId=9474

Additionally there is a sample available demonstrating add-ins exposing events to hosts and includes both the host and the add-in so you can easily step through it and follow the code. It is available here:  https://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=clraddins&ReleaseId=10199

 

 

MyAutomationApplication.zip

Comments

  • Anonymous
    April 14, 2007
    I think the stuff you guys are doing is great and I am looking forward to using it. Having developed an advanced plug-in architecture that seems similar to what you guys are doing (we are solving the same problems), I am disappointed that it is a 4GB+ download (and a host of other Orcas headaches as well) when it could clearly be implemented on the 2.0 framework. Eventually this wont be an issue and everyone will have .NET 3.5 etc.Why not provide the same basic functionality for 2.0/3.0 in a 100kb download?Tom
  • Anonymous
    April 15, 2007
    I'm glad you're interested in what we're working on and all I can tell you about the deployment issues is to just hang in there. As we get into the beta phase and onwards towards release we (not the add-in team specifically but the .net framework team in general) will be working to make deployment of our beta and final bits easier.In the end deployment of the 3.5 framework should be relatively easy as it will end up being just a bunch of new managed assemblies that depend on the latest SP of 2.0/3.0.
  • Anonymous
    April 19, 2007
    You've been kicked (a good thing) - Trackback from DotNetKicks.com
  • Anonymous
    May 01, 2007
    In your sample you are using System.AddIn.Pipeline.ContractHandle which does not appear in C:WINDOWSMicrosoft.NETFrameworkv3.5.20209.It looks like you had some GAC references to C:WINDOWSassemblyGAC_MSILSystem.AddIn3.5.0.0__b77a5c561934e089System.AddIn.dll - but I don't think that should matter here?  I repointed mine to the above path.
  • Anonymous
    May 01, 2007
    The comment has been removed
  • Anonymous
    October 10, 2007
    This is great! This new Add-In architecture can help my company to solve the problems we're facing developing our framework. I was wondering if there is a way for a Add-In to pass UI objects through the pipeline to the host side. ExtensibleCalculator sample shows how to do it with WPF control using INativeContractHandle interface. How about Window.Forms controls? Is it the same interface to be used for it as well?Boris.
  • Anonymous
    November 02, 2007
    I'm also wondering about the same thing as Boris Yurovsky.
  • Anonymous
    November 29, 2007
    Hi Jesse,thanks for the sample code! Do you happen to have matching host/addin code for this as well? I think being able to step through calls between host and addin would make it much easier for me to understand what's going on.Also, is there a sample out there which demonstrates a simple host object model without events? Maybe that would make it easier to grasp the basic concepts, too.Thanks!
  • Anonymous
    December 06, 2007
    Zum System.AddIn Namespace habe ich bereits das ein oder andere geschrieben. Das Beispiel das ich benutze
  • Anonymous
    December 13, 2007
    Hi, I have a question for you regarding the Automation Add-Ins sample (http://blogs.msdn.com/clraddins/archive/2007/04/13/automation-add-ins-jesse-kaplan.aspx).I implemented a host app and simple add-in to see the sample working, but I don't understand something.I subscribe to the HostObject event (DocumentLoad) into the HostApplication, and then when in the add-in I receive the HostObject (in the Initialize method) the event is null, it's that right?I was thinking that in the add-in I can raise the HostObject event and the host application will be called. Is that the normal behavior or the normal behavior is to subscribe also to the HostObject event in the add-in and then when in the host the event is raised this will call the add-in event?Thanks
  • Anonymous
    March 10, 2008
    The comment has been removed