Tuesday, November 23, 2010

Could not load file or assembly 'Microsoft.SqlServer.BatchParser'

Sirs:

I've seen several posts on this forum about this issue, and several have been resolved, but I'm not seeing the answer.

On my Windows 7 machine with SQL Server 2008 R2, I have a Visual Studio 2010 project that uses SQL SMO.

The app runs fine on my machine, but when I publish to another server, I get Could not load file or assembly 'Microsoft.SqlServer.BatchParserClient'

If I go to http://www.microsoft.com/downloads/en/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en

and install Microsoft SQL Server 2008 Native Client , Microsoft SQL Server System CLR Types , and Microsoft SQL Server 2008 Management Objects I stop getting the error.

It seems to me that I should just be able to properly reference what I need and deploy my project...

So- how do I deploy my project without needing these installs?

In you project you need to include all the dll of Microsoft SQL Server 2008 Management Objects and ( Microsoft SQL Server System CLR Types not sure if it is required ) but you still need to install the Microsoft SQL Server 2008 Native Client on the system where the application is going to be installed.

No comments: