I have a hangfire worker role with the following service definition:
<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="Company.ServiceA.Cloud.Hangfire" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2015-04.2.6">
<WorkerRole name="Company.ServiceA.HangfireWorkerRole" vmsize="Standard_A8_v2">
<ConfigurationSettings>
<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" />
<Setting name="ServiceA.HangfireDb.Server" />
<Setting name="ServiceA.HangfireDb.Password" />
<Setting name="ServiceA.HangfireDb.User" />
<Setting name="ServiceA.HangfireDb.Database" />
<Setting name="ServiceA.ReadonlyDB.Server" />
<Setting name="ServiceA.ReadonlyDB.Password" />
<Setting name="ServiceA.ReadonlyDB.User" />
<Setting name="ServiceA.Redis.Progress" />
<Setting name="ServiceA.Redis.Progress.DatabaseId" />
<Setting name="ServiceA.ReadonlyDB.Database" />
<Setting name="ServiceA.DefaultDB.Server" />
<Setting name="ServiceA.DefaultDB.Password" />
<Setting name="ServiceA.DefaultDB.User" />
<Setting name="ServiceA.DefaultDB.Database" />
<Setting name="ServiceA.CalculationCache.Disabled" />
</ConfigurationSettings>
</WorkerRole>
</ServiceDefinition>
Some values changed for security reasons.
When I try to debug my cloud project, I see the following error:
Microsoft Azure Tools for Microsoft Visual Studio
Error reading Service Definition file
C:/Temp/ServiceDefinition.csdef
I'm using Azure Tools 2.7.1. Hangfire 1.6.19.
Is my file misformatted? I've read the documentation on Service Definition files here:
and everything seems to match up.
It's quite ridiculous how little error information is given. Surely microsoft can come up with something more specific than this.
cspkg is a zip file that is generated from the ServiceDefinition. csdef and among other things, contains all the required binary-based dependencies. Azure creates a cloud service from both the ServicePackage. cspkg and the ServiceConfig. cscfg.
In the role's Properties dialog box, select the Configuration tab. In the Diagnostics section, make sure that the Enable Diagnostics check box is selected.
The maximum amount of local disk space that may be consumed by the various types of diagnostic data collected by Azure Diagnostics. The default setting is 4096 MB.
The Azure cloud platform is more than 200 products and cloud services designed to help you bring new solutions to life—to solve today's challenges and create the future. Build, run, and manage applications across multiple clouds, on-premises, and at the edge, with the tools and frameworks of your choice.
I had this same problem because the compute emulator does not recognize the value of the vmsize attribute, even though it is a valid Azure instance size.
In my case, it was failing for "Standard_D2_v3". I was able to debug locally when changing to "Standard_D2_v2".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With