This project is read-only.

Updating a custom module

Topics: Core, Customizing Orchard
Sep 23, 2016 at 4:38 PM
Feel free to tell me if I'm missing something/doing it the wrong way...

I've created a custom module, built my instance of Orchard and deployed it to my test server.

I then made some changes to the code of that module - changes to the migration file, the driver and to a controller. I updated the version number from 1.0 to 1.1 in the module.txt file for both the Version and the OrchardVersion. I cleaned, built and ran my Orchard solution locally, and every thing was fine and dandy - my updates were there and I could see it works.

Not wanting to build the whole thing and release the whole thing to test again, I decided to use the command line to create the nupkg file and update my module on the test server. I went into the modules area of the dashboard on the test site, clicked on 'Installed' then 'Install a module from your computer'. I browsed to where my updated package was (called where xxx represents the module name), and selected it to install.

The install routine told me it was creating a backup, then promptly worked through the files, showing messages that it was skipping them all because they already existed, then asked me if I wanted to enable the feature.

But... It's the same version, my changes aren't present.

So my question is this. Is there a way of updating modules I'm missing - because redeploying the whole system for a single module is cumbersome to say the least, or have I found a bug?

I should point out that I had another module that I had added files to - in this case it was a view model - when I went through the above process it found there was a new file, and did actually upgrade my module.

I'm scratching my head about this one - it seems to me like there should be a simple way to update modules.
Sep 28, 2016 at 8:22 AM
If you can access your server through remote desktop or ftp, you can just copy over your module. Orchard's dynamic compiling will pick up the changes and re-compiles the project, and after that runs the update migrations.
Sep 28, 2016 at 9:19 AM
That works for the test environment, but I'm afraid us developer types have no access to the DR/Live environments and we'd really like to be able to give the people who do some sort of package to deploy.

I guess I need to put my thinking cap back on...