The Kinetic Jump site navigation header requires JavaScript to be enabled and the latest version of the Macromedia Flash Player. If you are you using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Flash Player by downloading here.

Welcome Guest Search | Active Topics | Log In | Register

MSBuild PublishLocation Property not working Options
dank_army
#1 Posted : Wednesday, August 20, 2008 6:26:28 AM
Rank: Newbie
Groups: Member

Joined: 1/7/2008
Posts: 9

Hi,

 

I am trying to create an automatic build when my main project is build in Visual Studio - which works fine.

 

However, I want to specify the output path of the build. Now according to http://www.kineticjump.com/forums/default.aspx?g=posts&t=2 I can specify PublishLocation attribute - this does not work.

 

Instead the build creates a directory level with my .aup file named "APPLICATION NAME Updates" and puts the updates in there.

 

Am i doing something wrong?

 

Thanks

 

John

brianh
#2 Posted : Wednesday, August 20, 2008 7:06:47 AM
Rank: Administration
Groups: Member, Administration

Joined: 5/24/2007
Posts: 362
Location: Minnesota

Hello John,

 

The APPLICATION NAME\Updates folder is the build folder.  This is where updates are built to prior to publishing.  The Publish Location parameter of the MSBuild task allows you to set an optional publish location, which is different than the build location.

 

Where the updates are built to is a property of the update project and can be set in the Project Properties dialog of Make Update.  There is not a parameter to reset this value from the MSBuild task.

 

The Publish Location should work and setting it should initiate a publish action after the update is built.  Publishing posts the recently built update package and the director.xml file to the specified location.  This can be any http, ftp, UNC, or file path uri.  If http is used, front page extensions must be present on the web server.

Brian Haas
Kinetic Jump Software
dank_army
#3 Posted : Thursday, August 21, 2008 12:40:20 AM
Rank: Newbie
Groups: Member

Joined: 1/7/2008
Posts: 9

Thanks for the reply.

 

I have modified the build path in the project file through make Update app and seems to work.

 

I have another problem though: The UpdateVersionSource attribute doesn't appear to be working.

 

"UpdateVersionSource (Required)
The version number of the new update or a path to an assembly. If an assembly path is provided, the assembly version number is used to set the update version."

 

I have tried setting the attribute to "bin/release/myapp.exe" or the default $(Target) but always defaults to 1.0.0.0.

 

I have correctly set the versions in the AssemblyInfo.vb file.

 

Thanks

 

John

brianh
#4 Posted : Thursday, August 21, 2008 4:16:57 AM
Rank: Administration
Groups: Member, Administration

Joined: 5/24/2007
Posts: 362
Location: Minnesota

Hello John,

 

The path must be referenced relative to the aup file.  Also, this is the MSBuild property: UpdateVersionSource="$(TargetPath)"

 

I have verifed that both relative pathing and the $(TargetPath) MSBuild property operates properly.

 

If this information does not get your build working, let me know and I will post an example that might help.

Brian Haas
Kinetic Jump Software
dank_army
#5 Posted : Thursday, August 21, 2008 5:09:20 AM
Rank: Newbie
Groups: Member

Joined: 1/7/2008
Posts: 9

Thanks for the reply.

 

Even if I set the TargetPath variable it still defaults to 1.0.0.0 instead of the version set in AssemblyInfo.dll

 

Here is the BuildUpdate tag part of my .vbproj file:

 

Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " ProjectFile="C:\Applications\myapp.aup" UpdateVersionSource="$(TargetPath)" AppLifeUpdateCmdLocation="C:\Program Files\AppLife Update\MakeUpdate"

 

Regards

brianh
#6 Posted : Thursday, August 21, 2008 7:04:19 AM
Rank: Administration
Groups: Member, Administration

Joined: 5/24/2007
Posts: 362
Location: Minnesota

Hello John,

 

I am not sure what is wrong with your configuration.  It looks right to me.

 

I have verified the operation with the Simple VB Quickstart example.

 

1.  Extract a new Simple VB Quickstart project from Make Update.

2.  Close the make update project that is automatically opened.

3.  Open the Simple.sln solution in Visual Studio.

4.  Unload the Simple vb project and edit the Simple.vbproj project file

5.  Place the "Kjs.AppLife.Update.BuildUpdateTask.dll" assembly in the Simple Folder right next to the Simple.vbproj file.

6.  Paste this snippet just before the </Project> tag.

 

<UsingTask AssemblyFile="Kjs.AppLife.Update.BuildUpdateTask.dll" TaskName="Kjs.AppLife.Update.MSBuild.BuildUpdate" />

<Target Name="AfterBuild">

<BuildUpdate Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " ProjectFile="..\Simple.aup"

UpdateVersionSource="$(TargetPath)"

AppLifeUpdateCmdLocation="C:\Program Files\AppLife Update\MakeUpdate"

Publish="False" />

</Target>

 

7.  Reload the project and proceed to modify the assemblyinfo.vb file and build in Release mode.

 

Do you get the properly built updates in the Simple Updates folder?  I do.

 

Let me know.  We will get to the bottom of this for you.

Brian Haas
Kinetic Jump Software
dank_army
#7 Posted : Thursday, August 21, 2008 11:58:23 PM
Rank: Newbie
Groups: Member

Joined: 1/7/2008
Posts: 9

Brian,

 

Thanks for the detailed instructions - the simple project did actually work fine. However, I think I found why its not working! If I open the Simple project in Visual studio 2005 it works fine, but in Visual Studio 2008 it just stays at 1.0.0.1 for the Simple project - even if I increment the vesion in the AssemblyInfo.vb file.

 

So the problem seems to lie in the version of Visual Studio.

 

My original project is .NET 3.5 so I use VS 2008 - but I also have VS 2005 for some legacy apps.

 

Any ideas?

 

John

brianh
#8 Posted : Friday, August 22, 2008 4:19:46 AM
Rank: Administration
Groups: Member, Administration

Joined: 5/24/2007
Posts: 362
Location: Minnesota

Hello John,

 

Good to identify the difference.  I will look into this today.

Brian Haas
Kinetic Jump Software
brianh
#9 Posted : Friday, August 22, 2008 6:37:07 AM
Rank: Administration
Groups: Member, Administration

Joined: 5/24/2007
Posts: 362
Location: Minnesota

Hello John,

 

I converted my Simple Quickstart project to Visual Studio 2008 and the MSBuild Task works perfectly, building whatever update version that I set in the AssemblyInfo.vb file.

 

Did you try converting the working Visual Studio 2005 solution to Visual Studio 2008?

 

There must be something else going on.

 

 

Brian Haas
Kinetic Jump Software
dank_army
#10 Posted : Tuesday, August 26, 2008 2:01:25 AM
Rank: Newbie
Groups: Member

Joined: 1/7/2008
Posts: 9

Brian,

 

Still cannot get this to work with my existing project.

 

Interestingly, found another quirk while trying to solve the problem:

 

1) Removed the UpdateController from my application

2) Removed the Task node from the vbproj file

3) Set the version of the AssemblyInfo.vb file to 1.0.0.1

4) Recompiled project in Release mode

5) Added UpdateController again and configured MakeUpdate .aup file and saved above my application root.

6) Added the Task node to the vbproj file.

7) Compiled project in Release mode - 1.0.0.1 update gets built in specified updates folder.

 

However, if I now go back into the AssemblyInfo.vb file - doesn't matter what version I set in here when I recompile it always "sticks" at 1.0.0.1. I've checked the version attribute of the dll via the "Details" tab on windows and verified it matches the version set in Visual Studio.

 

Its almost like it cannot find the output and defaults to whatever is set in the AUP file?

 

Here is my compiler output:

 

------ Rebuild All started: Project: MyApplication.BusinessLogic, Configuration: Release Any CPU ------
C:\Windows\Microsoft.NET\Framework\v3.5\Vbc.exe /noconfig /imports:Microsoft.VisualBasic,System,System.Collections,System.Collections.Generic,System.Data,System.Diagnostics /optionstrict+ /nowarn:42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 /rootnamespace:MyApplication.BusinessLogic /doc:obj\Release\MyApplication.xml /define:"CONFIG=\"Release\",TRACE=-1,_MyType=\"Windows\",PLATFORM=\"AnyCPU\"" /reference:W:\projects\Libraries\MyApp.Base\bin\Release\MyApp.Base.dll,W:\projects\Libraries\MyApp.FTP\bin\Release\MyApp.FTP.dll,W:\projects\MyApp\MyAppGateway\MyApp.Gateway.Property\bin\Release\MyApp.Gateway.Property.dll,W:\projects\Libraries\MyApp.Media\bin\Release\MyApp.Media.dll,W:\projects\Libraries\MyApp.Security.Encryption\bin\Release\MyApp.Security.dll,W:\projects\Libraries\MyApp.Xml\bin\Release\MyApp.Xml.dll,C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Data.dll,C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll,C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll,C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.EnterpriseServices.dll,C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Web.Services.dll,C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll,C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /debug:pdbonly /optimize+ /out:obj\Release\MyApplication.BusinessLogic.dll /resource:obj\Release\MyApplication.BusinessLogic.Resources.resources /resource:obj\Release\MyApplication.BusinessLogic.PhotoManagerList.resources /resource:obj\Release\MyApplication.BusinessLogic.PhotoManagerListItem.resources /target:library BrowserUtilities.vb Installation.vb Media\PhotoItem.vb Media\PhotoItemSerialiser.vb Property.vb Settings\Notifcations.vb Settings\Settings.vb "My Project\AssemblyInfo.vb" "My Project\Application.Designer.vb" "My Project\Resources.Designer.vb" "My Project\Settings.Designer.vb" Media\Photos.vb UserControls\PhotoManagerList.Designer.vb UserControls\PhotoManagerList.vb UserControls\PhotoManagerListItem.Designer.vb UserControls\PhotoManagerListItem.vb "Web References\DEX.Agents\Reference.vb" "Web References\DEX.Property\Reference.vb"
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\sgen.exe /assembly:"W:\Applications\New Apps\MyApplication\MyApplicationBusinessLogic\obj\Release\MyApplication.BusinessLogic.dll" /proxytypes /reference:W:\projects\Libraries\MyApp.Base\bin\Release\MyApp.Base.dll /reference:W:\projects\Libraries\MyApp.FTP\bin\Release\MyApp.FTP.dll /reference:W:\projects\MyApp\MyAppGateway\MyApp.Gateway.Property\bin\Release\MyApp.Gateway.Property.dll /reference:W:\projects\Libraries\MyApp.Media\bin\Release\MyApp.Media.dll /reference:W:\projects\Libraries\MyApp.Security.Encryption\bin\Release\MyApp.Security.dll /reference:W:\projects\Libraries\MyApp.Xml\bin\Release\MyApp.Xml.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.EnterpriseServices.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Web.Services.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll
MyApplication.BusinessLogic -> W:\Applications\New Apps\MyApplication\MyApplicationBusinessLogic\bin\Release\MyApplication.BusinessLogic.dll
------ Rebuild All started: Project: MyApplication.Application, Configuration: Release Any CPU ------
C:\Windows\Microsoft.NET\Framework\v3.5\Vbc.exe /noconfig /imports:Microsoft.VisualBasic,System,System.Collections,System.Collections.Generic,System.Data,System.Drawing,System.Diagnostics,System.Linq,System.Windows.Forms /nowarn:42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 /rootnamespace:MyApplication /doc:obj\Release\MyApp.xml /define:"CONFIG=\"Release\",TRACE=-1,_MyType=\"WindowsForms\",PLATFORM=\"AnyCPU\"" /reference:W:\projects\Libraries\MyApp.Base\bin\Release\MyApp.Base.dll,"W:\Applications\New Apps\MyApplication\MyApplicationBusinessLogic\bin\Release\MyApplication.BusinessLogic.dll",W:\projects\Libraries\MyApp.FTP\bin\Release\MyApp.FTP.dll,W:\projects\MyApp\MyAppGateway\MyApp.Gateway.Property\bin\Release\MyApp.Gateway.Property.dll,W:\projects\Libraries\MyApp.Media\bin\Release\MyApp.Media.dll,W:\projects\Libraries\MyApp.Security.Encryption\bin\Release\MyApp.Security.dll,W:\projects\Libraries\MyApp.Software.Updating\bin\Release\MyApp.Software.Updating.dll,W:\projects\Libraries\MyApp.Xml\bin\Release\MyApp.Xml.dll,"C:\Program Files\AppLife Update\PublicAssemblies\Kjs.AppLife.Update.Controller.dll",C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Configuration.dll,"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll",C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Data.dll,C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Deployment.dll,C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Design.dll,C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll,C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll,C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.EnterpriseServices.dll,C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Web.Services.dll,C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll,C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll,"C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PublicAssemblies\Telerik.WinControls.dll","C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PublicAssemblies\Telerik.WinControls.Themes.Aqua.dll","C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PublicAssemblies\Telerik.WinControls.Themes.Desert.dll","C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PublicAssemblies\Telerik.WinControls.Themes.Office2007Black.dll","C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PublicAssemblies\Telerik.WinControls.Themes.Vista.dll","C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PublicAssemblies\Telerik.WinControls.UI.dll","C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PublicAssemblies\TelerikCommon.dll" /main:MyApplication.My.MyApplication /debug- /optimize+ /out:obj\Release\MyApplication.exe /resource:obj\Release\MyApplication.ManagePhotos.resources /resource:obj\Release\MyApplication.Browser.resources /resource:obj\Release\MyApplication.ManagePropertyPhotos.resources /resource:obj\Release\MyApplication.Resources.resources /target:winexe ApplicationEvents.vb Dialog1.Designer.vb Dialog1.vb ManagePhotos.Designer.vb ManagePhotos.vb Browser.Designer.vb Browser.vb ManagePropertyPhotos.Designer.vb ManagePropertyPhotos.vb "My Project\AssemblyInfo.vb" "My Project\Application.Designer.vb" "My Project\Resources.Designer.vb" "My Project\Settings.Designer.vb"
MyApplication.Application -> W:\Applications\New Apps\MyApplication\MyApplicationApplication\bin\Release\MyApplication.exe
C:\Program Files\AppLife Update\MakeUpdate\AppLifeUpdateCmd.exe "W:\Applications\New Apps\MyApplication\MyApplication.aup" "1.0.0.1"
AppLife Update command-line build utility
Copyright Kinetic Jump Software, LLC, 2007

Set update version to 1.0.0.1.

Starting build.
Validating project...
Saving project...
Compiling update package...
Creating update.xml...
  Copying updater...
  Copying additional language files...
  Copying action assemblies...
  Preparing actions...
    Processing action "Add & replace files in <Application Directory>"...
Compiling update package...
Signing Package...
Updating Director...
Build complete.
========== Rebuild All: 2 succeeded, 0 failed, 0 skipped ==========

 

 

brianh
#11 Posted : Tuesday, August 26, 2008 3:29:20 AM
Rank: Administration
Groups: Member, Administration

Joined: 5/24/2007
Posts: 362
Location: Minnesota

Hello John,

 

I need to be able to reproduce this in order to help.  I have recently been working with the MSBuild Task while testing support for relative pathing and I have had no improper behavior with the MSBuild Task or the command line utility.

 

In trying to help you, I have worked with a number of test solutions and I just can not reproduce this behavior.

 

Can you send me a solution that is behaving this way via email?  I will gladly look at it and try to figure out how to reproduce this, and fix it if the problem can be identified.

 

This is a silly question I know, but what is the assembly version number of "W:\Applications\New Apps\MyApplication\MyApplicationApplication\bin\Release\MyApplication.exe" ? Any chance you are inadvertently setting the file version number?

 

And to test on more theory, can you save the MyApplication.aup file with some off the wall version numbers entered in the update Version text boxes.  Something like 15.201.43.4001  Dont build the off the wall number, just save the file primed with an off the wall number and run your build process.  What update number gets built?

Brian Haas
Kinetic Jump Software
dank_army
#12 Posted : Tuesday, August 26, 2008 5:54:36 AM
Rank: Newbie
Groups: Member

Joined: 1/7/2008
Posts: 9

Brian,

 

I have managed to get this working. I had to remove all references to any dll's and any project references and once I recompiled it is now incrementing the build number.

 

Is it possible there is a bug building over a network path? because if I add a reference to dll then change my build number in the aseemblyinfo file. then recompile the build number changes the same - but if I do the same procedure but select "clean" from the build menu on the project first it seems to resolve the issue.

 

At least I've managed to get this working!

 

Thanks for all your help Brian!

 

john

dank_army
#13 Posted : Tuesday, August 26, 2008 6:22:51 AM
Rank: Newbie
Groups: Member

Joined: 1/7/2008
Posts: 9

Brian,

 

There's something still not right. I've emailed over a screenshot of my application - when I run the UpdateController.UpdateInteractive() method the dialog says "Current Version 1.0.0.0" when clearly the version is 1.0.0.1 (see the title bar of the application which I'm setting via My.Application.Info.Version.toString()).

 

If I click "Get Update" it shutsdown my application , applys the update and reloads - but the version never changes - it always says there is an update.

 

John

brianh
#14 Posted : Tuesday, August 26, 2008 6:34:34 AM
Rank: Administration
Groups: Member, Administration

Joined: 5/24/2007
Posts: 362
Location: Minnesota

Hello John,

 

On your update controller, is the UseHostAssemblyVersion property set to true?  It is false be default. 

Brian Haas
Kinetic Jump Software
dank_army
#15 Posted : Tuesday, August 26, 2008 7:04:50 AM
Rank: Newbie
Groups: Member

Joined: 1/7/2008
Posts: 9

Okay changing the UseHostAssemblyVersion property seems to resolve that issue. Didn't spot that one.

 

Thanks for your help.

 

John

Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.