Henrik Fransas
Apr 23, 2014
(3 votes)

The ultimate EPiServer Windows Azure website (part 1)

I start by creating a new project with the help of the updated version of EPiServer CMS Visual Studio Extension (version: and because I will later add asynchronous version of logging I selected Framework 4.5.


All worked out fine a my new solution were created that build ok. I noticed a couple of changes I liked in this version of Extension.

Episerver.config and episerverframwork.config is gone and included in web.config
This is good since it easier to do transformations and now these sections (files) is so small that it is ok. Before this was not recommended to do since EPiServer made changes in episerverframwork.config for every computer running the site, and it is not good to have a site that do changes in web.config on the fly. This is now gone thankfully.

2: Below the AppData directory a database file were created and in web.config the connection string pointed to this file.
This is great and helps to get coding fast and removes the dependency to have a local sql server installed on the development machine.

One boring thing I discovered was that the projected was not created with framework 4.5, only with framework 4.0 and all nuget package installed with 4.0 version.


This sucks because I really need 4.5 and this makes me wonder if EPiServer not supporting 4.5 yet.

So the first things I need to do before doing any coding at all is

1. Change the framework on the project to 4.5

2. Update all nuget package to point to 4.5 instead

This was easier said than done and after a while I ended up with deleting the whole the project and started over doing this (Must be done in this order!):

1. Change the framework on the project to 4.5

2. Update all EPiServer nuget packages

3. Update package Microsoft.AspNet.Mvc

4. Update package EntityFramework

5. Update package Castle.Windsor

6. Update package Castle.Core

7. Some of the packages can’t be upgraded since there are no updated version of EPiServer supporting that. These packages are:

a. DotNetZip

i. Error: Update-Package : Updating 'DotNetZip' to 'DotNetZip 1.9.2' failed. Unable to find a version of 'EPiServer.CMS.UI.Core' that is compatible with 'DotNetZip 1.9.2'.

ii. Run instead: Update-Package –reinstall DotNetZip

b. Newtonsoft.Json

i. Error: Update-Package : Updating 'Newtonsoft.Json 5.0.8' to 'Newtonsoft.Json 6.0.2' failed. Unable to find a version of 'EPiServer.Framework' that is compatible with 'Newtonsoft.Json 6.0.2'.

ii. Run instead: Update-Package –reinstall Newtonsoft.Json

c. NuGet.Core

i. Error: Update-Package : Updating 'NuGet.Core 2.5.0' to 'Nuget.Core 2.8.1' failed. Unable to find versions of 'EPiServer.Packaging, EPiServer.Packaging.UI' that are compatible with 'Nuget.Core 2.8.1'.

ii. Run instead: Update-Package –reinstall NuGet.Core

d. Structuremap

i. Error: Update-Package : Updating 'structuremap' to 'structuremap' failed. Unable to find a version of 'EPiServer.Framework' that is compatible with 'structuremap'.

ii. Run instead: Update-Package –reinstall structuremap

e. log4net

i. Update-Package : Updating 'log4net 1.2.10' to 'log4net 2.0.3' failed. Unable to find a version of 'EPiServer.Framework' that is compatible with 'log4net 2.0.3'.

ii. Run instead: Update-Package –reinstall log4net

8. When doing a update package after you have changed framework version it will automatically install the updated version with framework 4.5 but for some packages there are no updates so these have to be reinstalled. Do it in this order:

a. Update-Package –reinstall Microsoft.AspNet.Providers.Core
When doing this, you will get this errormessage: “One or more packages could not be completely uninstalled: EntityFramework.6.1.0. Restart Visual Studio to finish uninstall.” Ignore that and restart Visual Studio after you are done.

b. Update-Package –reinstall Microsoft.Web.Infrastructure

9. Include the directory modulesbin in the solution (need it for more simple deployment)

10. Include the mdf-file (in AppData) in the solution (need it to simplify get latest deployment)

Wow, now we are done to start coding, nuget is a great tool but also a tool that can be very annoying and buggy! Here is a diagram over how all nuget packages in this empty solution is related to each other.


In the next part of this blog I am actually going to do some coding, be back in a couple of weeks. Please feel free to comment your thoughts on this!

Apr 23, 2014


Frederik Vig
Frederik Vig Apr 23, 2014 06:28 PM

.NET 4.5 is supported.

henriknystrom Apr 24, 2014 12:28 AM

I would be somewhat careful in forcing updates of dependent packages to versions that are not set as compatible, especially when it's a major version change. Chances are that there could be incompatibility problems. Do you really need the absolute latest versions of all those packages?

Henrik Fransas
Henrik Fransas Apr 24, 2014 07:05 AM

I totally agree with you Henrik. I would never force a update on non compatible packages, that's why I did a update with reinstall instead of these packages, just for them to be installed with framework 4.5, not framework 4.0.
The packages I did got to update I need because I will do the site in MVC5 and I will use async await in Entityframwork.

Henrik Fransas
Henrik Fransas Apr 24, 2014 07:06 AM

Thanks Fredrik, good to know.

Apr 24, 2014 02:23 PM

Looking forward to your posts. In the next version of the VS extension we have fixed so that if you select .NET 4.5 we honor that, hope to get it out soon.

Henrik Fransas
Henrik Fransas Apr 24, 2014 02:26 PM

Sounds good Per and a little tip is that the extension didn't see that there were a upgrade last time, I had to do a manual uninstall / install to get the latest version.
Thanks for the feedback!

Gayathri Saravanan
Gayathri Saravanan Apr 25, 2014 07:12 AM

Waiting for next post

Henrik Fransas
Henrik Fransas Apr 25, 2014 07:21 AM

Thanks Saravn. It will be up in a couple of weeks, now in Sweden we have this holiday on the first of may with a day of on the Friday so not much will be done next week :)

Please login to comment.
Latest blogs
Optimizely PIM - Variant Management Overhaul & Rollout

Optimizely PIM has completely overhauled variant management with improved usability and support for variant swatches. In order to enable this...

Arthur Vander Voort | Feb 4, 2023

You Just Got Vectored! SVG Image Formats

 If you're reading this, then you've come across a need that nearly all Opti developers encounter in their careers; You need to display a vector...

Greg J | Feb 3, 2023 | Syndicated blog

CMS Core 12.12.0 delisted from Nuget feed

We have decided to delist version 12.12.0 of the CMS Core packages from our Nuget feed. As a consequence, we are also temporarily delisting version...

Magnus Rahl | Feb 3, 2023

How Optimizely Web Experimentation enables fast validation of design and UX changes

Ever wondered how to increase conversion rates and quickly validate design/UX alternatives to find the most impactful changes? I wrote a practical...

Jacob Pretorius | Jan 31, 2023