Skip to content

Installing Glass.Mapper.Sc

Mike Edwards edited this page Jan 21, 2019 · 10 revisions

Glass.Mapper.Sc installation is straight forward and performed using nuget packages. The installation method changes if you are using the new PackageReferences feature in Visual Studio.

Installing

Installation can be performed via the Nuget package manager by searching for Glass.Mapper.Sc.{version} where version is the version of Sitecore you are using.

Glass.Mapper.Sc currently supports the following Sitecore versions:

Sitecore Version Nuget Package
9.1 Glass.Mapper.Sc.91
9.0 Glass.Mapper.Sc.90
8.2 Glass.Mapper.Sc.82
8.1 Glass.Mapper.Sc.81
8.0 Glass.Mapper.Sc.80

To see the full compatibility visit the Compatibility Page

If you are using Packages.config then the nuget package will install all the required files automatically.

If you are using PackageReferences you will need to perform the following manual steps after installing the nuget package:

  1. Create the file /App_config/Include/Glass/Glass.Mapper.Sc.config with the following contents https://github.com/mikeedwards83/Glass.Mapper/blob/master/Source/Glass.Mapper.Sc/App_Config/Include/Glass/Glass.Mapper.Sc.config.
  2. Create the file /App_config/Include/Glass/Glass.Mapper.Sc.Start.config with the following contents https://github.com/mikeedwards83/Glass.Mapper/blob/master/Source/Glass.Mapper.Sc/App_Config/Include/Glass/Glass.Mapper.Sc.Start.config.pp
  3. Create the file /App_Start/GlassMapperSc.cs with the following contents https://github.com/mikeedwards83/Glass.Mapper/blob/master/Source/Glass.Mapper.Sc/App_Start/GlassMapperSc.cs.pp
  4. Create the file /App_Start/GlassMapperScCustom.cs with the following contents https://github.com/mikeedwards83/Glass.Mapper/blob/master/Source/Glass.Mapper.Sc/App_Start/GlassMapperScCustom.cs.pp
  5. Updated the placeholders $rootnamespace$ in the files you have just created.

Do you love Glass.Mapper.Sc and want to help make it the best Sitecore ORM?

Then head over to our Patreon page today and signup to support the project.

Your help will to support the continued development of the project.

We also provide Training Courses to get you up to speed quickly with the Glass.Mapper.Sc framework. The course will teach you everything you need to know to get started.

Clone this wiki locally