1

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!

1 Answer 1

0

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'...
1
  • Thanks a load! I figured this out myself a couple of hours ago and I've been working my way through it. Finally got to the point of a controller/etc and deploying everything, and it's still all fine. What a relief. Also, what a pain. There are A LOT of sitecore dlls to set to not deploy... Jul 16, 2020 at 16:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.