0

After performing a fairly obtrusive refactor (renaming projects, moving service etc) - I'm finding that the appropriate configuration in the ServiceManifest.xml and ApplicationManifest.xml are not being generated for both Stateless and Stateful services.

Steps to repro:

  1. Right click on an existing service fabric application project (.sfproj)
  2. Add > New Service Fabric Service...
  3. Select Stateless Service
  4. Have a look in ServiceManifest.xml and you will see this:

    <!-- Code package is your service executable. -->
    <CodePackage Name="Code" Version="1.0.0">
        <EntryPoint>
        <ExeHost>
            <Program>Stateless1.exe</Program>
        </ExeHost>
        </EntryPoint>
    </CodePackage>
    
    <!-- Config package is the contents of the Config directoy under PackageRoot that contains an 
        independently-updateable and versioned set of custom configuration settings for your service. -->
    <ConfigPackage Name="Config" Version="1.0.0" />
    <Resources>
        <Endpoints>
        <!-- This endpoint is used by the communication listener to obtain the port on which to 
            listen. Please note that if your service is partitioned, this port is shared with 
            replicas of different partitions that are placed in your code. -->
        <Endpoint Name="ServiceEndpoint" />
        </Endpoints>
    </Resources>
    
  5. Now delete the ServiceManifest.xml

  6. Re-build

I'm expecting the ServiceManifest.xml to be recreated on build. If you perform the above steps for StatefulService you get the same result. However, if you do this for an ActorService - the ServiceManifest.xml will be regenerated perfectly fine.

If the StatelessService is not defined in the ServiceManifest and ApplicationManifest the service will not be deployed.

This seems like it maybe a bug, has anyone encountered this and have a solution?

jflood.net
  • 2,446
  • 2
  • 21
  • 19

1 Answers1

0

I had a similar problem with adding a new Actor. In my case, after adding a new Actor Service I had to build solution first before introducing any changes to it.

Sergiy Chernets
  • 427
  • 2
  • 5
  • Thanks for your reply. You are correct, I see that too, but it's not issue. It seems that Actor's configuration are only ever generated on build (not on adding to solution) which is what I expected, where as Services configuration are only generated on adding to solution and never on build. Are you able try the steps to repro in the question, do you see the same thing? – jflood.net Mar 03 '17 at 06:52