Azure Service Fabric不允许重复的参数

Pro*_*rod 1 azure visual-studio azure-service-fabric

我正在尝试在Visual Studio 2015中构建Service Fabric项目。我有一项名为Weather的服务。当我尝试运行项目时,得到以下输出:

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 ==========
Run Code Online (Sandbox Code Playgroud)

关键部分似乎是:

2>Register-ServiceFabricApplicationType : Parameter with the name 'Weather_InstanceCount' is found more than once. 
2>Duplicate parameters are not allowed.
Run Code Online (Sandbox Code Playgroud)

我尝试重置并重新启动Service Fabric(本地群集),但仍然遇到相同的错误。

反正有什么想法吗?

很乐意提供更多信息,但是以前没有使用过SF,并且不确定什么信息会有所帮助。

Vac*_*cek 6

答案在错误消息中:

Parameter with the name 'Weather_InstanceCount' is found more than once. 
Run Code Online (Sandbox Code Playgroud)

检查您的ApplicationManifest.xml-您有两个名称相同的应用程序参数,这是不允许的。