AZURE会找到我的RoleEntryPoint实现类,如果这就是它的派生类直接? [英] Will Azure find my RoleEntryPoint implementation class if that's the direct class it derives from?

查看:237
本文介绍了AZURE会找到我的RoleEntryPoint实现类,如果这就是它的派生类直接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

让我们说我有:

public abstract ServiceBase : RoleEntryPoint {
  ...
}

public MyRealService : RoleEntryPoint {
  ...
}

将我的Azure WorkerRole项目能够正确地计算出的 MyRealService 的类作为WorkerRole切入点?

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

这曾经是工作很适合我,但现在我已经更新到Azure的工具2.0它没有击中任何断点,所以我甚至不知道它是什么加载入口点类。

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.8.0.0 DLL有的以2.0.0.0。

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的:在被根据1.8.0.0不同的项目定义
  • MyRealService :在顶级项目,取决于2.0.0.0定义
  • 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.

因此​​,既然基类继承的 RoleEntryPoint 的是从一个旧版本的 Microsoft.WindowsAzure.ServiceRuntime 的,MyRealService类是从来没有,尽管实际的C#项目依据版本发现对2.0.0.0的 Microsoft.WindowsAzure.ServiceRuntime 的。

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.

感谢这么多,在这个线程的答案: <一href="http://stackoverflow.com/questions/4329451/azure-workerrole-stopping-immediately-after-starting">Azure WorkerRole立即停药之后开始

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

这篇关于AZURE会找到我的RoleEntryPoint实现类,如果这就是它的派生类直接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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