kinook
12-16-2005, 12:59 PM
In the Make VS.NET (http://www.kinook.com/VisBuildPro/Manual/makevs_net.htm) action, choose a Build behavior of Deploy/Publish.
Also, the documentation at http://msdn.microsoft.com/en-us/library/ms165431.aspx is wrong. Just specifying a target of publish (which the setting above does) when building from the command-line will not actually publish the project (it does not use the publish dir configured in project properties in the IDE). This can be resolved by passing
/p:PublishDir="drive:\path\to\base_publish_dir\\"
in the additional values field on the Options tab of the Make VS.NET action.
Additionally, that page (ApplicationRevision property section) states "it is not automatically incremented for builds performed at the command-line." The application revision value is stored in the project's .user file. A Run Script step with VBScript code like this could be used to increment it:
' load the .csproj.user file
Set msxml = CreateObject("MSXML.DOMDocument")
msxml.async = False
msxml.load("%CSPROJ_USER_FILE%")
' retrieve the current revision and increment
Set node = msxml.selectSingleNode("/Project/PropertyGroup/ApplicationRevision")
node.Text = node.Text + 1
' save the changes
msxml.save "%CSPROJ_USER_FILE%"
Alternatively, the ApplicationRevision value or other properties can also be specified in the additional values field on the Options tab of the Make VS.NET action (overriding the values in the project/.user file):
/p:ApplicationVersion=1.2.3.*
/p:ApplicationRevision=4
/p:PublisherName="%COMPANY_NAME%"
/p:ProductName="Product Name"
...
See http://www.kinook.com/Download/Misc/ClickOnce.zip for a sample demonstrating these steps.
See http://msdn2.microsoft.com/en-us/library/aa730868(vs.80).aspx for more details on ClickOnce manifest and strong-name assembly signing.
Also, the documentation at http://msdn.microsoft.com/en-us/library/ms165431.aspx is wrong. Just specifying a target of publish (which the setting above does) when building from the command-line will not actually publish the project (it does not use the publish dir configured in project properties in the IDE). This can be resolved by passing
/p:PublishDir="drive:\path\to\base_publish_dir\\"
in the additional values field on the Options tab of the Make VS.NET action.
Additionally, that page (ApplicationRevision property section) states "it is not automatically incremented for builds performed at the command-line." The application revision value is stored in the project's .user file. A Run Script step with VBScript code like this could be used to increment it:
' load the .csproj.user file
Set msxml = CreateObject("MSXML.DOMDocument")
msxml.async = False
msxml.load("%CSPROJ_USER_FILE%")
' retrieve the current revision and increment
Set node = msxml.selectSingleNode("/Project/PropertyGroup/ApplicationRevision")
node.Text = node.Text + 1
' save the changes
msxml.save "%CSPROJ_USER_FILE%"
Alternatively, the ApplicationRevision value or other properties can also be specified in the additional values field on the Options tab of the Make VS.NET action (overriding the values in the project/.user file):
/p:ApplicationVersion=1.2.3.*
/p:ApplicationRevision=4
/p:PublisherName="%COMPANY_NAME%"
/p:ProductName="Product Name"
...
See http://www.kinook.com/Download/Misc/ClickOnce.zip for a sample demonstrating these steps.
See http://msdn2.microsoft.com/en-us/library/aa730868(vs.80).aspx for more details on ClickOnce manifest and strong-name assembly signing.