1

I'm looking for a answer if it is possible to have e.g 2 solutions deployed to one app service.

Example: I have two .NET solutions. In one solution I'm developing Site A, in the second solution I'm developing Site B. In Sitecore I have two sites configured: Site A and Site B.

Is it possible to configure the deployment to deploy Site A and Site B to one app service or site on IIS without troubles?

3

It is possible to deploy 2 different Visual Studio solutions to a single IIS site.

The harder part is "without troubles".

You need to make sure that none of the sites overwrites what was set in the other site, which consists (but not necessarily is limited to):

  • dlls - if you reference any dll in one solution, make sure that second solution doesn't reference another version of the same dll,
  • files - like cshtml files, ascx files, js files, css files and any other files you use. Use some naming convention or put them in folders to make sure it's not possible to overwrite any file from the other solution,
  • configuration files - same as above,
  • config settings - make sure your settings are consistent. Do not set setting "A" to "false" in one solution and same setting "A" to "true" in another one,
    • web.config file - avoid any changes or use includes.

There may be many more scenarios when you need to be careful or limited with that approach, but it really depends on your projects and their complexity.

| improve this answer | |
0

YES Is the short answer here.

Of course, the reality is a bit more complicated... @Marek has already outlined the major areas where you may have conflicts between your two solutions, but to recap:

  • DLLs (make sure you don't produce two DLLs of the same name from both solution, make sure you reference the same DLL versions in each solution)
  • Solution files such as cshtml, config, aspx, ascx, js, css
  • Serialized items. If you are using TDS or Unicorn to serialize/deploy content items, then beware of overwriting the same item from two different places especially common folder items e.g. /sitecore/templates/Foundation.

Note that config files could have conflicts both in file name and path (an obvious issue) but more subtle problems too, such as one config file removing an element and another adding a child beneath it etc.

Provided you are disciplined and consistent in your approach this should work. You could place most of your files into solution-specific subfolders to help organisation. e.g.

Solution1
   App_Config
      Include
        Solution1
           Solution1.config
   Views
      Solution1
         MyComponent.cshtml
   Resources
      Solution1
         JS
            main.js
         CSS
            main-theme.css

One final thought (which I appreciate is not answering your question!); since you are using SXA, you are probably using Helix architecture in your solutions? Might it be worth merging these two solutions together making the distinction between the solutions as separate "Project" layer projects? If you have different teams working on each site, you could potentially manage that by working on different branches within the same repository. You would then make your deployment process easier too!

| improve this answer | |
  • Yes, we are using SXA as well as Helix. Frankly I was looking for something more 'clever' than splitting into separate 'Project' layers. Your idea with splitting into 'Project' layer AND splitting the project things sounds really interesting! There are some cons like reusing/updating the foundation layer. – klucyszy Apr 7 at 6:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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