- Firstly, create a new a new web project and ensure the target .NET Framework version is 4.6.2 (see here if 4.6.2 is not available).
- For a project template select the Empty option and check the MVC checkbox.
- Delete the Global.asax file.
- Set the Build Action to None for the Web.Config file.
- Add the Sitecore Nuget Feed as a source in Visual Studio.
- Add the following nuget packages from the Sitecore feed (I like to use the no reference ones, as the dependent references are often not required).
- Sitecore.Kernel
- Sitecore.Mvc
- Sitecore.Mvc.Analytics
- In the Views/Web.Config file add the following two lines (in the namespaces section):
<add namespace="Sitecore.Mvc" /> <add namespace="Sitecore.Mvc.Presentation" />
Now your project is ready to build and deploy to your Sitecore instance. Don't forget to follow the Helix principals!
No comments:
Post a Comment