visual-studio - Azure Service Fabric 不允许使用重复参数

标签 visual-studio azure 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 ==========

关键部分似乎是:

2>Register-ServiceFabricApplicationType : Parameter with the name 'Weather_InstanceCount' is found more than once. 
2>Duplicate parameters are not allowed.

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

有什么想法吗?

很高兴提供更多信息,但之前没有使用过 SF,不确定哪些信息会有帮助。

最佳答案

答案在错误消息中:

Parameter with the name 'Weather_InstanceCount' is found more than once. 

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

关于visual-studio - Azure Service Fabric 不允许使用重复参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39624173/

相关文章:

azure - Swashbuckle 生成的 Swagger 在 Azure API 管理中创建重复的版本路径

Azure Service Fabric 激活错误 7148

visual-studio - 为什么我在 Visual Studio Debug Memeory 窗口中只能在 0x70000 之前的任何地址看到 "??"?

visual-studio - Blend 3 无法打开 VS 2010 项目!

c# - 数据库中已经有一个名为 'tableName' 的对象

visual-studio - Visual Studio 调试器输出 - 输出相同但格式不同(如一个项目中的十进制输出,另一个项目中的十六进制输出)

azure - 如何使用 postman 将图像上传到azure blob存储

android - 适用于 Windows 8 和 Android 的 unity azure 移动服务

powershell - 无法通过 Powershell 或 Visual Studio 连接到安全的 Azure Service Fabric 群集