The Visual Studio extension makes it easy to create new Episerver solutions and projects from scratch. However, if you were to have the latest version of the extension, it would by default setup a version of Episerver that is more recent. For example, version 10.0.1.202 released on 10/25/16 will create a 10.0.1 site and database schema matching that version. When developing Episerver sites, we highly encourage developers to be on latest when possible, but sometimes there is a need to have an older version available for a number of reasons. This KB will walk you through how to create an Episerver site as old as version 8.8. This is made possible by the introduction of the Initialize-Epidatabase cmdlet starting in version 8.8.
Note: If you need an Episerver site older than 8.8, then the typical approach is to use Deployment Center to create a base 7.5.394.2 site and then upgrade that to a version prior to 8.8 via Nuget.
In order to create the Episerver site, you will need to create an empty project in Visual Studio. Here are the steps you need to take in order to create the Episerver site from an empty project.
- Open VS and go to File -> New -> Project
- Under Templates, expand Visual C#. Click on Web and select ASP.NET Web Application. Give the empty project a name.
- Once the empty project is created, go to Package Manager Console in VS and then run the following command: install-package episerver.cms –version 8.8 [or later].
- Run the cmdlet in Package Manager Console called Initialize-Epidatabase. This will create .mdf files in wwwroot App_Data folder which your project will use.
- Once you have the .mdf files, you can try running the project by hitting F5 (debug mode) or Ctrl + F5 (non-debug mode). You will get an IIS error: HTTP Error 403.14 – Forbidden The Web server is configured to not list the contents of this directory.
- This is expected because you have an empty site after all.
- Instead, type in the default uiUrl, which is ~/episerver.
- Note: You might get some error related to JQuery settings. If so, you will need to add this appSetting in web.config (this can be added after the <configSections> section of the web.config):
<appSettings> <add key="ValidationSettings:UnobtrusiveValidationMode" value="None" /> </appSettings>
- Once this is done, you should be able to see the login. Login using the machine’s Windows credentials and you should be able access Edit/Admin mode.
Since it is an empty site, you do not have templates to work with, nor Alloy, but it is certainly one way to get a site as old as 8.8 without having to setup Deployment Center on the machine.