deadlydog / set-projectfilesclickonceversion Goto Github PK
View Code? Open in Web Editor NEWPowerShell script to update a project file's (.csproj or .vbproj) ClickOnce version.
License: MIT License
PowerShell script to update a project file's (.csproj or .vbproj) ClickOnce version.
License: MIT License
Thanks for this, I just thought it was worth mentioning my confusion when I ran this line below...
That the output says it's updated the version number when the command does not ask for it.
I'm either confused in my state of debugging or suggesting that the version number shouldn't be updated unless the relevant updates are asked for (-IncrementProjectFilesRevision
and -UpdateMinimumRequiredVersionToCurrentVersion
)
This is useful for me, as I'm doing 32 and 64 bit releases, so on the command line it's critical that I only update the version once, so my 64-bit script needs to still update the URLs but not the version.
& .\Set-ProjectFilesClickOnceVersion.ps1 -ProjectFilePath '%MyProject%' -InstallUrl '%InstallUrl%' -PublishUrl '%PublishUrl%'"
That the output mentioned 3 updates instead of 2
Updating PublishUrl to be ...
Updating Install Url to be ...
Updating version number to be 'x.x.x.21' <- didn't expect this when didn't ask for it, but I may be confused
Hi @deadlydog
I've followed your blog post to create a new CI/CD pipeline for a simple dummy WPF application. I have the build working (with an updated version number) and this is deploying back a shared drive on my laptop (via DevOps deployment groups).
In the published folder I can see a versioned folder sitting in Applications Files
, for example;
Publish\Application Files\DeploymentTesting.WpfApp_1_0_0_13
I can install the application from Publish\setup.exe
and it is working correctly.
When I commit an update I can see both CI and CD pipes get completed and a new version of the application is been deployed to my local publish folder, for example;
Publish\Application Files\DeploymentTesting.WpfApp_1_0_0_14
.
When I restart the installed application the check is running and then the old version (1.0.0.13) is starting.
Inside the Publish\DeploymentTesting.WpfApp.application
file the dependentAssembly
and assemblyIdentity
nodes are still referencing the original versioned folder:
<dependency> <dependentAssembly dependencyType="install" codebase="Application Files\DeploymentTesting.WpfApp_1_0_0_13\DeploymentTesting.WpfApp.exe.manifest" size="8852"> <assemblyIdentity name="DeploymentTesting.WpfApp.exe" version="1.0.0.13" publicKeyToken="d5e816d8c223a95a" language="neutral" processorArchitecture="msil" type="win32" />
My understanding it that this should be updated and created automatically via the build step with /target:Publish
.
I'd really appreciate your thoughts on this. Do you have any ideas where I might have gone wrong?
Thanks,
Mark
Have you ever thought of updating this to change additional nodes in the property group for ClickOnce like PublishURL and InstallURL?
I have a need for it at my company as we deploy ClickOnce apps in different locations in Dev and Test/Prod and I want to add this script to their associated builds. I made some changes where I add those two parameters and set/update them before the logic of getting setting app version.
I forked the repository and was going to submit a pull request after adding some more tests.
Thoughts?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.