Prevent Visual Studio from rebuilding after packaging Service Fabric with diff packaging

╄→гoц情女王★ 提交于 2019-12-25 01:31:12

问题


I am having a lot of issues upgrading a Service Fabric application.

My original question is here.

I am raising a new one now as this relates specifically to diff packaging.

I have modified my package to remove the services I don't want to touch.

But when I publish via Visual Studio, it does a full build.

If I try to run the PowerShell script on its own by right clicking on it, it does not work:

 Cannot validate argument on parameter 'PublishProfileFile'. The "Test-Path $_ -PathType Leaf" validation script for the argument with value 
"MYPATH\Scripts\..\PublishProfiles\Local.xml" did not return a result of True. Determine why the 
validation script failed, and then try the command again.
At MYPATH\Scripts\Deploy-FabricApplication.ps1:173 char:39

Can anyone suggest anything please?

How can I run this script in PowerShell without errors? I don't have much experience with PowerShell and I definitely don't want to have to create an upgrade script from scratch!

At the moment I am trying to get this working in a local 5-node cluster.


回答1:


ok I got around this by creating a called to a command file which clears out the unrequired packages

<Target Name="AfterPackage" AfterTargets="Package">
    <Exec Command="Upgrade\upgrade.cmd" />
  </Target>

There is another issue now but I am going to create a new question for that



来源:https://stackoverflow.com/questions/51797730/prevent-visual-studio-from-rebuilding-after-packaging-service-fabric-with-diff-p

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!