Search code examples
azure-service-fabric

The Settings section with name 'Blah' in ConfigOverride 'Config' is invalid. Cannot find a section with the same name


I'm trying to add a new config section to our SF app configuration and it is failing:

Register-ServiceFabricApplicationType : The Settings section with name 'Blah' in ConfigOverride 'Config' is invalid. Cannot find a section with the same name.

Nothing fancy, done this many times before but I'm doing something wrong and I don't see.

<ApplicationManifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ApplicationTypeName="eBenefits.OrganizationDomainType" ApplicationTypeVersion="1.0.0" xmlns="http://schemas.microsoft.com/2011/01/fabric">
    <Parameters>
        <Parameter Name="Parameter1" DefaultValue="" />
        <Parameter Name="Parameter2" DefaultValue="" />
        <Parameter Name="Parameter3" DefaultValue="" />
    </Parameters>
    <ConfigOverrides>
        <ConfigOverride Name="Config">
            <Settings>
                ...
                <Section Name="Blah">
                    <Parameter Name="Parameter1" Value="[Parameter1]" />
                    <Parameter Name="Parameter2" Value="[Parameter1]" />
                    <Parameter Name="Parameter3" Value="[Parameter1]" />
                </Section>
            </Settings>
        </ConfigOverride>
    </ConfigOverrides>
    ...
</ApplicationManifest>

Copying application to image store... Upload to Image Store succeeded Registering application type... Register-ServiceFabricApplicationType : The Settings section with name 'Blah' in ConfigOverride 'Config' is invalid. Cannot find a section with the same name. FileName: C:\SfDevCluster\Data\ImageBuilderProxy\AppType\a2b68765-272d-4477-aad2-f3d4818365c7\ApplicationManifest.xml At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\PSModule\ServiceFabricSDK\Publish-NewServiceFabricApplication.ps1:251 char:9 + Register-ServiceFabricApplicationType -ApplicationPathInImage ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (Microsoft.Servi...usterConnection:ClusterConnection) [Register-Servic eFabricApplicationType], FabricException + FullyQualifiedErrorId : RegisterApplicationTypeErrorId,Microsoft.ServiceFabric.Powershell.RegisterApplicationTyp e

Finished executing script 'Deploy-FabricApplication.ps1'. Time elapsed: 00:00:39.7598137 The PowerShell script failed to execute.


Solution

  • I forgot to define it in My-Service\PackageRoot\Config\Settings.xml

    Reference: Full instructions on adding SF settings