#1
|
|||
|
|||
ClickOnce publish version.
When I try to publish a ClickOnce application using VBP, it always publishes it as V1.0.0.0 and doesn't increment the version like VS2005 does. In the properties for the project I am publishing, I have the increment version checkbox checked in Visual Studio.
How can I get this version to increment in VBP? Thanks. |
#2
|
|||
|
|||
According to http://msdn2.microsoft.com/en-us/lib...31(VS.80).aspx (ApplicationRevision property section) "it is not automatically incremented for builds performed at the command-line." It appears that the application revision value is stored in the project's .csproj.user file. A Run Script step with VBScript code like this could be used to increment it:
Code:
' 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%" "/p:PublishDir=drive:\path\to\base_publish_dir\\" in the additional values field on the Options tab of the Make VS.NET action. |
#3
|
|||
|
|||
Thanks for that, it pointed me in the right direction and the hint about the publish_dir was helpful too.
|
#4
|
|||
|
|||
I ended up using msbuild to publish my ClickOnce projects:
%msbuild% project.csproj /t:clean,publish /p:Configuration="Release" /p:ApplicationRevision=%REVISION% /p:ApplicationVersion=%VERSION%.* /p:PublishDir=%publishrootdir%\Release Start folder is set to the folder the csproj file resides in. |
#5
|
|||
|
|||
I'm new to clickonce....but is there away to have one compile step in VBP that would publish the entire solution. Our vs2005 solution has many projects and they may or may not change within build releases. So I would like to understand what and how I can just publish the entire solution to clickonce. Is this possible or do I have to publish each individual project file seperatly so if I have 10 Ihave 10 steps in VBP that uses msbuild or something else to publish the assembly?
|
#6
|
|||
|
|||
If all projects can be published to the same base folder, you can use a single Make VS.NET step to do that, as shown here: http://www.kinook.com/Forum/showthre...?threadid=1401
|
#7
|
|||
|
|||
Ok I'm using hte make VS.Net action.
I get this error MSBUILD : error MSB1008: Only one project can be specified. My solution file has spaces in the path like this is the actual path C:\All Projects\Abc company\Enterprise\Version 2.0\Setup\CRM 2.0\Source %LOCAL_SOURCE_SETUP_DEPLOYMENT%\Source\ABC CRM Inc - Version 2.0 - ABC - CRM.sln I'm thinking the spaces are making MSBuild puke I tried to pass it as "%LOCAL_SOURCE_SETUP_DEPLOYMENT%\Source\ABC CRM Inc - Version 2.0 - ABC - CRM.sln" but that didn't work...any ideas? |
#8
|
|||
|
|||
The Make VS.NET action does quote the .sln filename if it contains spaces. Most likely, you're not properly quoting an argument specified in the Additional options field (i.e., /p:ProductName=Product Name rather than /p:ProductName="Product Name").
|
#9
|
|||
|
|||
ok I got passed that error now I get this
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Micr osoft.Common.targets(3150,9): error : A signing key is required in order to publish this project. Publishing from Visual Studio 2005 will automatically configure a signing key for this project. any clues? I found this on the website http://connect.microsoft.com/VisualS...dbackID=110131 |
#10
|
|||
|
|||
You need to publish each project once from the IDE, then check the updated project and .pfx file into source control.
|
#11
|
|||
|
|||
Ok I have publish from IDE for this project before. I'm only publishing one project which is my project and has references to other projects within the solution. I have selected ton include all the files under the application files button in the wizzard.
I will try to publish from the IDE again then I will check in the project file along with the pfx file. I check my file directory and I only have one pfx and its on teh project root directory that I published. When I run VBP I delete all files from my build pc and get everything from source safe. The project .user files I copy from a source control as well. The project file has all the publish wizzard settings but I override some with the Make VS.Net options tab. any suggestions why it would not work ..I get the error above even though I have published the project once from the IDE. ummm..I will try again ....but you have any clue why it would not work? |
#12
|
|||
|
|||
OK I had the IDE opened and I rebuild all and then publish the one project it went fine from the IDE..
I had the VBP open while I will publish from the IDE. I try to run the one action Make VS.Net and it puke still and this was right after I just did it from the IDE. I just changed the revision number to increment it by one. here is the same error C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Micr osoft.Common.targets(3150,9): error : A signing key is required in order to publish this project. Publishing from Visual Studio 2005 will automatically configure a signing key for this project. this is from the IDE when I was done publishing it..... Verifying Control.dll.deploy... (46 of 46) Publish success. any clue what could be wrong? I mean I had that pfx file in the same location while IDE didi the publising. I even kept the IDE open when I ran the VBP action. |
#13
|
|||
|
|||
Perhaps the IDE needs to be closed before all changes get saved? I extracted ClickOnce.zip from http://www.kinook.com/Forum/showthre...?threadid=1401 to a folder containing spaces and ClickOnce.bld built and published the solution (both projects) successfully.
|
#14
|
|||
|
|||
I don't think is the solution path with spaces that is giving me issues. It has to do something that the IDE is doing for the signing of the manifest that MSBuild isn't doing. I'm assuming that Make VS.Net action uses MSBuild to build/publish the project.
I mean the IDE from my build PC publishes the project just fine. But if I try to do it just using Make VS.net action it pukes. I just publish from the cmd line using msbuild /targetublish but I noticed that this created a local file under my project root path. I want to publish to a server. Also it build the debug configuration not the Release. I thought doing msbuild would take the setting from the project file? Last edited by VBuild_Rookie; 06-08-2007 at 08:11 AM. |
#15
|
|||
|
|||
Yes, the Make VS.NET action does use MSBuild for VS2005 solutions by default. Since the sample in ClickOnce.zip builds properly, compare it with your .bld and solution to see what might be missing/different.
|
Thread Tools | |
Display Modes | Rate This Thread |
|
|