SqlCompare Assembly Dynamically Loaded

samelmoresamelmore Posts: 3
edited March 31, 2005 7:38AM in SQL Toolkit Previous Versions
I am trying to create an Nant custom task assembly so that I can automate some of the functions of the Sql Compare toolkit in my Nant build scripts. I have successfully created the Nant custom task and also have the Sql Compare command line properly registered. I have created the .lic file in my project as specified in the docs.

I believe that there is a problem with the way the Sql Compare Toolkit does it's licensing when run in a dynamic module (my custom task assembly which references the Sql Compare toolkit is loaded at runtime by the Nant assemblies). My Nant scripts are throwing this error:

System.NotSupportedException: The invoked member is not supported in a dynamic module.

The stack trace shows the following:

at System.Reflection.Emit.AssemblyBuilder.get_CodeBase()
at System.Reflection.Assembly.get_EscapedCodeBase()
at ?.?(Type )
at ?.GetLicense(LicenseContext context, Type type, Object instance, Boolean allowExceptions)
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()


Any way that this can be fixed?

Thanks,
Sam

Comments

This discussion has been closed.