Azure Tools cannot read Service Definition File
Asked Answered
L

1

6

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.

Lemmy answered 18/4, 2018 at 13:48 Comment(0)
P
5

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".

Propylite answered 28/1, 2019 at 18:12 Comment(1)
Forgot that I asked this question. I also was able to get it to run locally by changing the vm size to small. Had to change it back to Standard_A8_v2 when I was done though. Super frustrating.Lemmy

© 2022 - 2024 — McMap. All rights reserved.