简体   繁体   English

无法加载文件或程序集'Microsoft.Azure.CosmosDB.BulkImport,版本= 2.0.0.0

[英]Could not load file or assembly 'Microsoft.Azure.CosmosDB.BulkImport, Version=2.0.0.0

At the runtime, I keep running into this issue: 在运行时,我一直遇到这个问题:

Could not load file or assembly 'Microsoft.Azure.CosmosDB.BulkImport, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. 无法加载文件或程序集“ Microsoft.Azure.CosmosDB.BulkImport,版本= 2.0.0.0,文化=中性,PublicKeyToken = 31bf3856ad364e35”或其依赖项之一。

I believe BulkImport comes from the BulkExecutor package, and I can find BulkExecutor package in packages.config : 我相信BulkImport来自BulkExecutor包,我可以在packages.config找到BulkExecutor包:

  <package id="Microsoft.Azure.CosmosDB.BulkExecutor" version="1.1.0" targetFramework="net462" />

But I cannot find the Microsoft.Azure.CosmosDB.BulkImport mentioned in neither packages.config nor app.config . 但是我找不到packages.configapp.config中都提到的Microsoft.Azure.CosmosDB.BulkImport

I can, however, find Microsoft.Azure.CosmosDB.BulkImport.dll in \\src\\packages\\Microsoft.Azure.CosmosDB.BulkExecutor.1.1.0\\lib\\net451\\ 但是,我可以在\\src\\packages\\Microsoft.Azure.CosmosDB.BulkExecutor.1.1.0\\lib\\net451\\找到Microsoft.Azure.CosmosDB.BulkImport.dll \\src\\packages\\Microsoft.Azure.CosmosDB.BulkExecutor.1.1.0\\lib\\net451\\

and this is referenced in .csproj file. 这在.csproj文件中引用。

I tried clearing the bin folder, clean/build project, uninstalling and reinstalling BulkExecutor library, rebooting Visual Studio 2015, but did not work. 我尝试清除bin文件夹,清理/构建项目,卸载并重新安装BulkExecutor库,重新启动Visual Studio 2015,但是没有用。

I'm using VS 2015, Microsoft.Azure.CosmosDB.BulkExecutor v.1.1.0, .NET Framework v.4.6.2, Microsoft.Azure.DocumentDB v.2.0.0 and Newtonsoft.Json v.10.0.2. 我正在使用VS 2015,Microsoft.Azure.CosmosDB.BulkExecutor v.1.1.0,.NET Framework v.4.6.2,Microsoft.Azure.DocumentDB v.2.0.0和Newtonsoft.Json v.10.0.2。

But I cannot find the Microsoft.Azure.CosmosDB.BulkImport mentioned in neither packages.config nor app.config. 但是我找不到在packages.config和app.config中都提到的Microsoft.Azure.CosmosDB.BulkImport。

Download the nuget package , rename it to microsoft.azure.cosmosdb.bulkexecutor.1.1.0.zip then you can check the content. 下载nuget软件包 ,将其重命名为microsoft.azure.cosmosdb.bulkexecutor.1.1.0.zip然后可以检查其内容。

You'll find the Microsoft.Azure.CosmosDB.BulkImport.dll is part of the Microsoft.Azure.CosmosDB.BulkExecutor nuget package. 您会发现Microsoft.Azure.CosmosDB.BulkImport.dllMicrosoft.Azure.CosmosDB.BulkExecutor nuget包的一部分。 When you reference the Microsoft.Azure.CosmosDB.BulkExecutor package in packages.config file, you're actually referencing the Microsoft.Azure.CosmosDB.BulkImport.dll . 当您在packages.config文件中引用Microsoft.Azure.CosmosDB.BulkExecutor包时,您实际上是在引用Microsoft.Azure.CosmosDB.BulkImport.dll

And as I know, the normal Hintpath for packages.config format in xx.csproj should be something like: 据我所知,xx.csproj中packages.config格式的xx.csproj应该类似于:

<HintPath>..\packages\Microsoft.Azure.CosmosDB.BulkExecutor.1.1.0\lib\net451\Microsoft.Azure.CosmosDB.BulkImport.dll</HintPath>

At the runtime, I keep running into this issue: 在运行时,我一直遇到这个问题:

So the compile and build succeeded, this issue only occur in runtime? 那么编译和构建成功了,这个问题只发生在运行时吗? If so, please check whether the Microsoft.Azure.CosmosDB.BulkImport.dll is in your output folder.(Usually bin folder). 如果是这样,请检查Microsoft.Azure.CosmosDB.BulkImport.dll是否在您的输出文件夹中(通常是bin文件夹)。

For your error message, maybe your assembly can't find the Microsoft.Azure.CosmosDB.BulkImport.dll it referenced if the assembly wasn't copied to output folder.You can click the Microsoft.Azure.CosmosDB.BulkImport.dll in Solution Explorer , then set Copy Local to true in Properties Window . 对于您的错误信息,也许你的装配找不到Microsoft.Azure.CosmosDB.BulkImport.dll如果大会没有被复制到输出folder.You可以点击它引用Microsoft.Azure.CosmosDB.BulkImport.dllSolution Explorer ,然后在“ Properties Window中将“本地复制”设置为true。

If the issue persists though the Microsoft.Azure.CosmosDB.BulkImport.dll and your assembly or executable are in same folder, maybe you have a similar situation like this issue . 如果通过Microsoft.Azure.CosmosDB.BulkImport.dll和您的程序集或可执行文件在同一文件夹中仍然存在该问题,则可能出现类似此问题的情况 The issue could result from your code, it'll be better if you could share some simple code in your question to reproduce it. 这个问题可能是由您的代码引起的,如果您可以在问题中共享一些简单的代码来重现它,那就更好了。

暂无
暂无

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

相关问题 无法加载文件或程序集 Microsoft.VisualStudio.Shell,版本 = 2.0.0.0 - Could not load file or assembly Microsoft.VisualStudio.Shell, Version=2.0.0.0 无法加载文件或程序集Microsoft.Owin.Security.OAuth,Version = 2.0.0.0 - Could not load file or assembly Microsoft.Owin.Security.OAuth, Version=2.0.0.0 无法加载文件或程序集&#39;System.Web.WebPages.Razor,版本= 2.0.0.0,win8 - Could not load file or assembly 'System.Web.WebPages.Razor, Version=2.0.0.0, win8 '无法加载文件或程序集 'netstandard,版本 = 2.0.0.0,...'。 不应加载引用程序集以执行 - 'Could not load file or assembly 'netstandard, Version=2.0.0.0, ...'. Reference assemblies should not be loaded for execution 无法加载文件或程序集&#39;System.Data version = 2.0.0.0&#39;或其依赖项之一 - Could not load file or assembly 'System.Data version=2.0.0.0' or one of its dependencies 运行时错误:无法加载文件或程序集&#39;Microsoft.Owin,版本= 3.0.0.0…Azure移动服务 - Runtime error: Could not load file or assembly 'Microsoft.Owin, Version=3.0.0.0…Azure mobile services 错误:无法加载文件或程序集 'Microsoft.Extensions.DependencyInjection.Abstractions,版本 = 3.1.0.0,在 Azure function 1 - Error: Could not load file or assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=3.1.0.0, in Azure function 1 Azure Function V3 无法加载文件或程序集 'Microsoft.Extensions.DependencyModel,版本 = 3.1.6.0 - Azure Function V3 Could not load file or assembly 'Microsoft.Extensions.DependencyModel, Version=3.1.6.0 NuGet 更新,现在抛出 OpenTok:System.IO.FileLoadException:无法在 CreateSession 上加载文件或程序集 JWT 版本 = 2.0.0.0 - NuGet update, now throwing OpenTok: System.IO.FileLoadException: Could not load file or assembly JWT Version=2.0.0.0 on CreateSession mscorlib:无法加载文件或程序集“Microsoft.Azure.WebJobs,版本=3.0.2.0 - mscorlib: Could not load file or assembly 'Microsoft.Azure.WebJobs, Version=3.0.2.0
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM