none
Trouble with 'Microsoft.Data.Tools.Sql.BatchParser' assembly at runtime. RRS feed

  • Question

  • Hello.

    I believe this is the right forum to ask for help.

    I have solution with 10 projects in it. The main project is ASP.NET MVC type.

    Solution compiles with no errors, but when I try to run it under IISExpress or IIS it fails with following error:

    Could not load file or assembly 'Microsoft.Data.Tools.Sql.BatchParser' or one of its dependencies. Strong name signature could not be verified.  The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Data.Tools.Sql.BatchParser' or one of its dependencies. Strong name signature could not be verified.  The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.Data.Tools.Sql.BatchParser' could not be loaded.

    === Pre-bind state information ===
    LOG: DisplayName = Microsoft.Data.Tools.Sql.BatchParser
     (Partial)
    WRN: Partial binding information was supplied for an assembly:
    WRN: Assembly Name: Microsoft.Data.Tools.Sql.BatchParser | Domain ID: 2
    WRN: A partial bind occurs when only part of the assembly display name is provided.
    WRN: This might result in the binder loading an incorrect assembly.
    WRN: It is recommended to provide a fully specified textual identity for the assembly,
    WRN: that consists of the simple name, version, culture, and public key token.
    WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
    LOG: Appbase = file:///C:/Development/BBB.WebUI.EmailCampaignServices/
    LOG: Initial PrivatePath = C:\Development\BBB.WebUI.EmailCampaignServices\bin
    Calling assembly : (Unknown).
    ===
    LOG: This bind starts in default load context.
    LOG: Using application configuration file: C:\Development\BBB.WebUI.EmailCampaignServices\web.config
    LOG: Using host configuration file: C:\Users\...\Documents\IISExpress\config\aspnet.config
    LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
    LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
    LOG: Attempting download of new URL file:///C:/Users/.../AppData/Local/Temp/Temporary ASP.NET Files/vs/8f69f049/4911aaa9/Microsoft.Data.Tools.Sql.BatchParser.DLL.
    LOG: Attempting download of new URL file:///C:/Users/.../AppData/Local/Temp/Temporary ASP.NET Files/vs/8f69f049/4911aaa9/Microsoft.Data.Tools.Sql.BatchParser/Microsoft.Data.Tools.Sql.BatchParser.DLL.
    LOG: Attempting download of new URL file:///C:/Development/BBB.WebUI.EmailCampaignServices/bin/Microsoft.Data.Tools.Sql.BatchParser.DLL.
    LOG: Using application configuration file: C:\Development\BBB.WebUI.EmailCampaignServices\web.config
    LOG: Using host configuration file: C:\Users\...\Documents\IISExpress\config\aspnet.config
    LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
    LOG: Post-policy reference: Microsoft.Data.Tools.Sql.BatchParser, Version=14.1.17282.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91
    ERR: Failed to complete setup of assembly (hr = 0x80131045). Probing terminated.
    

    Stack Trace:

    [FileLoadException: Could not load file or assembly 'Microsoft.Data.Tools.Sql.BatchParser' or one of its dependencies. Strong name signature could not be verified.  The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)]
    
    [FileLoadException: Could not load file or assembly 'Microsoft.Data.Tools.Sql.BatchParser, Version=14.1.17282.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. Strong name signature could not be verified.  The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)]
       System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
       System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +36
       System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +152
       System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +77
       System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +21
       System.Reflection.Assembly.Load(String assemblyString) +28
       System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +38
    
    [ConfigurationErrorsException: Could not load file or assembly 'Microsoft.Data.Tools.Sql.BatchParser, Version=14.1.17282.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. Strong name signature could not be verified.  The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)]
       System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +726
       System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +196
       System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +45
       System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +172
       System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +91
       System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +111
       System.Web.Compilation.BuildManager.ExecutePreAppStart() +156
       System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +695
    
    [HttpException (0x80004005): Could not load file or assembly 'Microsoft.Data.Tools.Sql.BatchParser, Version=14.1.17282.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. Strong name signature could not be verified.  The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)]
       System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +659
       System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +89
       System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +190
    


    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3160.0

    Actually file does exist in C:/Development/BBB.WebUI.EmailCampaignServices/bin/Microsoft.Data.Tools.Sql.BatchParser.DLL

    It has only one dependency and neither of them are used in solution.

    Also I have MSVS2017 and SQL Server 2017 developer edition installed.

    Any ideas where I should look into to fix it?

    Thank you.

    Monday, August 13, 2018 11:35 PM

All replies

  • Hi Yuri.A,

    Thank you for posting here.

    Since your question is more related to ASP.NET, you could post a new thread in ASP.NET forum for suitable support.

    https://forums.asp.net/

    The CLR Forum discuss and ask questions about .NET Framework Base Classes (BCL) such as Collections, I/O, Regigistry, Globalization, Reflection. Also discuss all the other Microsoft libraries that are built on or extend the .NET Framework, including Managed Extensibility Framework (MEF), Charting Controls, CardSpace, Windows Identity Foundation (WIF), Point of Sale (POS), Transactions.

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, August 14, 2018 5:41 AM