Azure service fabric 未能将应用程序发布到Azure Service Fabric群集

Azure service fabric 未能将应用程序发布到Azure Service Fabric群集,azure-service-fabric,Azure Service Fabric,我正在尝试将应用程序发布到Azure Service Fabric群集。在我单击“从VS2015发布”时,会出现以下错误: 读取文件xxx\publishprofiles\cloud.xml时出错。xml文档(7,6)中有错误 “对象引用未设置为对象的实例” 这是Cloud.xml文件的内容: <?xml version="1.0" encoding="utf-8"?> <PublishProfile xmlns="http:

我正在尝试将应用程序发布到Azure Service Fabric群集。在我单击“从VS2015发布”时,会出现以下错误:

读取文件xxx\publishprofiles\cloud.xml时出错。xml文档(7,6)中有错误

“对象引用未设置为对象的实例”

这是Cloud.xml文件的内容:

<?xml version="1.0" encoding="utf-8"?>
<PublishProfile xmlns="http://schemas.microsoft.com/2015/05/fabrictools">
  <ClusterConnectionParameters ConnectionEndpoint=... />
  <ApplicationParameterFile Path="xxx\ApplicationParameters\Cloud.xml" />
  <UpgradeDeployment Mode="Monitored" Enabled="true">
    <Parameters FailureAction="Rollback" Force="True" />
    <Parameters UpgradeReplicaSetCheckTimeoutSec="1" Force="True" />
  </UpgradeDeployment>
</PublishProfile>

似乎只有VS2015的一个参数(
FailureAction
UpgradeReplicaSetCheckTimeoutSec
)才能成功加载文件


我想知道是否有人对这个问题有一些见解?

只能有一个参数元素。将所有参数合并到一个参数元素中。 例如:



为了完整起见,你能提供一个例子吗?用例子更新了我的答案。哦,很好。那么“Force=“True”与什么有关?两者都有?Force是它自己的参数,就像其他参数一样。此处定义的参数对应于要作为执行应用程序升级的一部分包含的PowerShell参数。此处描述了可用参数:。
<?xml version="1.0" encoding="utf-8"?>
<PublishProfile xmlns="http://schemas.microsoft.com/2015/05/fabrictools">
  <ClusterConnectionParameters ConnectionEndpoint=... />
  <ApplicationParameterFile Path="xxx\ApplicationParameters\Cloud.xml" />
  <UpgradeDeployment Mode="Monitored" Enabled="true">
    <Parameters FailureAction="Rollback" Force="True" UpgradeReplicaSetCheckTimeoutSec="1" />
  </UpgradeDeployment>
</PublishProfile>