TransWikia.com

Sitecore 9.3 Visual Studio setup help - errors on deploy

Sitecore Asked by ilgiallomondadori on August 23, 2021

I’ve started trying to follow the Sitecore Platform Essentials for Developer eLearning which is going fine, but when I deploy the project, the site just breaks on start with an error about no paramaterless constructor found. I believe it’s because it’s copying over DLLs from my solution that are different from the dlls in the installation.

Are there any detailed guides on setting up Visual Studio with a Sitecore 9.3 installation? I can’t seem to find any documentation at all.

Thanks for the help!

One Answer

Make sure you have set the dlls in visual studio as "copy local to false" in their properties to avoid errors as given in the following official Sitecore documentation :

https://doc.sitecore.com/developers/93/sitecore-experience-manager/en/set-up-sitecore-and-visual-studio-for-development.html

Also, make sure your controller is having a parameterless constructor like below

public MyController()
{
   //stuff
}

EDIT : (Tip) If incase your site crashes - you dont have any solution/fixes and you don't have backup, you can still find the entire folders and files of a vanilla Sitecore instance inside the installation zip file (Sitecore 9.3.0 rev. 003498 (OnPrem)_single.scwdp.zip/Content/Website). You need not install a new Sitecore instance again.. :)

Specifically, set the copy local to false for System.Web.Mvc.dll besides the regular dlls such as Sitecore.Kernel, Sitecore.Mvc, Sitecore.Mvc.Analytics

Basically, if it is a dll version mismatch after deploy/publish to your webroot folder, then you would get error message such as

Could not load file or assembly 'System.Web.Mvc'...

Correct answer by Paulson Maclean on August 23, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP