Addin Dependency

Jul 20, 2009 at 12:53 AM

What is the best way to accommodate dependencies defined by an add-in contract?  For example, lets say that I have the following interface signature defined in my add-in contract:

MyResponseObject MyAddinMethod(MyRequestObject request);

If 'MyResponseObject' and 'MyRequestObject' are defined in a separate assembly and shared amongst all add-in projects that reference them, what is the best means to accommodate this.  I have tried referencing the shared assembly and setting to 'Copy local=false', but I get an 'System.Reflection.ReflectionTypeLoadException' relaying that the pipeline was unable to determine one or more types.

Jul 21, 2009 at 5:16 AM

you may try put youR common assemblies into GAC?

Jul 21, 2009 at 4:25 PM

Yeah, that is one approach.  The other appears to be that all dependencies must be copy local true in the AddInView, AddInAdapters, HostAdapters, and HostService.  These two methods take care of the assembly references.  My other question is how to maintain version resiliency across the pipeline when using custom dependencies and/or whether or not it is possible.

Oct 4, 2009 at 5:09 AM

There are two versions, that of the attribute of the addin and one for the assembly. Binding requires redirects on assembly-level, should the version not match, in the configuration file for that appdomain, or otherwise, if the version number doesn't match on the attribute for inter-addin dependencies (add-in referencing add-in), it probably doesn't keep track of dependencies.