Will Azure find my RoleEntryPoint implementation class if that's the direct class it derives from?

雨燕双飞 提交于 2019-12-11 05:29:44

问题


Let's say I have:

public abstract ServiceBase : RoleEntryPoint {
  ...
}

public MyRealService : RoleEntryPoint {
  ...
}

Will my Azure WorkerRole project be able to correctly figure out MyRealService class as the WorkerRole entry point?


This used to be working well for me but now that I've updated to Azure Tooling 2.0 it doesn't hit any breakpoint so I'm not even sure what entry point class it is loading.


回答1:


Problem solved. It basically had to do with some references pointing to the old 1.8.0.0 DLL and some to the 2.0.0.0.

So following the example above:

  • ServiceBase: was defined in a different project that was depending on 1.8.0.0.
  • MyRealService: was defined in the top-level project that depends on 2.0.0.0.

So since the base class inheriting from RoleEntryPoint was from an older version of Microsoft.WindowsAzure.ServiceRuntime, MyRealService class was never found despite the actual C# project depending on version 2.0.0.0 of Microsoft.WindowsAzure.ServiceRuntime.

Thanks so much to the answer in this thread: Azure WorkerRole Stopping Immediately After Starting



来源:https://stackoverflow.com/questions/19253015/will-azure-find-my-roleentrypoint-implementation-class-if-thats-the-direct-clas

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