简体   繁体   English

库 System.Threading.Tasks.Extensions 未在 Azure web 应用程序上加载

[英]Library System.Threading.Tasks.Extensions not loaded on Azure web app

Since I added a reference to Azure.Container.Blob on my .net 4.8 web app I had several issues with the libraries used by the package. Since I added a reference to Azure.Container.Blob on my .net 4.8 web app I had several issues with the libraries used by the package. I managed to solve most of the issues but I am stuck with this one when I try to load a page:我设法解决了大部分问题,但是当我尝试加载页面时,我被这个问题困住了:

Could not load file or assembly 'System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.
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.FileNotFoundException: Could not load file or assembly 'System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.

On compilation there is no issue, and on my local dev server there is no issue as well, even during the load of said pages.在编译时没有问题,在我的本地开发服务器上也没有问题,即使在加载所述页面时也是如此。

I have this setting in my web.config我的 web.config 中有这个设置

<dependentAssembly>
    <assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
</dependentAssembly>

Which should be managed by the app but it can't find it as shown on the error page:应该由应用程序管理,但找不到它,如错误页面所示:

[FileNotFoundException: Could not load file or assembly 'System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.]

[FileNotFoundException: Could not load file or assembly 'System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.]

It appears that the dll is not copied into the publish directory by MSBuild, which make the deploy to server not copy it either (as it does not exists). dll 似乎没有被 MSBuild 复制到发布目录中,这使得部署到服务器也不会复制它(因为它不存在)。

暂无
暂无

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

相关问题 伪造 Azure 的“BlobContainerClient”时出现 System.Threading.Tasks.Extensions 错误 - System.Threading.Tasks.Extensions error when faking "BlobContainerClient" of Azure 另一个“无法加载文件或程序集'System.Threading.Tasks.Extensions,版本= 4.2.0.0” - Another “Could not load file or assembly 'System.Threading.Tasks.Extensions, Version=4.2.0.0” Android Xamarin应用程序中System.Threading.Tasks.RangeWorker.FindNewWork中的NullReferenceException - NullReferenceException in System.Threading.Tasks.RangeWorker.FindNewWork in Android Xamarin app ASP.net应用程序崩溃 - 无法加载文件或程序集&#39;Microsoft.Threading.Tasks.Extensions.Desktop&#39; - ASP.net app crashes - Could not load file or assembly 'Microsoft.Threading.Tasks.Extensions.Desktop' “System.Threading.Tasks.Task`1 [System.Web.Mvc.ActionResult]”显示而不是查看 - “System.Threading.Tasks.Task`1[System.Web.Mvc.ActionResult]” displayed instead of view System.Threading.Tasks - &gt; Continuations - System.Threading.Tasks -> Continuations 等待句柄和System.Threading.Tasks命名空间 - Wait Handles and the System.Threading.Tasks namespace System.Threading.Tasks - 限制并发任务的数量 - System.Threading.Tasks - Limit the number of concurrent Tasks .net ExternalSigninAsync MissingMethodException System.Threading.tasks - .net ExternalSigninAsync MissingMethodException System.Threading.tasks System.Threading.Tasks不服从开始规则? - System.Threading.Tasks not obeying start rules?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM