5

Good Evening, I have a C# Winforms app with its deployment, where i did it, it works, in others pc it doesn't. Did somebody have the same issue and how did you solve it?

When I run from other pc is presents the next error:

could not load file or assembly 'microsoft.sqlserver.batchparserclient'

See image above

http://i47.photobucket.com/albums/f195/warbandit69/error1_zps3353dcce.png

---- Update 02-09-2014 -----

I added SQL Shared Management Objets AND CLR Types 2012 and finally get rid from last error, now i am having a similar one

http://i47.photobucket.com/albums/f195/warbandit69/error2_zps2749c6ac.png

12

2 Answers 2

2

I got the same problem, i fixed this by downloading SMO and CLR for SQL Server 2014 version x86 (from https://www.microsoft.com/fr-fr/download/details.aspx?id=42295).

I'm on a 64 bits system, first I tried with version x64. Like you my error change from microsoft.sqlserver.batchparserclient to microsoft.sqlserver.batchparser. But version x86 is fixed the Exception.

2

I was trying to run old project on new laptop and tried solution A that did not work. But i figured out that when I installed newest version of SSMS(managment studio) it updated references in the project to use new dll versions f.e Microsoft.SqlServer.Smo.dll, Microsoft.SqlServer.SqlEnum.dll that need proper version of 'microsoft.sqlserver.batchparserclient' but solution B worked out.

Solution A

https://www.microsoft.com/en-us/download/details.aspx?id=43339

Download Summary: 1. ENU\x64\SharedManagementObjects.msi 2. ENU\x64\SQLSysClrTypes.msi

https://social.technet.microsoft.com/wiki/contents/articles/35832.sql-server-troubleshooting-could-not-load-file-or-assembly-microsoft-sqlserver-batchparser.aspx

Solution B

Remove all references to Microsoft.SqlServer.SOMETHING and replace them with the version you have registered in GAC.

F.e I had references to version 14.x dlls in my project but i had older versions registered in GAC (C:\Windows\assembly) version 11 and 12, even though i have installed proper files from solution A (newer versions, x86, x64 you name it)

I have replaced the dlls in my project references from C:\Program Files\Microsoft SQL Server\140\SDK\Assemblies to C:\Program Files\Microsoft SQL Server\120\SDK\Assemblies

It is not the neatest solution for your project references but i needed it quickly to work and it did.

Not the answer you're looking for? Browse other questions tagged or ask your own question.