本文介绍了由于"MYAPPLICATION.ServiceFabricPkg已更改",因此无法升级Service Fabric服务.即使它没有改变的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Service Fabric应用程序中增加了其中一项服务的版本.

I have incremented the version of one of the services in my Service Fabric application.

但是,当我尝试升级群集时,出现以下错误:

However, when I try to upgrade the cluster I get the error below:

The content in CodePackage Name:Code and Version:1.0.0 in Service Manifest 
3>'MYAPPLICATION.ServiceFabricPkg' has changed, but the version number is the same.
3>At C:\Program Files\Microsoft SDKs\Service 
3>Fabric\Tools\PSModule\ServiceFabricSDK\Publish-UpgradedServiceFabricApplication.ps1:135 char:38

这对我来说是个大问题,因为Service Fabric的最畅销点之一是能够更新一项服务而又不影响其他服务.

This is a huge issue for me as one of the best selling points of Service Fabric is being able update one service without touching others.

有人知道解决方案吗?

研究指出与压缩有关的错误,因此我添加了

Research points to the error being related to compression, so I added

<CopyPackageParameters CompressPackage="false" />

到我的Local5Node.xml文件.

to my Local5Node.xml file.

这没什么区别.

我正在尝试通过在Visual Studio 2017中发布来实现此目的.

I am trying to do this via publish with Visual Studio 2017.

欢呼

保罗

推荐答案

之所以会发生这种情况,是因为您已经更新了服务二进制文件,并且没有使用新的版本号来更新清单,清单指向的是与以前相同的版本,但是二进制文件是不同的.

This happens because you have updated the service binaries and didn't update the manifests with a new version number, the manifest points to the same version as before but the binaries are different.

服务结构使用清单版本来识别在应用程序升级期间应更新哪些服务,因为您没有设置新版本并且二进制文件已更改,它将回滚以避免出现问题.

Service fabric use the manifest versions to identify which services should be updated during an application upgrade, because you didn't set the new versions and the binaries has changed, it will rollback to avoid issues.

对此错误进行快速搜索会返回一些结果,并说明其原因,请查看以下答案:

A quick search about this error return a few results with the reason for this, please take a look on these answers:

通过VSTS CI升级Azure Service Fabric时出现错误/CD

部署Service Fabric服务版本升级VSTS发布失败

差异包装

这篇关于由于"MYAPPLICATION.ServiceFabricPkg已更改",因此无法升级Service Fabric服务.即使它没有改变的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-22 21:51