EPiServer products that supports .NET Framework 4 also supports the .NET Framework 4.5 update. Since .NET 4.5 in an in-place update many installations already run on this version even though not specifically targeting any of the new features.
EPiServer NuGet packages EPiServer.CMS.Core 7.14 and higher requires .NET Framework 4.5 to be used as the target framework in Visual Studio. Currently the only version of .NET Framework 4.x that Microsoft will support beyond 2015 is .NET Framework 4.5.2 so we recommend all projects to target this version or newer whenever possible.
Currently the NuGet packages provided by EPiServer support all versions in the .NET 4.5.x series since many projects run on previous versions but that may change going forward.
- Support for .NET 4.5.2 in Visual Studio 2013/2013 can be downloaded here: <http://www.microsoft.com/en-us/download/details.aspx?id=42637>.
- Go the projects properties and make sure the target framework is 4.5.2:
- Some NuGet packages have an assembly optimized for .NET 4.5, you will see an error message describing which packages to re-install to get the new assembly.
Run the following command from the "Package Manager Console" for each package in the error message that shows up while changing target version.
In a default CMS site created via the Visual Studio extension the following packages have to be re-installed: Castle.Core. Castle.Windsor, EntityFramework, Newtonsoft.Json.
If .NET Framework 4.5 is not installed on the production server you can find a downloadable package here: <http://www.microsoft.com/en-us/download/details.aspx?id=42642>
Compiler error: 'EmailAddressAttribute' is an ambiguous reference between 'System.ComponentModel.DataAnnotations.EmailAddressAttribute' and 'EPiServerSite4.Business.EmailAddressAttribute.
A class with the same name and functionality exists in version 4.5 of .NET Framework, this class can be deleted from the project.
Error 1 The command "C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe "C:\EPiServer\SP\wwwroot\[MSBuild]\Scripts.xml"
C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe "C:\EPiServer\SP\wwwroot\[MSBuild]\Stylesheets.xml"" exited with code 9009.
There are missing quotation marks in the post build event, you can fix this by editing the project file (MyProject.csproj):
<PostBuildEvent> **"**$(MSBuildBinPath)\\msbuild.exe**"** "$(ProjectDir)\[MSBuild\]\\Scripts.xml" "$(MSBuildBinPath)\\msbuild.exe" "$(ProjectDir)\[MSBuild\]\\Stylesheets.xml" </PostBuildEvent>
Updated 5 days ago