Error with site compilation in ver 5.0

Posted by Community Admin on 04-Aug-2018 14:19

Error with site compilation in ver 5.0

All Replies

Posted by Community Admin on 27-Mar-2012 00:00

We are  using Sitefinity 5.0 version. We followed below links to create Intra-site Modules:

www.sitefinity.com/.../adding-modules-intra-bare-bones.html
www.sitefinity.com/.../intra-simple.html

We are getting an error, like -

Compiler Error Message: CS0246: The type or namespace name 'CmsToolboxItem' could not be found (are you missing a using directive or an assembly reference?)

from below code -

public override System.Collections.Generic.IList<IToolboxItem> Controls
       
            get
           
                return new List<IToolboxItem>(
                    new ToolboxItem[]
                        new CmsToolboxItem("~/ContactsModule/ContactsList.ascx", "Contacts", "Contacts list", "Displays list of all contacts"),
                        new CmsToolboxItem("~/ContactsModule/SingleContact.ascx", "Contacts", "Single contact", "Displays all info about single contact")
                    );
           
       

The help links that we got are all related to ver 3. Is there any help we can get for ver 5.0?

Posted by Community Admin on 28-Mar-2012 00:00

Dear Pritam
It happend to me in the past that when I would use build instead of rebuild some of the .dll went missing or the references to that dll.
I did back then create a new blank project, copy all the dlls to my bin folder and went to references and made sure that all the dlls were referenced from within the bin folder of my project.
You might want to check this.
Markus

Posted by Community Admin on 28-Mar-2012 00:00

Hey Pritam,

The best (and easiest) thing you can do is download the v5 SDK. This has up-to-date samples and comes with documentation. The documentation can even be called from inside VisualStudio.

Good luck,
Jochem

Posted by Community Admin on 28-Mar-2012 00:00

Hey Pritam,
  I think the problem is that you followed a 3.x sample and SF 4-5 has been gutted and re-written from scratch; the API is pretty different.

- If you install the SDK that'll give you some samples on creating custom modules
- Here's the documentation for 4-5 http://www.sitefinity.com/documentation/documentationarticles/developers-guide/sitefinity-essentials/modules/creating-custom-modules
- And actually its WAY easier in 5.0 with the module builder (if that'll work for you...no code!)
  http://www.sitefinity.com/asp-net-cms-for-developers/module-builder.aspx
http://www.sitefinity.com/blogs/gabesumner/posts/12-01-12/building_real-world_modules_with_sitefinity_rsquo_s_new_module_builder.aspx

This thread is closed