0
votes

I am trying to develop a windows application (I am using VS 2015, OS: Windows 2007). This application executes some SQL scripts to a destination server (SQL Server 2017). Whenever we are trying to execute those scripts it's shows the following error

Could not load file or assembly 'Microsoft.SqlServer.BatchParser, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.":"Microsoft.SqlServer.BatchParser, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91

I have already used the following dll

enter image description here

I also share Microsoft.SqlServer.BatchParser version in C:\Windows\assembly

enter image description here

1

1 Answers

0
votes

Based on what I looked up in Google search (https://social.msdn.microsoft.com/Forums/sqlserver/en-US/4d682289-9e06-4dd3-aff3-d08ad437896d/file-or-assembly-quotmicrosoftsqlserverbatchparser-error?forum=sqldatabaseengine), it could be an issue with your Windows being 64-bit and SQL Server being 32-bit.

As per their suggestion, you need to check whether or not you have both 32-bit and 64-bit versions in the folder C:\Windows\Assembly\Microsoft.SqlServer.BatchParser (x86 and AMD64). If not, you need to install the required versions from the below link:

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