6
votes

I am trying to deploy a console application to service fabric. I was able to successfully deploy and run the application in local service fabric cluster. But when I am trying with public service fabric cluster, I am seeing below warning in service fabric explorer and the application is not running.

Unhealthy event: SourceId='System.Hosting', Property='CodePackageActivation:C:EntryPoint', HealthState='Warning', ConsiderWarningAsError=false.There was an error during CodePackage activation.The service host terminated with exit code: 3762504530

1
Is it a .NET-based console app?Sean McKenna
Yes it is a .Net console applicationDevMJ
Basically it tells you that it failed to start. Common reasons we've seen is basically missing assemblies in the package. Could it be that you have a reference that's not copied to the output, and thus is not included in the package ?anderso
Is there a way to check whether all the dlls have been copied correctly? I mean in local cluster, we can go and check the location C:\SfDevCluster\Data_App. But for public cluster, how will we check? How can we connect to individul VM under Virtual machine scale sets?DevMJ

1 Answers

11
votes

The most common explanation for code the runs locally but not in Azure is that you're targeting a .NET framework version that is not present on the VMs provisioned in a Service Fabric cluster. They currently provide .NET 4.5.1 out of the box, with .NET 4.5.2 getting added some time this month. Try retargeting your app to 4.5.1.

Update: as of February 2016, VMs provisioned for Service Fabric clusters come with .NET 4.5.2 by default.