问题
I use VisualStudio 2013.4 with Azure .NET SDK 2.5 :
- File / New Project : Azure Cloud Service
- Add F# WorkerRole
- F5
The cloud service cannot start in emulator :
[fabric] Role Instance: deployment25(22).AzureCloudService2.WorkerRole1.0 [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 ... [fabric] Role state Unhealthy [fabric] Role state Suspended [fabric] Role state Busy [fabric] Role state Unhealthy [fabric] Role state Suspended ...
It works like a charm with C# Worker Role.
Thx in advance for your help
ded'
回答1:
You might need to manually bundle FSharp.Core with the worker project (ensure CopyLocal is true) or use the FSharp.Core nuget package.
I've seen this with full deploys but not necessarily with the emulator.
Which version of the Azure SDK / Emulator are you using (and Visual Studio)?
回答2:
This is a known issue with the F# template, looking to update in the next week or so.
来源:https://stackoverflow.com/questions/28610231/cannot-emulate-f-worker-role