简体   繁体   English

Azure WebJob失败:无法加载文件或程序集

[英]Azure WebJob fails: Could not load file or assembly

How can I add DLL files to an Azure WebJob, or link to the DLL files that are readily available in the corresponding Azure AppService? 如何将DLL文件添加到Azure WebJob,或链接到相应的Azure AppService中现成的DLL文件?

My WebJob is a Console application that is to run daily on a Cron schema. My WebJob是一个控制台应用程序,每天在Cron模式下运行。

When I test it manually, it fails with 当我手动测试时,它失败并显示

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'MyIISApp, Version=1.2.3.4, Culture=neutral, PublicKeyToken=null' or one of its dependencies. 未处理的异常:System.IO.FileNotFoundException:无法加载文件或程序集“ MyIISApp,版本= 1.2.3.4,区域性=中性,PublicKeyToken =空”或其依赖项之一。 The system cannot find the file specified. 该系统找不到指定的文件。

But I cannot select multiple files in the Azure WebJob file upload process. 但是我无法在Azure WebJob文件上传过程中选择多个文件。

I have already tried to upload the EXE file to my Azure AppService alongside the DLLs, but I cannot select this EXE file for Execution anywhere in the WebJobs tab - it always wants a single file upload. 我已经尝试将EXE文件与DLL一起上传到我的Azure AppService,但是我无法在WebJobs选项卡中的任何位置选择此EXE文件进行执行-它始终希望上传单个文件。

Upload a .zip file instead of a .exe file. 上载.zip文件而不是.exe文件。 The zip must contains all required files (exe, dll(s), etc.) 压缩文件必须包含所有必需的文件(exe,dll等)。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM