Deploying an SMO application on a workstation without installing SQL Server 2008

I am trying to deploy an application that uses SMO on a workstation without SQL Server installed on it. The application instance connects to SQL Server 2008. The application does not work with:

Could not load file or assembly "Microsoft.SqlServer.Replication, Version 10.0.0.0, Culture = neutral, PublicKeyToken = 89845cdc8080cc91" or one of its dependencies. An attempt was made to download a program with the wrong format.

The corresponding build is on the same path as my application, as well as system32. I run this on a Windows 7 64-bit box. I started SQL Server Native Client, CLR and MSI SMO from the 2008 SMO reassignment download page.

This application works great when connected to SQL Server 2005.

What gives?

+3
source share
1 answer

It seems to me that you are referring to SMO Version 10 in your project, but the client machine you are trying to deploy your application to is probably working with SMO version 9. I had the same problem and the link to my SMO link links was updated verison 9. I also set up SMO objects to copy local = true to ensure the correct build on the client machine.

+1
source

Source: https://habr.com/ru/post/1750099/


All Articles