Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dan 1250 posts 3747 karma points admin c-trib
    May 28, 2012 @ 14:35
    Dan
    0

    Create package from Visual Studio solution

    Hi,

    I'm delving deeper into .NET than usual and would like to try to understand something to help with productivity.

    I'm basically doing some modifications to the uComment source.  It's fine so far, the changes are simple enough, the build isn't erroring and when I copy the new DLL to my umbraco > bin folder after building the updates are picked up on the website nicely.  What I'd like to do though is to be able to automatically create a new package once my updates are done.

    I notice there's an '.exe' file in the source for this project called 'addFilesToPackage.exe', which presumably does just this - grab all of the resources and package them into a zip which is then installable as a package in the Umbraco UI.  However, when I run this exe it just says 'addFilesToPackage.exe has stopped working'.  I wondered if this needs to be called by a build event in the Visual Studio project or something (rather than just by double-clicking the file in my file system)?  Or perhaps there's just a problem with my configuration which means it's not referencing the files correctly?

    Could anyone shed any light on this?  Whilst I can still apply my updates by manually copying files over (or setting build events for each file) it would be nice to be able to produce an installable package at the end of it.  Keen to learn how to do it properly.

    Thanks folks!

  • Lee Kelleher 3945 posts 15163 karma points MVP 10x admin c-trib
    May 28, 2012 @ 15:04
    Lee Kelleher
    0

    Hi Dan,

    I had a quick look at the UComment source, noticed that there was a "nant.build" file in the solution.  It looks like you'd need to use NAnt to build the package - which the build script itself would make a call to the "AddFilesToPackage.exe".

    To increase the version number, edit the "nant.build" and change the "dist.version" property value.

    I use MSBuild for my packages, (see Matt's blog post about how to do it) ... just personal preference; coke, pepsi, NAnt, MSBuild! ;-)

    Cheers, Lee.

  • Dan 1250 posts 3747 karma points admin c-trib
    May 28, 2012 @ 15:17
    Dan
    0

    Ace, thanks Lee - I'll look into NAnt, vaguely heard of it, but no idea how to use it!  Is if feasible to swap this out for a different build provider (I hear good things about MSBuild, for example ;)) or is that a can of worms?

  • Lee Kelleher 3945 posts 15163 karma points MVP 10x admin c-trib
    May 28, 2012 @ 16:30
    Lee Kelleher
    1

    Definitely possible to swap out NAnt with MSBuild - like I say, it's all personal preference.  Generally MSBuild is better suited to Visual Studio devs, as it can hook into projects/solutions easier.

    There'll be a little learning curve, but once you've got it set-up once, it's easy. :-)

    Matt's blog post is a good starting off point.

    Cheers, Lee.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies