Search code examples
c#visual-studioasp.net-corevisual-studio-2017azure-service-fabric

publishing versioned code to Service Fabric


I think I'm either missing something in translation or the tooling is faulty.

If i create a new .NetCore2 webapi service fabric application. (using latest SF SDK 2.7.198 and VS2017 (15.3.1))

  • publish to local dev cluster
  • hit the endpoint localhost:port/api/values I get the default "value1",value2" response.

So i want to test a version 2

  1. I add two more values in the response, or alter the response in some way.
  2. I change the manifest versions.
  3. I build the code.
  4. I package the application
  5. I publish the application to local dev cluster (ticking the upgrade option)
  6. After the upgrade finishes, hitting the endpoint (which now is marked as version2) Still gives version1 type responses. Indicating its the version one codebase.

Have i missed a step here? or is this part of the tooling broken in VS2017 15.3.1?

Also I added step 4 and 4 after i tested this previously and got the same response. But should the publish action do a build/package before it copies/publishes the codepackage?


Solution

  • Ok this was my mis-understanding. Whilst i set the application and servicemanifest versions in the Edit Manifest Version Dialog i didn't spot the arrow next to the service, which expands so you can see the codepackage version. I'm guess this is why it never included a new copy of theenter image description here code when deploying.