Welcome to MSDN Blogs Sign in | Join | Help

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

 

 

Published Friday, April 13, 2007 4:22 PM by CLR Add-In Team
Filed under:

Attachment(s): MyAutomationApplication.zip

Comments

Saturday, April 14, 2007 12:05 PM by Jason Haley

# Interesting Finds: April 14, 2007

Saturday, April 14, 2007 12:38 PM by Tom Guinther

# re: Automation Add-Ins [Jesse Kaplan]

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

Monday, April 16, 2007 12:51 AM by CLR Add-In Team

# re: Automation Add-Ins [Jesse Kaplan]

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.

Thursday, April 19, 2007 12:34 PM by DotNetKicks.com

# System.Addin is still evolving

You've been kicked (a good thing) - Trackback from DotNetKicks.com

Tuesday, May 01, 2007 5:29 PM by noslenytram

# What is ContractHandle and what happened to LifetimeTokenHandle?

In your sample you are using System.AddIn.Pipeline.ContractHandle which does not appear in C:\WINDOWS\Microsoft.NET\Framework\v3.5.20209.

It looks like you had some GAC references to C:\WINDOWS\assembly\GAC_MSIL\System.AddIn\3.5.0.0__b77a5c561934e089\System.AddIn.dll - but I don't think that should matter here?  I repointed mine to the above path.

Tuesday, May 01, 2007 7:11 PM by CLR Add-In Team

# re: Automation Add-Ins [Jesse Kaplan]

I'm sorry about ContractHandle showing up in this sample. This is the peril of building samples on a dev box. Post-beta 1 we renamed LifetimeTokenHandle to ContractHandle, replacing ContractHandle with LifetimeTokenHandle in the code should fix everything up.

Wednesday, October 10, 2007 11:36 AM by Boris Yurovsky

# re: Automation Add-Ins [Jesse Kaplan]

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.

Friday, November 02, 2007 8:23 PM by Marlun

# re: Automation Add-Ins [Jesse Kaplan]

I'm also wondering about the same thing as Boris Yurovsky.

Thursday, November 29, 2007 11:10 AM by Claus Brod

# re: Automation Add-Ins [Jesse Kaplan]

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!

Thursday, December 06, 2007 11:05 AM by Dariusz quatscht

# System.AddIn: Eventing zwischen Host und AddIn

Zum System.AddIn Namespace habe ich bereits das ein oder andere geschrieben. Das Beispiel das ich benutze

Thursday, December 13, 2007 11:10 AM by Zq3

# re: Automation Add-Ins [Jesse Kaplan]

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

Monday, March 10, 2008 4:30 PM by Jack Gudenkauf (JackG) WebLog

# Extensibility; Clients and Services calling each other

In this post I will be showing sample code (also found on our CodePlex site ) as well as an execution

New Comments to this post are disabled
 
Page view tracker