问题
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