Skip to main content

Posts

Showing posts with the label visualstudio

Troubleshooting 'System.Web.Mvc' Error During Sitecore Visual studio solution Publishing

  In my most recent blog, I extensively covered the steps involved in configuring a Visual Studio Solution for Sitecore development . Following the publishing process, I came across an error message that read " could not load file or assembly 'system.web.mvc, version=5.2.4.0 ," as visibly shown above. The root of the problem was traced back to a discrepancy between my Visual Studio solution, which was utilizing version 5.2.7.0 of  'system.web.mvc,' and the Sitecore Instance, which was employing version 5.2.4.0. To successfully address this issue,  I adopted a straightforward solution:  Copied the ' system.web.mvc.dll ' and ' system.web.mvc xml'  from my backed-up " C:\inetpub\wwwroot\sc103sc.dev.local - Copy\bin" folder.  Pasted to Visual Studio solution " C:\Users\ilma\source\repos\MySitecoreDemo\MySitecoreDemo\bin " and updated the solution Reference for the same. Also pasted to current Sitecore Instance ' bin folder  C:\i...

Set up Visual Studio MVC Solution for Sitecore development

  Prerequisites: Sitecore (I have used Sitecore 10.3 in this example) Visual studio (Visual studio 2019) with Sitecore installed .Net 4.8 Checkout  Sitecore compatibility table for Sitecore XP 9.0 and later Set up a Visual Studio project To set up a Visual Studio 2019 project for Sitecore MVC: Open Visual Studio 2019 as an Administrator and click Create a new project  In the Create a New Project dialog, add filter C#, Windows ,Web now scroll and Select ASP.NET Web Application and click on Next In the Configure your New Project dialog, write the Project name and make sure to select .Net Framework 4.8 then click on Create . In the Create a new ASP.NET Web Application dialog, select Empty and check MVC then click on Create .  Following structure will be created. Delete App_Start folder we will not use it.  Copy the  Global.asax   and Web.config file from the Website folder of the Sitecore installation. Now write click on the solution and click ...