无法模拟C#工作者角色

无法模拟C#工作者角色,c#,azure,visual-studio-2015,azure-cloud-services,azure-emulator,C#,Azure,Visual Studio 2015,Azure Cloud Services,Azure Emulator,我有一个用VS2013创建的C#worker角色。这在一年多的时间里运作良好 我最近将我的VS升级到版本2015(++Azure SDK 2.7),现在当我尝试使用Azure emulator模拟我的代码或将此代码上载到云时,我遇到了一个问题: [fabric] Role Instance: deployment27(109).***.***.0 [fabric] Role state Busy [runtime] Role entrypoint . CALLING OnStart(): M

我有一个用VS2013创建的C#worker角色。这在一年多的时间里运作良好

我最近将我的VS升级到版本2015(++Azure SDK 2.7),现在当我尝试使用Azure emulator模拟我的代码或将此代码上载到云时,我遇到了一个问题:

[fabric] Role Instance: deployment27(109).***.***.0
[fabric] Role state Busy
[runtime] Role entrypoint . CALLING   OnStart(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . COMPLETED OnStart(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . CALLING   Run(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . COMPLETED Run() ==> ROLE RECYCLING INITIATED: Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role instance recycling is starting
[runtime] Role entrypoint . CALLING   OnStop(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . CALLING   OnStopping()
[runtime] Role entrypoint . COMPLETED OnStop(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[fabric] Role state Unhealthy
[fabric] Role state Suspended
[fabric] Role state Busy
[fabric] Role state Unhealthy
[runtime] Role entrypoint . CALLING   OnStart(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . COMPLETED OnStart(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . CALLING   Run(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . COMPLETED Run() ==> ROLE RECYCLING INITIATED: Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role instance recycling is starting
[runtime] Role entrypoint . CALLING   OnStop(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . CALLING   OnStopping()
[runtime] Role entrypoint . COMPLETED OnStop(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . CALLING   OnStart(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . COMPLETED OnStart(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . CALLING   Run(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . COMPLETED Run() ==> ROLE RECYCLING INITIATED: Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role instance recycling is starting
[runtime] Role entrypoint . CALLING   OnStop(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . CALLING   OnStopping()
[runtime] Role entrypoint . COMPLETED OnStop(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[fabric] Role state Busy
[fabric] Role state Suspended
[runtime] Role entrypoint . CALLING   OnStart(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . COMPLETED OnStart(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . CALLING   Run(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . COMPLETED Run() ==> ROLE RECYCLING INITIATED: Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role instance recycling is starting
[runtime] Role entrypoint . CALLING   OnStop(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . CALLING   OnStopping()
[runtime] Role entrypoint . COMPLETED OnStop(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[fabric] Role state Busy
[fabric] Role state Unhealthy
[fabric] Role state Suspended
[fabric] Role state Busy
[runtime] Role entrypoint . CALLING   OnStart(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . COMPLETED OnStart(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . CALLING   Run(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . COMPLETED Run() ==> ROLE RECYCLING INITIATED: Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role instance recycling is starting
[runtime] Role entrypoint . CALLING   OnStop(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . CALLING   OnStopping()
[runtime] Role entrypoint . COMPLETED OnStop(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . CALLING   OnStart(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . COMPLETED OnStart(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . CALLING   Run(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . COMPLETED Run() ==> ROLE RECYCLING INITIATED: Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role instance recycling is starting
[runtime] Role entrypoint . CALLING   OnStop(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[runtime] Role entrypoint . CALLING   OnStopping()
[runtime] Role entrypoint . COMPLETED OnStop(): Microsoft.WindowsAzure.ServiceRuntime.DefaultEntryPoint
[fabric] Role state Suspended
[fabric] Role state Busy
[fabric] Role state Unhealthy
[fabric] Role state Suspended
[fabric] Role state Busy
您可以在该日志中看到,工作人员在启动时遇到了一些问题。因此,启动失败(然后调用OnStop…)。这个循环永远不会结束

我试图了解问题出在哪里,但什么也没发现。我试图通过在Run、RunAsync、OnStart和OnStop上插入断点来调试代码。这是无助的,因为这些断点从未在应用程序生命周期中触发

我在读到关于F#的问题大家都知道,但我不是在F#上工作。

看看这里的常见问题:。我在升级到2.7SDK时遇到了类似的问题,我发现这是诊断在您的角色中的工作方式问题。尝试删除角色下的
diagnostics.wad*
,然后重新启用诊断。请查看此处的常见问题解答:。我在升级到2.7SDK时遇到了类似的问题,我发现这是诊断在您的角色中的工作方式问题。尝试删除角色下的
diagnostics.wad*
,然后重新启用诊断。