How To Install EPiServer 7.5 Using the New Visual Studio Extension

Since Episerver 7.5 you can install Episerver CMS via Nuget. Being able to install Episerver via Nuget makes upgrading a lot simpler compared to previous versions. In the future when you want to upgrade your site, you should be able to do it via the Package Manager. It also means that to add new features

Step One – Set-up Your EPiServer NuGet Feed

For this tutorial, I’ll assume you have Nuget installed. If you don’t, have a quick Google. In Visual Studio click Tools -> Options and navigate to the ‘NuGet Package Manager -> Package Sources’ tab.

Screenshot_7

Click the ‘+’ icon and at the bottom add in EPiServer as the name and for the package, source uses this URL:

http://nuget.episerver.com/feed/packages.svc/

Click ‘Update’ and you’re down. In Nuget you should now see an EPiServer tab in the Online section that allows you to browse a number of EPiServer related functions.

Step Two- Download the new Visual Studio Template

First thing is you need to do is download the EPiServer, the easiest method is to download the Episerver Website Template.

Step Four – Create a new website

Screenshot_3

In Visual Studio create a new Project, make sure ‘Installed’ is selected and type ‘epi’ into the search field. You should see a project called ‘EPiServer Web Site’ select it.

Screenshot_5

Select which project type you want, hit ‘Ok’ and sit back. Now I should warn you I have waited around 20 minutes for this process to finish. The ‘Empty’ project obviously will take less time as it has less to install but it will mean you have more work to do. I suggest at this point hitting F5 in Visual studio and make sure the site works OK. Remember if you used the Empty project you should just see a 404 page. If you see a network-related error that’s OK. All the error means is that you still have some database configuring to do.

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible.

If you are puzzled about the location of the default database, then in Visual Studio if you click on ‘Show All Files’ and have a look in your ‘App_data’ folder and you should see an EPiServer .mdf and .ldf.

In most scenarios, you want to host your Episerver database in SQL server, rather than your websites ‘App_data’ folder. In a production environment, this is definitely considered bad practice. So to fix the issue, move the .mdf and .df out of your App_Dat folder, attach it in SQL and then in your web.config connection string update your connection details accordingly:

<connectionStrings>
<add name="EPiServerDB" connectionString="Data Source=###;Initial Catalog=###;User ID=###;Password=###;" providerName="System.Data.SqlClient" />
</connectionStrings>

Step Five- Update the Core packages

As this new project works via Nuget it’s very likely that a few of the packages you may want to use are out-of-date and need upgrading. After I’ve created a new project I always update my Core packages to make sure I’m using the latest versions. Right click on your new website in solution explorer and manage ‘Manage NuGet Packages’.

Screenshot_6

In Nuget make sure ‘Updates is selected. Click on the EPiServer feed you created in Step One. You will probably now see a list of packages the installer installed that are out of date. If you click the ‘Update All’ button Visual Studio will now update all the files for you.

Now you’ve updated your core packages you may also need to update your database. First thing to do after the core package update is to run the site. If you get a database error then you’ll need to run a simple database update command.

The database has not been updated to the version ‘7007.0’, current database version is ‘7006.0’. Update the database by running the cmdlet ‘update-epidatabase’ in the package manager console.

To fix this simple open the package console:

Screenshot_8

Type in ‘update-database’ and Nuget should automatically run the required SQL scripts to upgrade your website.

Conclusion

If you have followed the instruction properly you should now have a fully working EPiServer site. I’ve created a few websites using this process now and it does make the process a lot easier, however, from my experience the process is painfully slow, I think it took me over 40 minutes to install a site that I could have done in 10 minutes normally.

Jon D Jones

Software Architect, Programmer and Technologist Jon Jones is founder and CEO of London-based tech firm Digital Prompt. He has been working in the field for nearly a decade, specializing in new technologies and technical solution research in the web business. A passionate blogger by heart , speaker & consultant from England.. always on the hunt for the next challenge

More Posts

3 replies

Trackbacks & Pingbacks

  1. […] How To Install EPiServer 7.5 Using the New Visual Studio Extension […]

  2. […] If you are comfortable working with Visual Studio, then I recommend that you read this guide, How To Install EPiServer 7.5 Using the New Visual Studio Extension. If you are non-technical then you can contact EpiServer directly from […]

  3. […] If you already have a website installed and forgot to enable the ‘Add EpiServer Search’ option don’t panic as you can install it anytime via Nuget. If you need Nuget advice read this article first How To Install EPiServer 7.5 Using the New Visual Studio Extension […]

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *