The type or namespace name 'Sitefinity' does not exist in the namespace 'Telerik' (are you missing an assembly reference?) - Front- & Back-End Development - Front- & Back-End Development - Progress Community

The type or namespace name 'Sitefinity' does not exist in the namespace 'Telerik' (are you missing an assembly reference?)

 Front- & Back-End Development

The type or namespace name 'Sitefinity' does not exist in the namespace 'Telerik' (are you missing an assembly reference?)

  • The type or namespace name 'Sitefinity' does not exist in the namespace 'Telerik' (are you missing an assembly reference?)
  • Hi,

    I've written a basic C# 4.0 console application which uploads files from my local machine to my remote Sitefinity 4.0 site.

    I've added the following references:

    using Telerik.Sitefinity;
    using Telerik.Sitefinity.Libraries.Model;
    using Telerik.Sitefinity.Modules.Libraries;

    These references are on lines 3, 4 and 5 of the class. They are in used (not greyed out).

    However, I get this compilation error:

    Error   2   The type or namespace name 'Sitefinity' does not exist in the namespace 'Telerik' (are you missing an assembly reference?)   C:\SourceControlledProjects\SitefinityUploader\SitefinityUploader\SitefinityUploader\Program.cs   4   15   SitefinityUploader


    That's one for line 4, I get two more of these errors (for lines 3 and 5, too, exactly the same error).

    What am I missing here?

    Thanks
  • I would double check that those references are actually referenced in that Console project. Did you go through the process to add the dlls to your bin and reference them in the project?
  • Yep, I did. The .dlls exist in the location I added them from (obviously). And after adding the references, the physical dlls still exist in their respective directory (if not, VS2010 would have the yellow exclamation mark next to the reference name).

    There is one error in the code (GetFiles method has no parameter specified), if I fill in the parameter, this doesn't fix anything (obviously, too).

    I've referenced the assembly through the using statements, after adding them to references. I also did not reference them via the using statements, after adding them to the project, and instead specified a fully qualified path to the classes I need (e.g. Telerik.Sitefinity.Model.... or whatever), but this does not fix anything, either.
  • Right Click on your project and click Properties
    Change your Target Framework to .NET Framework 4, im guessing you have .NET Framework 4 Client Profile selected

    Recompile and you should be good to go.
  • Did that, code compiles, thanks!