Creating a Visual Studio Solution

In the last blog we had done the introduction to the files and folders of Sitecore 9.2 installation. Now lets create a Visual Studio solution to support this Sitecore instance.

  1. Open Visual Studio 2017 in an administrator mode.
  2. Click on File >> New >> Project.
    9
  3. Select Web in left, we are creating ASP>NET Web Application. Enter the name of the project (DummyWebsite in my case). Make sure you select the framework 4.7.2.
  4. Click OK.
  5. Now lets select the Empty MVC solution.
    10
  6. Click OK. The following website structure will be created in the project.
    11
  7. Now lets configure the solution.
  8. Create one folder “Libraries” and add Sitecore.kernel.dll & Sitecore.Mvc.dll in the folder from the sitecore instance bin folder (C:\inetpub\wwwroot\SitecoreDemo.dev.local\bin)
    a. Create folder
    b. Right Click >> Add >> Existing Item
    12
    c. Navigate to the bin folder of Sitecore instance (SitecoreDemo) and Select both the dlls.
    13
    d. After the dlls are added to solution.
    14
  9. Lets add these 2 new dlls in the References.
  10. Right click on References >> Add Reference.
    15
  11. Click on Browse and Navigate to the Libraries folder (C:\Users\rohanke\source\repos\DummyWebsite\DummyWebsite\Libraries)

    16

  12. Select both the dlls and Click Add.
    17
  13. Click OK. And both dlls will be added to References.
    18
  14. Select App_Start folder, Global.asax and Web.Config files and delete it.
    19
  15. Copy Global.asax & Web.Config file from Sitecore instance folder (C:\inetpub\wwwroot\SitecoreDemo.dev.local)
    20
  16. Paste it in the Project.
    21
  17. Lets take a full backup of Sitecore Instance folder in C:\inetpub\wwwroot so if we come across any issues post publishing the Visual studio solution then we can quickly rollback.
    22
  18. Select SitecoreDemo.dev.local folder and right click >> Properties >> Security.
    24
  19. Click Edit >>Click Add.
    25
  20. Select Network Service and Click OK.
    26
  21. Select Network Service, select the Full Control check box & click Apply.
    27
  22. Click OK.
  23. Go to IIS Server >> Select Application pools.28.png
  24. Change the Identity to Network Service.
    29.png
  25. Click OK.
  26. Go to Visual Studio, select the the project and right click >> Publish
    23
  27. Select Folder and Click on Browse.
    30.png
  28. Select the Sitecore instance folder and Click on Advanced.
    31
  29. Select Debug as Configurations and Click Save.
    32.png
  30. Click Publish.
    33.png
  31. Once the publish is successful. Browse the front end (http://sitecoredemo.dev.local/) and Back end (http://sitecoredemo.dev.local/sitecore) to check if the configuration is properly done.

In this blog, we have configured the Visual Studio solution for the Sitecore 9.2 instance. In the next blog, we will understand what all components we will create in Logistico website based on the HTML template.

Thank you.. Keep Learning.. Keep Sitecoring.. 🙂

 

2 thoughts on “Creating a Visual Studio Solution

  1. Pingback: Introduction to the Dummy Website series using Sitecore | Sitecore Dairies

  2. Hey there! This post couldn’t be written any better! Reading this post reminds me of my previous room mate! He always kept chatting about this. I will forward this write-up to him. Pretty sure he will have a good read. Many thanks for sharing!

    Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s