Clean Sitecore 7 project template with full ASP.NET MVC 5 and NuGet support.
Why should I use this template?
- Contains clean Sitecore 7 (including Localization and ImageCropper modules), with .NET 4.5.1, MVC 5 and NuGet support. Suitable for everyone: use it as a basis for your project, for quick test website, or just for fun.
- Integrated into Visual Studio as extension, which means easy install, pushed udpates and familiar experience.
- Fully automated project creation: click OK and see working website in a minute. Project files, latest Sitecore files, IIS website, SQL db and access rights are all created and configured for you.
- Source code in on GitHub: clone, contribute or even fork to your own template.
- Fully automated project template creation and package bundling: just work with ordinary Sitecore website, and tools will create a template with all needed placeholders for you, and a package for Visual Studio gallery.
- Visual Studio 2012/2013
- .NET 4.5/4.5.1 (MVC 5 doesn't support .NET < 4.5). Download .NET 4.5.1
- PowerShell 3/4 (Windows 7 has PS2, Windows 8 - PS3, Windows 8.1 - PS4). Download PowerShell 4
- IIS >= 7
- SQL Server 2008 R2 Express (SQL Server 2012 is not supported yet, because it's still not widely used). Download SQL Server 2008 R2 SP2 Express
Install in Visual Studio by searching "Sitecore mvc" in Tools -> Extensions and Updates... window.
Or download extension from Visual Studio gallery.
To create a new Sitecore 7 project:
- Run Visual Studio as administrator (his rights required to create a website in IIS)
- In Visual Studio, click File -> New Project…
- Select project type (see notes below):
- VS 2012: Visual C# -> Web -> ASP.NET MVC 4 Web Application
- VS 2013: Visual C# -> Web -> Visual Studio 2012 -> ASP.NET MVC 4 Web Application
- Select .NET Framework version (only 4.5 or 4.5.1 are supported by MVC 5)
- Set project name and location, click OK
- Select
Sitecore 7
project template, click OK - Select Sitecore license file to use for a site and click OK
- Wait a couple of minutes while project is being installed
- After successful project creation you'll see a new website is opened in your browser
NOTE: Yep, I know it's weird to select MVC 4 project type when MVC 5 is actually used. But this is due to a couple of strong reasons:
- MVC 5 is a part of ASP.NET One reorganization, and they have totally different project template format (to support one-click Web Forms/Web API or authentication installation) which is not documented anywhere for now. And unfortunately Sitecore is not using that stuff now and in the near future.
- Visual Studio 2012 doesn't support MVC 5 at all now, neither the new ASP.NET One project templates (they should include MVC 5 support in November 2013, let's see).
This project is using vspte command-line tool to automate Visual Studio project template creation. Source code is available on GitHub.
Pavel Nezhencev, 2013