简体   繁体   English

在Visual Studio 2015上加载ASP.NET MVC网站时,获取“无法加载文件或程序集'Microsoft.SqlServer.BatchParser,版本= 13.0.0.0”

[英]Getting “Could not load file or assembly 'Microsoft.SqlServer.BatchParser, Version=13.0.0.0” when loading ASP.NET MVC site on Visual Studio 2015

I've upgraded my ASP.NET MVC Core project from 1.0 to 1.1 recently. 我最近将ASP.NET MVC Core项目从1.0升级到了1.1。 I started to get some messages during the load process when I try to run the project in debug in Visual Studio 2015. 当我尝试在Visual Studio 2015中的调试中运行项目时,我开始在加载过程中收到一些消息。

Could not load file or assembly 'Microsoft.SqlServer.BatchParser, Version=13.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. 无法加载文件或程序集'Microsoft.SqlServer.BatchParser,版本= 13.0.0.0,区域性=中性,PublicKeyToken = 89845dcd8080cc91'或其依赖项之一。 The system cannot find the file specified. 该系统找不到指定的文件。

I've tried reinstalling SQL Server 2012 and also SMO but to no avail. 我尝试重新安装SQL Server 2012和SMO,但无济于事。

Has anyone come across this before? 有人遇到过吗?

FYI, this is my project.json. 仅供参考,这是我的project.json。 All the references are working as far as I can tell. 据我所知,所有参考文献都在起作用。

{

  "dependencies": {
    "Microsoft.NETCore.App": {
      "version": "1.1.2",
      "type": "platform"
    },
    "Microsoft.AspNetCore.Authentication.Cookies": "1.1.2",
    "Microsoft.AspNetCore.Diagnostics": "1.1.2",
    "Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore": "1.1.2",
    "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.1.2",
    "Microsoft.AspNetCore.Mvc": "1.1.3",
    "Microsoft.AspNetCore.Razor.Tools": {
      "version": "1.1.0-preview4-final",
      "type": "build"
    },
    "Microsoft.AspNetCore.Routing": "1.1.2",
    "Microsoft.AspNetCore.Server.IISIntegration": "1.1.2",
    "Microsoft.AspNetCore.Server.Kestrel": "1.1.2",
    "Microsoft.AspNetCore.StaticFiles": "1.1.2",
    "Microsoft.EntityFrameworkCore": "1.1.2",
    "Microsoft.EntityFrameworkCore.Tools": "1.1.1",
    "Microsoft.EntityFrameworkCore.SqlServer": "1.1.2",
    "Microsoft.EntityFrameworkCore.SqlServer.Design": "1.1.2",
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.2",
    "Microsoft.Extensions.Configuration.Json": "1.1.2",
    "Microsoft.Extensions.Configuration.UserSecrets": "1.1.2",
    "Microsoft.Extensions.Logging": "1.1.2",
    "Microsoft.Extensions.Logging.Console": "1.1.2",
    "Microsoft.Extensions.Logging.Debug": "1.1.2",
    "Microsoft.Extensions.Options.ConfigurationExtensions": "1.1.2",
    "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.1.0",
    "Microsoft.VisualStudio.Web.CodeGenerators.Mvc": {
      "version": "1.1.1",
      "type": "build"
    },
    "NLog.Web.AspNetCore": "4.3.0",
    "NToastNotify": "1.0.6"
  },

  "tools": {
    "BundlerMinifier.Core": "2.4.337",
    "Microsoft.AspNetCore.Razor.Tools": "1.1.0-preview4-final",
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.1.0-preview4-final",
    "Microsoft.EntityFrameworkCore.Tools": "1.1.1",
    "Microsoft.Extensions.SecretManager.Tools": "1.0.1"
  },

  "frameworks": {
    "netcoreapp1.1": {
      "imports": [
        "dotnet5.6",
        "portable-net45+win8"
      ]
    }
  },

  "buildOptions": {
    "emitEntryPoint": true,
    "preserveCompilationContext": true
  },

  "runtimeOptions": {
    "configProperties": {
      "System.GC.Server": true
    }
  },

  "publishOptions": {
    "include": [
      "wwwroot",
      "**/*.cshtml",
      "appsettings.json",
      "web.config",
      "nlog.config"
    ]
  },

  "scripts": {
    "prepublish": [ "bower install", "dotnet bundle" ],
    "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
  }
}

It turns out 1 of the upgraded assemblies has a dependency with the BatchParser assembly. 事实证明,其中1个升级的程序集与BatchParser程序集具有依赖性。 Which one I'm not sure but I suspect it was 1 of the EF Core assemblies. 我不确定哪一个,但我怀疑它是EF Core组件中的1个。

I was not able to obtain the Batchparser on its own, and the only source I was able to find it was via a new install of SQL Server 2017 express. 我无法自行获得Batchparser,而唯一能够找到的来源是通过新安装的SQL Server 2017 Express。 Hope this helps someone. 希望这对某人有帮助。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法加载文件或程序集 Microsoft.SqlServer.BatchParser? - Could not load file or assembly Microsoft.SqlServer.BatchParser? 无法加载文件或程序集“ Microsoft.SqlServer.BatchParser” - Could not load file or assembly 'Microsoft.SqlServer.BatchParser' 无法加载文件或程序集'Microsoft.SqlServer.TransactSql,Version = 13.0.0.0 - Could not load file or assembly 'Microsoft.SqlServer.TransactSql, Version=13.0.0.0 无法加载文件或程序集'Microsoft.VisualStudio.TeamSystem.Licensing,用visual studio 2015打开ASP.Net MVC项目后 - Could not load file or assembly 'Microsoft.VisualStudio.TeamSystem.Licensing, After opening ASP.Net MVC project with visual studio 2015 通过C#备份SQL Server。 找不到文件,无法加载Microsoft.SqlServer.BatchParser什么?! - SQL Server Backup through C#. File not found, could not load Microsoft.SqlServer.BatchParser what?! 无法在生产ASP.net网站上加载文件或程序集Microsoft.SqlServer.SqlClrProvider,它在哪里? - Could not load file or assembly Microsoft.SqlServer.SqlClrProvider on production ASP.net site, where is it? 无法加载文件或程序集Microsoft.ReportViewer.ProcessingObjectModel,版本= 13.0.0.0 - Could not load file or assembly Microsoft.ReportViewer.ProcessingObjectModel, Version=13.0.0.0 部署到Plesk 12.5的ASP.NET MVC不能加载文件或程序集'Microsoft.IdentityModel - ASP.NET MVC Deployed to Plesk 12.5 throws Could not load file or assembly 'Microsoft.IdentityModel 无法加载文件或程序集'Microsoft.SqlServer.Smo,版本= 10.0.0 - Could not load file or assembly 'Microsoft.SqlServer.Smo, Version=10.0.0 无法加载文件或程序集 'Microsoft.SqlServer.Types,版本 = 11.0.0.0 - Could not load file or assembly 'Microsoft.SqlServer.Types, Version=11.0.0.0
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM