StrataFrame Forum

ClickOnce, Referenced Assemblies and Database Connections

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

By Bill Cunnien - 1/11/2008

Hello, All!

I successfully deployed the application via ClickOnce.  There are two outstanding issues with the deployment, however.  The first is regarding two warnings that I am getting after the app is published.

Warning 1: Referenced assembly 'C:\WINDOWS\assembly\GAC_32\Microsoft.SqlServer.BatchParser\9.0.242.0__89845dcd8080cc91\Microsoft.SqlServer.BatchParser.dll' targets a different processor than the application.

Warning 2: Referenced assembly 'c:\Program Files\Microsoft SQL Server\90\SDK\Assemblies\Microsoft.SqlServer.Replication.dll' targets a different processor than the application.

Does anyone know why I might be getting these warnings?

The second issue is about the initial database connection window that pops up on initial startup of the app.  I thought I corrected this by establishing the data sources manually.  I have five databases that I am interacting with (including the security DB).  I really don't want the user to have to enter any database connection information.  How do I prevent that from happening?

Thanks!!
Bill

By Greg McGuffey - 1/11/2008

Warning1:Referenced assembly 'C:\WINDOWS\assembly\GAC_32\Microsoft.SqlServer.BatchParser\9.0.242.0__89845dcd8080cc91\Microsoft.SqlServer.BatchParser.dll' targets a different processor than the application.



Warning2:Referenced assembly 'c:\Program Files\Microsoft SQL Server\90\SDK\Assemblies\Microsoft.SqlServer.Replication.dll' targets a different processor than the application.




Chances are that you aren't actually using these two assemblies. However, somehow they get added to the project because they are indirectly referenced by the SF assemblies (they reference assemblies that reference assemblies that end up with these being included). I think I asked a question about this 6-8 months ago. I removed them from my ClickOnce installation and all works well...no more warnings either. BigGrin



The second issue is about the initial database connection window that pops up on initial startup of the app.... How do I prevent that from happening?




Make sure you aren't use the ConnectionManager any more. The ConnectionManager.SetConnections() call is opening the db connection window. If you are using DataLayer.DataSources(), then you don't need any calls to the ConnectionManager. The ConnectionManager is just a class to set the DataSources.



Hope that helps!
By Bill Cunnien - 1/11/2008

Greg...many thanks!

I excluded those two assemblies and the publication works without any errors or warnings.  w00t

Also, I did have the ConnectionManager.SetConnections running at startup.  I must have forgotten to turn that off. Tongue

All is well.  It has been a very good day!

Smooooth
Bill

By Greg McGuffey - 1/11/2008

I love it when it works! w00t