Retrieve the LoaderExceptions property for more information. Loader Exceptions: Could not load file or assembly 'Microsoft.SqlServer.BatchParser. 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. I know this question was asked for many times and I found many information on google regarding this problem, but I still can't solve the problem that exists on my DEV PC:( (Could not load file or assembly Microsoft.SqlServer.BatchParser). I installed as advised in many internet resources, but it not helped. Then I tried to install, but it says it can not be installed, since newer version exists already (I have SQL Server 2008 installed). * NOTE: This answer is for people who are using MS SQL SMO (Management Objects) from a C# program. I was struggling with the error mentioned in the question. The exact error I got was this: Could not load file or assembly 'Microsoft.SqlServer.BatchParser.dll' or one of its dependencies. A dynamic link library (DLL) initialization routine failed. (Exception from HRESULT: 0x8007045A) It ended up to be a problem with running.NET 2.0 assemblies within.NET 4.0 (or higher) CLR. The sql server SMO assemblies are built against v2.0.50727 of the runtime and hence the following section is required in the app.config (or web.config) PS: The hint was in on MSDN forums.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
November 2018
Categories |