Part 1: Setting up the development environment – Create an EPiServer site from scratch
In this first part I’m taking you through setting up everything on a new computer. Most likely you’ll have done some of this before, in that case feel free to skip to the parts that interest you. If all this is new to you, I would install everything in the order described.
Update 08.12.2009
Ted Nyberg posted a nice blog post: How to set up an EPiServer website, that you should definitely check out (after you’ve read this one of course
).
Installing IIS, ASP.NET, SQL Server 2008, and Visual Studio
Microsoft as a great tool for quickly installing everything you need, its called the Web Platform Installer. Download and install it, after its installed, launch it and choose Web Platform. Here you’ll be able to choose the web server, frameworks and runtimes, and database server, that you’ll need.
For more information about the Web Platform Installer see Scott Guthrie’s introduction post and the official site.
I’m using Visual Studio 2008 Professional in this series, but you can use any version you like, including the free Visual Web Developer 2008.
Installing EPiServer
Go to EPiServer World and download the latest version of EPiServer, I’m using EPiServer CMS 6.
Unzip, and click setup to start. When asked choose Application Files (we’re adding the site later).

Subversion
Subversion is a popular open source version control system. It will help us get the latest version of our code, track changes, and a whole lot of other things. For more information I recommend taking a look at the free book: Version Control with Subversion.
Throughout this series I’ll update and keep all the code in EPiCode’s subversion repository. To work with EPiCode’s repository we need a Subversion client. My favorite is TortoiseSVN, but you can use any you like. You’ll need to download and install it (or any other subversion client). After the installation and restart you should have a few new options in Windows Explorer.

When following this series I recommend building your own project, and just use the project on EPiCode for reference when you’re stuck. Or just want to copy some files/folders.
To do a checkout of the repository, right click in Windows Explorer inside the folder you’d like to place the code, and choose SVN Checkout. Type in the URL https://www.coderesort.com/svn/epicode/JungleLand (note: you need to register on EPiCode first, if you don’t already are).
Other tools
My main development browser is Firefox, the reason for that is that you have access to a ton of great extensions that’ll help you a lot when developing a new site. One of those extensions is Firebug. Download and install both Firefox and Firebug if you don’t already have them. For more information, take a look at this screencast: Introduction to Firebug.
With Visual Studio I have two other tools: VisualSVN and ReSharper. VisualSVN to help me with Subversion, and ReSharper for helping me with the code. You don’t need all these tools to follow along with this series, but I recommend trying them out.
Also install UnleashIt. UnleashIt is used for removing subversion files (hidden files that Subversion uses to keep track), code-behind, class files etc, when deploying to our production server (everything is compiled inside .dll files).
The last program we need is Reflector. This is one of my favorite tools when working with EPiServer. It’ll allow you to open up any .dll file and inspect the code it contains. This is great for when you’re stuck on a problem and need to see how something behaves, or for just having fun and peeking inside EPiServer
.
Installing the site
Start the deployment center: go to Start, EPiServer, and EPiServer Deployment Center. Choose the EPiServer version you’d like to install (I’m using 6.0.382.1), and click, “Install site and SQL Server database”.
Step 1
Nothing special here, I’m using http://jungle as my local site url – for that to work I need to update my hosts file, located under C:\Windows\System32\drivers\etc\hosts (edit it with notepad or any other code editor). I’ve added the line: 127.0.0.1 jungle
Step 2
If you have a local SQL Server Express instance you can most likely just type .\SQLEXPRESS. If that doesn’t work, open up services (under Administrative tools in control panel) and check what your local SQL Server instance is called.
If you have other problems connecting, make sure that TCP/IP is enabled for your SQL Server instance. Open up Configuration Manager: go to Start, SQL Server 2008, Configuration tools, and SQL Server Configuration Manager.
Step 3
I just used the default VPP path suggested.
Step 4
Make sure to install the Public Templates with only the English content.
Step 5
If you like you can order a developer license, I’m just going to continue without adding a license file.
Step 6
Great, we’re now ready to install everything!
Time for a little coffee break – when we come back everything should be installed!
After installation
When the installation completes you should see something like this in your default browser.
Project folder structure
Great, we now have most of our environment configured and setup. Lets go to our projects root folder (C:\EPiServer\Sites\JungleSite) and rename PublicTemplates.csproj to JungleSite.csproj. Then open it in Visual Studio (double-click on JungleSite.csproj). You should have a structure similar to this:

Lets expand the Templates folder, and add a new folder called Jungle. Under Jungle, add the following folders:
- Images
- MasterPages
- Pages
- Scripts
- Styles
- Units
- Util

Next step is deleting the App_Data and Service_References folders. After you’ve done that expand Properties and open up AssemblyInfo.cs, and update the information here.
// General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("JungleSite")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Frederik Vig")] [assembly: AssemblyProduct("JungleSite")] [assembly: AssemblyCopyright("� 2009-2010 by Frederik Vig. All rights reserved")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")]
Last step is renaming the assembly and default namespace. Right click JungleSite and choose Properties.

Make sure it builds by pressing either ctrl + shift + b, or going to: Build, Build JungleSite. It should build fine (since we didn’t change any of the code). Last thing to remember is to delete the old dll file. Go to your bin folder and delete the file called EPiServer.Templates.Public.dll.
All the code is also available on EPiCode for you to checkout and download.
That’s it! In the next post, we’ll start building the site by implementing our sites foundation.









And we are off to a flying start!
I like it, the best Advent calendar this year.
This will SO much be helpful to those new to EPiServer. Also great advice for current developers.
I like to start out with a completely clean EPiServer installation, because you’ve got more control then. Then just drop in the libraries, controls etc you want to use.
Looking forward to the next EPiSodes!
[...] Continued here: Part 1: Setting up the development environment – Create an … [...]
@Petter – Thanks! Though I would consider 24ways.org to be the best one
. Always looking forward to it every year.
.
@Martin – I agree on the clean project. What I’ve started doing is just keeping a separate public templates, demo templates etc projects that I open up and get code from when I need to, more of a snippets approach I guess. Like building with legos
Nice writeup!
I will recomend this series to a few people new to EPiServer.
[...] Twitter « Part 1: Setting up the development environment – Create an EPiServer site from scratch [...]
[...] « Extending EPiServer Categories Part 1: Setting up the development environment – Create an EPiServer site from scratch [...]
Hi Fredrik,
thanks to a lovely series on EPiS.
Can not pass one step. *Installing the site / Step 6+
Following your steps and when the installation is almost finished i get the following EM:
Progress – Install Site (SQL Server)
Error – Could not find a part of the path ‘C:\EPiServer\Sites\greenhippo\util\setup\EnglishPublic.episerverdata’.
If i instead check module and global = no problems or EMs (Step 4).
Any suggestions?
Hi Rado
I haven’t had this error message before, but make sure that the .episerverdata package is in your EPiServer folder: C:\Program Files (x86)\EPiServer\CMS\xxxx\Install\Modules\PublicTemplates\util\setup\. You can also install the Public Templates afterwards in the deployment center. If that doesn’t work try reinstalling EPiServer.
Hope this helps.
[...] another way. Make sure to install EPiServer on the server if it isn’t already installed (see Part 1: Setting up the development environment for more [...]
Hello Frederik,
I just found this Blog yours while I was trying to get a more strong start-up with EPiServer, I have actually took a course in EPiServer CMS 5 and I am going to be working very soon in such a project and I wonder how much differs this version -CMS 6- with the previous CMS 5 R2. I read in EPiServer web page that current issues in version 5 were fixed in this new version.
As I mention I am very excited to complete all these entries that you have make available, thanks very much and I will likely leave comments along all these series.
Cheers,
Alan
Hi Alan!
I recommend using EPiServer CMS 5 R2 latest version (SP2), until CMS 6 gets out in a stable version. There is not that much difference, so much of the things you do in CMS 5 R2 will keep working fine in CMS 6. I recommend checking out world.episerver.com for more information on the differences between the two.
Hope this helps.
Frederik
Hello Frederik,
I am actually working with version 5 R2 and is works pretty well and I would like to hear if you have some suggestions for working with Site-footer and what would be a good approach.
thanks for help
Alan
Hi Alan!
In the sites footer we have four columns. The first and last are mostly free text types, where the editor can type in and format the content how she likes. I would use the PropertyXhtmlString for this. For the second and third columns, I would use the PropertyLinkCollection. This will allow our editors to easily choose what links they want to add, change their order etc. These properties can either be placed as dynamic properties, to make it easy for editors to change them on a site by basis, or you can add them to the sites start page (I recommend this option for better performance).
Hope this helps.
Frederik
Hi everyone,
This guid is just what i need as a junior EPi-developer, great!
Following this first part i’ve already run into some truble. I’ve have followd all the steps except the Subversion bit because i’m wating to be allowd into EPiCode.
When installing the default site i get to step 6 without trouble. I run the installation without any error messages but after a while my browser opends but with a message that the site can’t be shown.
I installd the environment with Web Platform installet as described above and i have checked the host file. If i go to localhost i get the IIS. I have Windows 7 installed om my computer.
What could be the problem?
/Andreas
Hi Andreas,
are you able to install and get running a clean EPiServer public templates site?
Frederik