Deploying Components

Hello,

I've been using the Compare SDK for a little while and we're ready to deploy our first component that uses it. We would like to re-use our code in several of our projects but our assembly plus all of the referenced Red Gate assemblies result in no less than 8 .dll files that need to be deployed with every project that references our component.

My first thought was to use ILMerge to bring the number of assemblies down to just a couple. However, I'm having bad luck at runtime getting my new "merged" assembly to work. I believe there is an issue with the way the Red Gate components are licensed, but I'm not sure. In fact, I'm not even sure ILMerge works with licensed components.

I've pasted the runtime exception I get when I make a call into my merged assembly below:

System.MissingMethodException was unhandled by user code
Message=Constructor on type 'dk' not found.
Source=mscorlib
StackTrace:
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, Object[] args)
at System.SecurityUtils.SecureCreateInstance(Type type, Object[] args)
at System.ComponentModel.LicenseManager.ValidateInternalRecursive(LicenseContext context, Type type, Object instance, Boolean allowExceptions, License& license, String& licenseKey)
at System.ComponentModel.LicenseManager.ValidateInternal(Type type, Object instance, Boolean allowExceptions, License& license)
at System.ComponentModel.LicenseManager.Validate(Type type, Object instance)
at RedGate.SQLCompare.Engine.Database..ctor()
at FiveNines.Sql.SchemaComparison.GetDifferences(IConnectionInfo sourceConnection, IConnectionInfo destinationConnection) in D:\VS2010\FiveNines.SQL\FiveNines.SQL\SchemaComparison.cs:line 39

Does anyone have a good way to eliminate some of the required/referenced dll files for deploying components based on the Red Gate Comparison SDK?

Thanks for any input you might have.

Comments

Sign In or Register to comment.