Kinook Software Forums

Go Back   Kinook Software Forums > Visual Build Professional > [VBP] Third Party Tools

Reply
 
Thread Tools Rating: Thread Rating: 6 votes, 5.00 average. Display Modes
  #1  
Old 12-14-2006, 12:58 AM
CMoore CMoore is online now
Registered User
 
Join Date: 12-13-2006
Posts: 8
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.
Reply With Quote
  #2  
Old 12-14-2006, 12:35 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 5,657
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%"
Also, contrary to the documentation on the page, it seems that 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.
Reply With Quote
  #3  
Old 12-19-2006, 10:38 PM
CMoore CMoore is online now
Registered User
 
Join Date: 12-13-2006
Posts: 8
Thanks for that, it pointed me in the right direction and the hint about the publish_dir was helpful too.
Reply With Quote
  #4  
Old 01-03-2007, 03:33 AM
dchrno dchrno is online now
Registered User
 
Join Date: 11-04-2003
Posts: 1
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.
Reply With Quote
  #5  
Old 06-04-2007, 10:08 AM
VBuild_Rookie VBuild_Rookie is online now
Registered User
 
Join Date: 05-07-2004
Posts: 23
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?
Reply With Quote
  #6  
Old 06-04-2007, 03:59 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 5,657
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
Reply With Quote
  #7  
Old 06-07-2007, 02:14 PM
VBuild_Rookie VBuild_Rookie is online now
Registered User
 
Join Date: 05-07-2004
Posts: 23
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?
Reply With Quote
  #8  
Old 06-07-2007, 02:39 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 5,657
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").
Reply With Quote
  #9  
Old 06-07-2007, 03:56 PM
VBuild_Rookie VBuild_Rookie is online now
Registered User
 
Join Date: 05-07-2004
Posts: 23
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
Reply With Quote
  #10  
Old 06-07-2007, 04:03 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 5,657
You need to publish each project once from the IDE, then check the updated project and .pfx file into source control.
Reply With Quote
  #11  
Old 06-07-2007, 04:17 PM
VBuild_Rookie VBuild_Rookie is online now
Registered User
 
Join Date: 05-07-2004
Posts: 23
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?
Reply With Quote
  #12  
Old 06-07-2007, 04:43 PM
VBuild_Rookie VBuild_Rookie is online now
Registered User
 
Join Date: 05-07-2004
Posts: 23
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.
Reply With Quote
  #13  
Old 06-07-2007, 04:59 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 5,657
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.
Reply With Quote
  #14  
Old 06-08-2007, 08:56 AM
VBuild_Rookie VBuild_Rookie is online now
Registered User
 
Join Date: 05-07-2004
Posts: 23
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 09:11 AM.
Reply With Quote
  #15  
Old 06-08-2007, 09:13 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 5,657
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.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 03:00 AM.


Copyright 1999-2019 Kinook Software, Inc.