2

I have an app with several service. Once I deleted a service and created it again from Service Fabric Explorer. As I can see, there is no way to set Move Cost value from dialog of creation.

Then I decided to upgrade the app from Visual Studio and it ended with “Default service descriptions must not be modified as part of upgrade”.

I figured out the difference between descriptions and tried to add DefaultMoveCost in ApplicationManafest.xml, DefaultServices section. But upgrade failed again saying There is an error in XML document (0, 0)..

  • Looks like setting Move Cost is not supported by VS or am I doing something wrong?
  • How can I upgrade a service that has been created from SF Explorer?
cassandrad
  • 3,412
  • 26
  • 50

1 Answers1

2

You need to use the Update-ServiceFabricService CmdLet. Change the Service Description is not allowed as part of an upgrade. https://learn.microsoft.com/en-us/powershell/servicefabric/vlatest/Update-ServiceFabricService?redirectedfrom=msdn

Also see here for discussion around default services vs. services created through APIs. Why isn't it possible to change placement constraints in an upgrade?

Community
  • 1
  • 1
  • Thanks for the clarification. But what about XML error? As I found out, there could be a defect in VS and how it checks manifest file. Sometimes the error appears and sometimes not. I'm doing nothing except for changing services' version and getting this error. – cassandrad Dec 10 '16 at 08:41
  • We only check for valid XML in the tooling, we don't do any schema checks. So it's most likely that we cannot parse the XML. Can you share it? – Mikkel Mørk Hegnhøj Dec 12 '16 at 19:49
  • 2
    There is no exact information about which XML document cannot get parsed, so I assume it is [ApplicationManifest](https://docs.google.com/document/d/1cgI7k6BG_3O3vz2eM19SbIt4RtrnhlGXXQQoarnAjF8/edit?usp=sharing) and [ApplicationParameters](https://docs.google.com/document/d/1awVgp8ewmvwY_dAVYYqkCP4snmEXcjFaKQYNxZy0WZw/edit?usp=sharing). In Output window I can see `61>------ Build started: Project: Proj.Fabric, Configuration: Debug x64 ------ 62>------ Publish started: Project: Proj.Fabric, Configuration: Debug x64 ------ 62>There is an error in XML document (0, 0).` – cassandrad Dec 13 '16 at 09:35