StrataFrame Forum

Click Once SQL 2008 SMO objects

http://forum.strataframe.net/Topic23157.aspx

By Luke Wells - 5/17/2009

We have recently moved to VS2008 and SQL 2008 from VS2005 and SQL 2005.

I have a problem when we deploy our click once application, the following message is displayed

Unable to install or run the application. The application requires that assembly Microsoft.SqlServer.Dmf Version 10.0.0.0 be installed in the Global Assembly Cache (GAC) first.

The assembly is included in the deployment files, but as far as I am aware Click Once cannot deploy directly to the GAC. The issue seems to stem from the Microsoft.SqlServer.Smo assembly which is referenced in the Strataframe DBEngine and UI assemblies. Our application does not reference any SQLServer assemblies directly.

Do you have any ideas on how we can deploy these assemblies through click once?

By Trent L. Taylor - 5/18/2009

As you can probably find on other threads, I am not a fan of ClickOnce and so we abandoned it long ago.  However, this is just a SQL Server SMO 10 assembly reference.  In the most recent version of SF (1.6.7) we have removed all SMO references from all projects EXCEPT the dbengine as this is what is used for database deployment through the DDT.  The error that it is giving you, do you get this when you are trying to build the package or when you are trying to deploy the package?  In either case, it is just a matter of loading the SMO assemblies.  We actually have an MSM that we distribute with SF to help with this.  You can find it in the c:\program files\MicroFour\StrataFrame\Distribution\SQLSMOMergeModule.msm path.  This includes all of the SMO assemblies required for distribution.  If ClickOnce will not support MSM files, then you can also download the SMO 10 MSI redistributable from Microsoft's website.
By Greg McGuffey - 5/18/2009

If you are actually using the dbengine from SF, then you'll need to use the prerequisites feature of ClickOnce to get the SQL DLL loaded into the GAC. However, likely you aren't actually using this in your app and you just need to uncheck this as a required file in the ClickOnce (publish) area.