webjob SDK code叉公共类ServiceBusTriggerAttribute后获得异常 [英] getting exception after webjob sdk code fork for public class ServiceBusTriggerAttribute

查看:366
本文介绍了webjob SDK code叉公共类ServiceBusTriggerAttribute后获得异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到的所有webjod SDK code从这里

我想使类 ServiceBusTriggerAttribute 公立和非密封,并创造了使用的NuGet包 Microsoft.Azure.WebJobs.ServiceBus.dll 但是当我在我的webjob项目中使用这个的NuGet得到下面的异常。

  

类型的未处理的异常System.IO.FileLoadException发生   在mscorlib.dll

     

信息:无法加载文件或程序   Microsoft.Azure.WebJobs.ServiceBus,版本= 1.1.0.0,文化=中立,   公钥= 31bf3856ad364e35或它的某一个依赖。强大   名称验证失败。 (从HRESULT异常:0x8013141A)

解决方案

这个问题最近在公众的回购协议所讨论的此处。我不认为试图子类的属性是要走的路。我建议在GitHub的问题,一些替代品。你得到了上面的异常,因为所有的WebJobs SDK组件是延迟签署(在项目设置)。他们需要使用完全签名。

I get all webjod sdk code from here

I want to make class ServiceBusTriggerAttribute public and non sealed and created nuget package using Microsoft.Azure.WebJobs.ServiceBus.dll but when I use this nuget in my webjob project getting below exception.

An unhandled exception of type 'System.IO.FileLoadException' occurred in mscorlib.dll

Additional information: Could not load file or assembly 'Microsoft.Azure.WebJobs.ServiceBus, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)

解决方案

This issue was recently discussed in the public repo here. I don't think trying to subclass the attribute is the way to go. I suggested some alternatives in the github issue. You're getting the above exception because all the WebJobs SDK assemblies are delay signed (in project settings). They need to be fully signed for use.

这篇关于webjob SDK code叉公共类ServiceBusTriggerAttribute后获得异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆