I am experimenting with building a Service Fabric project in Visual Studio 2015. I have one service called Weather. When I try to run the project I get the following output:
2>Started executing script 'Deploy-FabricApplication.ps1'.
2>. 'D:\InergySystems\GitHub\InSysServiceFabric\InSysServiceFabric\Scripts\Deploy-FabricApplication.ps1' -ApplicationPackagePath 'D:\InergySystems\GitHub\InSysServiceFabric\InSysServiceFabric\pkg\Debug' -PublishProfileFile 'D:\InergySystems\GitHub\InSysServiceFabric\InSysServiceFabric\PublishProfiles\Local.xml' -DeployOnly:$true -UnregisterUnusedApplicationVersionsAfterUpgrade $false -OverrideUpgradeBehavior 'None' -OverwriteBehavior 'Always' -SkipPackageValidation:$true -ErrorAction Stop
2>Copying application to image store...
2>Copy application package succeeded
2>Registering application type...
2>Register-ServiceFabricApplicationType : Parameter with the name 'Weather_InstanceCount' is found more than once.
2>Duplicate parameters are not allowed.
2>FileName: C:\SfDevCluster\Data\ImageBuilderProxy\AppType\InSysServiceFabricType\ApplicationManifest.xml
2>At C:\Program Files\Microsoft SDKs\Service
2>Fabric\Tools\PSModule\ServiceFabricSDK\Publish-NewServiceFabricApplication.ps1:237 char:9
2>+ Register-ServiceFabricApplicationType -ApplicationPathInImage ...
2>+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2> + CategoryInfo : InvalidOperation: (Microsoft.Servi...usterConnection:ClusterConnection) [Register-Servic
2> eFabricApplicationType], FabricException
2> + FullyQualifiedErrorId : RegisterApplicationTypeErrorId,Microsoft.ServiceFabric.Powershell.RegisterApplicationTyp
2> e
2>
2>Finished executing script 'Deploy-FabricApplication.ps1'.
2>Time elapsed: 00:00:06.7573145
2>The PowerShell script failed to execute.
========== Build: 1 succeeded, 0 failed, 6 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
The key part seems to be:
2>Register-ServiceFabricApplicationType : Parameter with the name 'Weather_InstanceCount' is found more than once.
2>Duplicate parameters are not allowed.
I've tried resetting and restarting the Service Fabric (local cluster), but still get the same error.
Anyway ideas?
Happy to provide more information, but haven't used SF before and not sure what information would help.
The answer is in the error message:
Parameter with the name 'Weather_InstanceCount' is found more than once.
Check your ApplicationManifest.xml - you have two application parameters with the same name, which is not allowed.