getting exception after webjob sdk code fork for public class ServiceBusTriggerAttribute

穿精又带淫゛_ 提交于 2019-12-01 14:21:42

问题


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)


回答1:


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.



来源:https://stackoverflow.com/questions/33475740/getting-exception-after-webjob-sdk-code-fork-for-public-class-servicebustriggera

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!