Per Bjurström
Mar 27, 2014
  5800
(13 votes)

Creating site from NuGet packages

Today we are releasing a new version of the Visual Studio extension that runs completely standalone, no requirement on Deployment Center (no MSI’s, no GAC etc.). Sites created with the Visual Studio extension are configured with NuGet packages out-of-the-box and are more similar to ordinary ASP.NET projects (both SQL and geolocation databases are for example stored in App_Data to mention one thing). The new templates also use Universal Providers to simplify deployment to Azure.

It may not be obvious but the Visual Studio extension does not need an internet connection to create new sites, which actually is a requirement from Microsoft for project templates (so no connection to nuget.episerver.com required). You can of course go online and update the solution to the latest greatest versions after the site is created, the Visual Studio extension will not be released as often as our NuGet packages even though we will of course keep it up to date over time.

There are also a couple of smaller changes such as the “Scheduled Job” template exemplifies stoppable jobs with UI feedback. Big thanks to you that tested and contributed to the previews builds. See release notes for details.

image

How do I get it?

Under Tools –> “Extensions and updates” inside Visual Studio, search for “EPiServer” in the “Online”-section. Or the “Updates”-section if you already have it installed. As part of this release we are also in the process of updating the Getting Started guide and releasing an updated SDK.

Want to create your own project templates?

An interesting part of this release is the project templates (what you see under File->New Project->EPiServer), they are just an empty project that installs the new EPiServer.CMS package. That means that you can have your own “empty” starter projects and just add this package to get a working EPiServer site.

I created a sample starter kit off the Visual Studio templates with a start page and the media types:

  1. git clone https://github.com/bjuris/EPiServerStarterKitSolution.git (or click on “Download ZIP”)
  2. Open the Solution File and in Package Manager Console run: Install-Package EPiServer.CMS
  3. Start the site, hit F5. Ready to go.

image

Feel free to fork and change to your heart’s content.

Do I need the Visual Studio extension for this? No, but the Visual Studio extension comes with some 20 item templates with everything from Initialization Modules to Page Types, they work on any ASP.NET project. So, even though you don’t use our project templates you can still use the item templates which at least I find highly usable.

Mar 27, 2014

Comments

Petter Klang
Petter Klang Mar 28, 2014 08:40 AM

I like it!

Mar 28, 2014 02:21 PM

The EPiServer.CMS package contains SQL scripts to create the database. Will EPiServer.LiveMonitor, EPiServer.CMO (and other packages) also be updated to be able to create the tables and sprocs they need?

And how should we go on to deploy this to another server? xcopy application files, but what about the database?

Mar 28, 2014 03:17 PM

Thanks Petter.

You can use either Detach/Attach or Backup/Restore to move a SQL database. The CMS packages are the first in line to support deployment via NuGet, more will follow.

Mar 28, 2014 09:33 PM

We will expose cmdlets (actually the CmsCore package already does but documenation will come) to make it possible to upgrade database from e.g. PackageManager console in VS (in case the package contains any db schema changes). There is also a cmdlet to generate a upgrade package, a physical folder which can be copied to a production server. The folder contain a .bat file to upgrade the db schema on the production server.

Please login to comment.
Latest blogs
Creating an Optimizely CMS Addon - Adding an Editor Interface Gadget

In   Part One   of this series, I covered getting started with creating your own AddOn for Optimizely CMS 12. This covered what I consider to be an...

Mark Stott | Aug 30, 2024

Configure your own Search & Navigation timeouts

The main blog Configure your own Search & Navigation timeouts was posted for years but you need copy the code to your application. We now bring tho...

Manh Nguyen | Aug 30, 2024

Joining the Optimizely MVP Program

Andy Blyth has been honoured as an Optimizely MVP, recognising his contributions to the Optimizely community. Learn how this achievement will enhan...

Andy Blyth | Aug 29, 2024 | Syndicated blog

Welcome 2024 Summer OMVPs

Hello, Optimizely community! We are thrilled to announce and welcome the newest members to the Optimizely Most Valuable Professionals (OMVP) progra...

Patrick Lam | Aug 29, 2024

Create custom folder type in Edit Mode

Content Folders, which are located in assets pane gadget or multichannel content gadget, allow you to add any type of block or folders. But...

Grzegorz Wiecheć | Aug 28, 2024 | Syndicated blog

Creating an Optimizely AddOn - Getting Started

When Optimizely CMS 12 was launched in the summer of 2021, I created my first AddOn for Optimizely CMS and talked about some of the lessons I learn...

Mark Stott | Aug 28, 2024