You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Noticed that I had the values for install and publish url's reversed
so I fixed it. Publish url format is like a fileshare (\\fileshare\folder)
and install url format is like a web url (http://fileshare/folder)
- Updated the tests to reflect the reversal of values
- Updated csproj file to reflect the reversal of values
- Updated readme with parameter names and example. Note I had
the example in the script file correct but it was wrong every where
else!
Copy file name to clipboardExpand all lines: ReadMe.md
+14-4Lines changed: 14 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,15 +8,18 @@ Setting the MinimumRequiredVersion property forces the ClickOnce application to
8
8
9
9
# Script Parameters
10
10
***ProjectFilePath** (required) - Path of the .csproj and .vbproj file to process.
11
-
11
+
12
12
***Version** - The Version to update the ClickOnce version number to. This version must be of the format Major.Minor.Build or Major.Minor.Build.Revision. The Build and Revision parts will be overridden by the BuildSystemsBuildId parameter, if it is provided. The Revision parts will be overriden by the IncrementProjectFilesRevision parameter, if it is provided.
13
13
14
14
***BuildSystemsBuildId** - The build system's unique and auto-incrementing Build ID. This will be used to generate the Build and Revision parts of the new Version number. This will override the Build and Revision specified in the Version parameter, if it was provided. This parameter cannot be used with the IncrementProjectFilesRevision parameter.
15
-
15
+
16
16
***IncrementProjectFilesRevision** - If this switch is provided, the Revision from the project file will be incremented and used in the new ClickOnce Version. This will override the Revision specified in the Version parameter, if it was provided. This parameter cannot be used with the BuildSystemsBuildId parameter.
17
-
17
+
18
18
***UpdateMinimumRequiredVersionToCurrentVersion** - If this switch is provided, the ClickOnce MinimumRequiredVersion will be updated to match the new Version. Setting the MinimumRequiredVersion property forces the ClickOnce application to update automatically without prompting the user.
19
19
20
+
***PublishUrl** - If this switch is provided, the ClickOnce PublishUrl will be updated. The publish url format is \\fileshare\foldername
21
+
22
+
***InstallUrl** - If this switch is provided, the ClickOnce InstallUrl will be updated. The install url format is http://fileshare/foldername
20
23
21
24
# Examples
22
25
Update a project file's ClickOnce version to the specified version.
@@ -52,4 +55,11 @@ Update a project file's ClickOnce version, ignoring the Revision part and increm
Copy file name to clipboardExpand all lines: Set-ProjectFilesClickOnceVersion.ps1
+36-36Lines changed: 36 additions & 36 deletions
Original file line number
Diff line number
Diff line change
@@ -2,14 +2,14 @@
2
2
<#
3
3
.SYNOPSIS
4
4
This script updates the ClickOnce version in a project file (.csproj or .vbproj), and may update the MinimumRequiredVersion to be this same version.
5
-
5
+
6
6
.DESCRIPTION
7
7
This script updates the current ClickOnce version in a project file (.csproj or .vbproj), and may update the MinimumRequiredVersion to be this same version.
8
8
Setting the MinimumRequiredVersion property forces the ClickOnce application to update automatically without prompting the user.
9
-
9
+
10
10
.PARAMETERProjectFilePath
11
11
(required) Path of the .csproj and .vbproj file to process.
12
-
12
+
13
13
.PARAMETERVersion
14
14
The Version to update the ClickOnce version number to. This version must be of the format Major.Minor.Build or Major.Minor.Build.Revision.
15
15
The Build and Revision parts will be overridden by the BuildSystemsBuildId parameter, if it is provided.
@@ -19,12 +19,12 @@
19
19
The build system's unique and auto-incrementing Build ID. This will be used to generate the Build and Revision parts of the new Version number.
20
20
This will override the Build and Revision specified in the Version parameter, if it was provided.
21
21
This parameter cannot be used with the IncrementProjectFilesRevision parameter.
22
-
22
+
23
23
.PARAMETERIncrementProjectFilesRevision
24
24
If this switch is provided, the Revision from the project file will be incremented and used in the new ClickOnce Version.
25
25
This will override the Revision specified in the Version parameter, if it was provided.
26
26
This parameter cannot be used with the BuildSystemsBuildId parameter.
Update the Build and Revision parts of a project file's ClickOnce version, based on a unique, auto-incrementing integer, such as a build system's Build ID.
Update a project file's ClickOnce version, ignoring the Revision part and incrementing the Revision stored in the file, and update the Minimum Required Version to be this new version.
Update a project file's ClickOnce version using both Version and a unique, auto-incrementing integer, such as a build system's Build ID. This will keep the major and minor versions you specify but update the build and revision (e.g. 1.0.1.5745)
65
65
@@ -68,12 +68,12 @@
68
68
.EXAMPLE
69
69
Update a project file's ClickOnce version and its install and publish url values.
# If we should be using the BuildSystemsBuildId for the Build and Revision.
291
291
if ($BuildSystemsBuildId-gt-1)
292
292
{
293
293
# Use a calculation for the Build and Revision to prevent the Revision value from being too large, and to increment the Build value as the BuildSystemsBuildId continues to grow larger.
0 commit comments