- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我目前正在使用在 Visual Studio 中创建的 Azure 函数。它是一个计时器函数,调用一些通用代码来写入队列。
在本地运行代码不会导致任何问题。运行得很好,但发布时出现以下错误:
Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=9.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.||System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=9.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.WindowsAzure.Storage, Version=9.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' at Esperanto.Core.Function.JobGetterLogic.SendJobsToQue() at JobGetter.TimedJob.Run(TimerInfo myTimer, TraceWriter log)
这是我的网络作业代码:
public static class TimedJob
{
[FunctionName("TimedJob")]
public static void Run([TimerTrigger("0 */1 * * * *")]TimerInfo myTimer, TraceWriter log)
{
log.Info($"C# Timer trigger function executed at: {DateTime.Now}");
try
{
var brain = new CoreLogic.Function.JobGetterLogic();
var result = brain.SendJobsToQue();
}
catch (Exception e)
{
log.Info(e.Message + "||" + e.ToString());
}
}
}
最佳答案
我的问题是因为 Newtonsoft.Json 版本,但我什至在发布之前安装 WindowsAzure.Storage 包时就得到了这个问题。
它在输出中给了我这个:
NU1107: Version conflict detected for Newtonsoft.Json. Reference the package directly from the project to resolve this issue.
PMTool.AzureFunctions -> WindowsAzure.Storage 9.1.0 -> Newtonsoft.Json (>= 10.0.2) PMTool.AzureFunctions -> Microsoft.NET.Sdk.Functions 1.0.6 -> Newtonsoft.Json (= 9.0.1).
然后回滚。
因此 Functions SDK 中的 Newtonsoft.Json 版本为 9.0.1,但在 Azure 存储上为 10.0.2。
并且可以肯定,如果像这样发布它会出现此错误:
"Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=9.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified."
因为根本没有被引用。
这可能不是您的确切问题,但它可能会给您提供线索。
关于c# - 无法加载文件或程序集 'Microsoft.WindowsAzure.Storage' Azure Functions,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49591628/
这两个程序集有什么区别以及何时应该使用它们?我发现它们之间存在类名冲突,所以我想我应该只使用一个。 示例 Microsoft.WindowsAzure.Storage 具有 Microsoft.Win
有一段时间,我在尝试使用 Azure 模拟器启动任何类型的应用程序时遇到以下错误: Microsoft Azure Tools: Method not found: 'Void Microsoft.W
我正在尝试使用队列,这是我遇到的异常: A first chance exception of type 'Microsoft.WindowsAzure.Storage.StorageExceptio
我使用的是 WindowsAzure.Storage 9.1.1。 它声明它依赖于 Newtonsoft >= 10.0.2 我使用的是 .NET Framework 4.5 我安装了 Newtons
我正在 Azure 数据工厂中运行自定义事件,当我尝试在 CloudAppendBlob 上工作时,会发生以下异常。看起来像是版本问题,但无法找到解决方法。我使用 Windows Azure Stor
我已连接到我的一个 WebRole 实例。但现在我能做什么呢?我启动服务器管理器并导航到角色 -> WebServer -> RD00123...,但我看到的似乎不是事件实例。当我单击“浏览网站”时,
我应该使用哪个版本的 WindowsAzure.Storage? https://www.nuget.org/packages/WindowsAzure.Storage/ 我有以下环境 - Micro
当我运行 Azure 项目时,我每 20 秒左右就会在输出中收到此消息: Microsoft.WindowsAzure.ServiceRuntime Verbose: 500 : Role insta
对 Azure SDK 各个部分的项目引用应该存在于 Azure SDK 的安装中,但由于某些奇怪的原因,我的代码(Azure 移动服务)无法再看到 Microsoft.WindowsAzure.Di
我正在尝试使用 Composer 安装 zendservice-windowsazure。我的composer.json 如下所示: { "repositories": [{
我正在努力连接我正在使用 ionic 框架制作的移动应用程序,并且正在努力将其连接到 Azure。 azure 网站说将以下代码行添加到我的 app.component.ts 中: declare v
目前我的应用程序使用 WindowsAzure.ServiceBus 2.8.2 包,我可以在 Fiddler 上检查是否存在到 https://{your-namespace}.accesscont
我需要导入 WindowsAzure 以在我的 ionic 项目中使用。 从“cordova-plugin-ms-azure-mobile-apps”导入 { WindowsAzure }; 无法导入
我无法在 Windows 通用应用程序中安装 NuGet 包。 我认为这可能是因为配置管理器与 Windows 通用应用程序不兼容,但现在我的 ServiceBus 包也遇到了同样的问题。 当我尝试通
我们目前正在尝试设置一个 Angular 2 项目,该项目的解决方案中还包含一个云服务项目。我们已经建立了许多包含云服务项目的 Angular 1 项目,并且没有出现任何错误。当尝试为 Angular
我有一个通过 git 部署的 Azure 网站设置,但是当我这样做时,我收到一个编译器错误,指出: D:\Windows\Microsoft.NET\Framework\v4.0.30319\Micr
我们的 azure 构建存在问题,只有在 csdef 文件的 WebRole/Contents/Content/SourceDirectory 部分中使用绝对路径才能使其正常工作。尽管它确实支持相对路
我有一个通过 git 部署的 Azure 网站设置,但是当我这样做时,我收到一个编译器错误,指出: D:\Windows\Microsoft.NET\Framework\v4.0.30319\Micr
我们的 azure 构建存在问题,只有在 csdef 文件的 WebRole/Contents/Content/SourceDirectory 部分中使用绝对路径才能使其正常工作。尽管它确实支持相对路
当我尝试将项目部署到云服务(使用持续部署和托管构建 Controller )时,我突然开始收到此错误。 C:\Program Files (x86)\MSBuild\Microsoft\VisualS
我是一名优秀的程序员,十分优秀!