I have an ApplicationManifest.xml file that looks like:
<?xml version="1.0" encoding="utf-8"?>
<ApplicationManifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2011/01/fabric"
ApplicationTypeName="ServiceFabricTestType" ApplicationTypeVersion="1.9">
<Parameters>
<Parameter Name="Prop_BehavioursPath" DefaultValue="behaviours.yml"/>
<Parameter Name="Prop_AliasesPath" DefaultValue="aliases.yml"/>
</Parameters>
<ServiceManifestImport>
<ServiceManifestRef
ServiceManifestName="SummaryGenerator"
ServiceManifestVersion="1.9.0.0"
/>
</ServiceManifestImport>
</ApplicationManifest>
And I want to use the parameters to adjust the Argument of my guest hosted service, declared in a ServiceManifest.xml file like so:
<?xml version="1.0" encoding="utf-8"?>
<ServiceManifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2011/01/fabric"
Name="SummaryGenerator" Version="1.9.0.0">
<ServiceTypes>
<StatelessServiceType ServiceTypeName="SummaryGenerator" UseImplicitHost="true"/>
</ServiceTypes>
<CodePackage Name="code" Version="1.9.0.0">
<EntryPoint>
<ExeHost>
<Program>MyProgram.exe</Program>
<Arguments>"LoadFrom=[Prop_AliasesPath]|[Prop_BehavioursPath]"</Arguments>
<ConsoleRedirection FileRetentionCount="5" FileMaxSizeInKb="2048"/>
</ExeHost>
</EntryPoint>
</CodePackage>
</ServiceManifest>
This clearly doesn't work as the properties going into the Arguments are treated as verbatim and not resolved from the parameter values.
What I really want to do is to be able to start a service and pass in different values for Prop_BehavioursPath and Prop_AliasesPath. Is there a better way to do this in Service Fabric?
The application being run doesn't know about Service Fabric and the only way to push configuration through to it is via the command arguments.