I am guessing that most new EPiServer installations are targeted against .net 4.0. Well the ones running at my company certainly are! Allan Thræn has already documented how to set up EPiServer CMS 6 to run on .net 4.0. This involves some web.config changes and an optional modification to the .csproj file.

However I don’t want to manually make these changes each time in order to run EPiServer under .net 4.0 as I frequently have to set up new demo sites. I’ve had default web.config’s for the Alloy Tech demo site and core install on my machine for a while so wanted to share them here in the hope it saves some other people time.

Default web.config for EPiServer Alloy Tech demo site running .net 4.0

web.config.txt (42kb) (opens in new window)

Default web.config for EPiServer core files installation only running .net 4.0

web.config.txt (42kb) (opens in new window)

If you need to set a reference to System.ComponentModel.Composition.dll in the .csproj file then you need to make some modifications as Allan has described. If you installed EPiServer at its default location then here is some simple “copy and paste”able text for the modifications to the .csproj file (assuming you are running EPiServer CMS 6 R2).

64-bit install

  C:\Program Files (x86)\EPiServer\Framework\\bin\System.ComponentModel.Composition.dll 

32-bit install

  C:\Program Files\EPiServer\Framework\\bin\System.ComponentModel.Composition.dll 


Please feel free to comment below or twitter me with any feedback @davidknipe


If you don't fancy making the changes yourself then this is now available as a package on the EPiServer Nuget feed


Recommendations for you