Deploying Components

Automate and integrate using the SQL comparison API

Moderator: Chris Auckland

Deploying Components

Postby whatsit » Thu Jan 21, 2010 11:59 pm

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.
whatsit
 
Posts: 1
Joined: Thu Jan 21, 2010 11:49 pm
Location: USA

Postby Chris.Allen » Mon Jan 25, 2010 11:48 am

What you might find works well is to use one of our tools to "embed" all your assemblies into the main assembly. I'm talking about our newly-acquired {samartassembly} tool which you can trial in full feature mode to see if it will help you:

http://www.smartassembly.com/download/index.aspx

Please let me know f you have any questions about it.
Chris.Allen
 
Posts: 594
Joined: Thu Mar 12, 2009 4:17 pm


Return to SQL Comparison SDK Previous Versions

Who is online

Users browsing this forum: No registered users and 1 guest