I'm working on a Module for the Sitecore Marketplace and was contemplating how best to release it against the myriad of different versions out there. Which led me to the following key question which I haven't seen a solid answer to. I snooped around in a few other Marketplace Module Git repositories but I wanted to pose the question here for posterity and gaining a solid solution to the problem:

What is the best and easiest way to setup a solution/project to build against multiple different versions of the Sitecore DLLs to make available for use by other solutions/projects?

1 Answer 1


The method I've found to be the most useful for testing the same code against multiple versions of Sitecore, is to setup with the use of Sitecore Instance Manager a starting website instance, such as 8.2.5. Once that is setup, I will start creating my Visual Studio Solution. I will then use Gulp to create a Libraries folder in the same folder as my solution:

gulp.task('Copy-Sitecore-Dlls', function () {
    var files = config.sitecoreLibraries + "/**/*";
    var libs = gulp.src(files).pipe(gulp.dest("./libraries"));

    return merge(libs);

config.sitecoreLibraries just has the path to my SIM instances bin folder.

Make sure you never commit this libraries folder however, and configure it in your gitignore file. Once you have that, you can then reference dlls that are in that libraries folder for the kernel. If you originally setup 8.2.5 and you have tested it against that, you can now setup with the help of SIM or the install framework (if you are wanting to test against 9.0+) new instances, and then all you need to do is change your gulp config to target this new instance. Once configured you can bring in the version specific dlls into your solution and confirm it'll still build and work with those different versions of the dll's.

Now if you found that you had to make specific changes for a specific version, such as code specific to 8.2 or 9.0 for example, you can create new branches in your source control to contain the releases for those specific versions. So you might end up with a release of your project for 9.0 specifically.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.