Best practice for keeping source up to date

Topics: Installing Orchard
Sep 29, 2011 at 8:08 AM

What's best practice for setting up an Orchard site where I can debug the source in Visual Studio and, on occasion, keep the site up to date for latest bug fixes and new features?

The 'Setting Up a Source Enlistment' route feels like overkill for general day to day running, but I do want the ability to debug properly as per the advice here: http://stackoverflow.com/questions/6879343/orchard-off-the-shelf-and-no-joy

Any advice on the best path?

Best regards

John

Sep 29, 2011 at 11:24 AM
Edited Sep 29, 2011 at 11:34 AM

Cloning the repository is a one time thing. When you do that you got the whole source ready to compile and debug it. If you wan't to include latest bug fixes you just synchronize your repository open hg workbench, select the changeset and clik "update" to update your local repository.  Best practices regarding custom module development and source control are best described here http://orchard.codeplex.com/discussions/262306

Coordinator
Sep 29, 2011 at 5:33 PM

Yes, far from being overkill, it's actually by far the easiest approach. One shouldn't be intimidated by Hg, it's super easy and convenient, and your site can stay up-to-date with the latest bits for a very small cost.

Sep 29, 2011 at 9:16 PM

Thanks to you both for your replies.  You've persuaded me to go down the source control route and I've installed Hg, but having a little trouble compiling in Visual Studio (as per the 'Setting up...' article above).  I get the following warning dialog on opening the solution:

Feature Builder Upgrade Notice - You must manually upgrade your building solution created by the RC preview.  Please rename FeatureBuilder.feature file to FeatureBuilder.featureid and then close and re-open your solution.

If I click ok to that (the only option) and then hit F5 I get the following error:

Parser Error Message: Error compiling module "Orchard.Packaging" from file "/OrchardLocal/Modules/Orchard.Packaging/Orchard.Packaging.csproj":
The assembly reference 'NuGet.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL' could not be loaded.

Not sure if this is the root of the problem.  Are you able to point me in the right direction?

Best regards

John

Coordinator
Sep 29, 2011 at 10:04 PM

VS 2010? Using the built-in web server?

Sep 30, 2011 at 5:41 AM

Sorry, yes to both questions.

John

Coordinator
Sep 30, 2011 at 6:27 PM

I don't know, that's weird. You did get the full source code and built src/Orchard.sln, right?

Oct 1, 2011 at 1:45 PM

Hi Bertrand,

Yes double checked to be sure and definitely the right solution from src directory.  The only reference to the FeatureBuilder dialog is these two:

http://visualstudiogallery.msdn.microsoft.com/67b720f4-9a50-41cb-86a2-82e33b7c5fc4 (under Q & A)

http://social.msdn.microsoft.com/Forums/en/vsarch/thread/0812b88b-8911-41a7-97a0-86b7657d1b68

Hope it makes more sense to you?

Thanks

John

Coordinator
Oct 1, 2011 at 8:41 PM

Do you have that tool installed?

Oct 5, 2011 at 4:40 PM

Hi,

Well I've disabled the 'Feature Extension Runtime' extension and that gets rid of the Feature Builder dialog, but I still get the Parse error.

I've updated the the Enlistment directory using TortoiseHg Update command and I'm now on revision 5552, but building is still giving me this error:

Parser Error Message: Error compiling module "Orchard.Packaging" from file "/OrchardLocal/Modules/Orchard.Packaging/Orchard.Packaging.csproj":
The assembly reference 'NuGet.Core, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL' could not be loaded.

There are generally a few ways to solve this issue:
1. Remove the assembly reference from the project file if it's not needed.
2. Ensure the assembly reference is present in the 'bin' directory of the module.
3. Ensure the assembly reference is present in the 'bin' directory of the application.
4. Specify the strong name of the assembly (name, version, culture, publickey) if the assembly is present in the GAC.

Re item 2 above I can see that NuGet.Core.dll is not in the Packaging module bin folder (\OrchardEnlistment\src\Orchard.Web\Modules\Orchard.Packaging\bin), if I'm looking in the right place or, for item 3, under the application bin folder (\OrchardEnlistment\src\Orchard.Web\bin).

I can see NuGet.Core.dll under lib path (\OrchardEnlistment\lib\nuget) and it's version 1.1, but other than that I'm not clear on why it's not making it through.

Any clues?

Thanks

John

Coordinator
Oct 5, 2011 at 8:00 PM

I think I remember seeing that error before and from what I remember it was always the application not having been compiled, or requiring a restart.

Oct 5, 2011 at 8:31 PM

Great, that worked!  I rebuilt the solution and then hit F5.

Up and running - thanks very for your help Bertrand and @jernejg