Kinook Software Forums (https://www.kinook.com/Forum/index.php)
-   [VBP] Third Party Tools (https://www.kinook.com/Forum/forumdisplay.php?f=3)
-   -   ClickOnce publish version. (https://www.kinook.com/Forum/showthread.php?t=2204)

 CMoore 12-14-2006 12:58 AM

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.

 kinook 12-14-2006 12:35 PM

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.

 CMoore 12-19-2006 10:38 PM

Thanks for that, it pointed me in the right direction and the hint about the publish_dir was helpful too.

 dchrno 01-03-2007 03:33 AM

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.

 VBuild_Rookie 06-04-2007 10:08 AM

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?

 kinook 06-04-2007 03:59 PM

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

 VBuild_Rookie 06-07-2007 02:14 PM

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?

 kinook 06-07-2007 02:39 PM

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").

 VBuild_Rookie 06-07-2007 03:56 PM

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

 kinook 06-07-2007 04:03 PM

You need to publish each project once from the IDE, then check the updated project and .pfx file into source control.

 VBuild_Rookie 06-07-2007 04:17 PM

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?

 VBuild_Rookie 06-07-2007 04:43 PM

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.

 kinook 06-07-2007 04:59 PM

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.

 VBuild_Rookie 06-08-2007 08:56 AM

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 /target:publish

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?

 kinook 06-08-2007 09:13 AM

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.

 VBuild_Rookie 06-08-2007 11:11 AM

ok I got my project to publish using the cmd line MSBuild. I even passed in all the params that I had set in the Options tab in Make VS.Net into the cmd line MSBuild and it worked. SO that gave me the idea to use the MSBuild action of VBP and I did and it worked just fine. SO not sure why MSBuild action works but not the Make VS.Net?

Is there any difference?

 kinook 06-11-2007 08:52 AM

Please ZIP and send or post:
1) The info from Help | About | Install Info
2) A .bld file with the MSBuild and Make VS.NET steps (both with show command-line option checked)
3) A build log file showing the output of both steps
4) The .sln file and project files (no source code files)

Thanks.

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