2016-09-21 62 views
0

我正在嘗試在Visual Studio 2015中構建Service Fabric項目。我有一個名爲Weather的服務。當我嘗試運行項目中,我得到以下輸出:Azure服務結構不允許重複的參數

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. 

我已嘗試重置並重新啓動服務織物(本地羣集),但仍然會得到相同的錯誤。

無論如何想法?

樂意提供更多信息,但之前沒有使用過SF,也不確定哪些信息會有所幫助。

+1

檢查ApplicationManifest.xml並確保不要設置Weather_InstanceCount參數兩次 – MajkeloDev

+0

這就是它的感謝。出於某種原因(我沒有故意添加它們),ApplicationManifest.xml和ApplicationParameters/Local.xml中有兩個條目。如果您添加一個標記,很高興標記爲答案。 – ProfNimrod

回答

2

答案是錯誤消息:

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

檢查ApplicationManifest.xml - 你有相同的名稱,這是不允許的兩個應用參數。