The content you're reading is getting on in years
This post is on the older side and its content may be out of date.
Be sure to visit our blogs homepage for our latest news, updates and information.
A few weeks ago the Sitefinity 4.0 BETA SDK was released. This SDK includes tools, examples and documentation designed to help developers create add-on’s or customizations for Sitefinity. As time allows, I’ve been experimenting with these new developer features.
However, in the midst of this exploration I also discovered that that the Web Application projects created by Sitefinity’s Project Manager are missing assembly references required to use the Fluent API and other Sitefinity 4.0 developer features.
This means code samples from the Sitefinity 4.0 BETA documentation fail to compile.
This blog post describes how to add these missing assembly references:
1. Open Sitefinity’s Project Manager
2. Select the project
2. Click the Edit in Visual Studio button
3. In the Solution Explorer, right-click References and click Add Reference
4. Click the Browse tab
5. Navigate to the project’s ~/bin folder
6. Use Control + A to select all the files in this folder
Realistically, you probably don’t need all of these assembly references. In most cases, you probably only need a reference to Telerik.Sitefinity.Model. However, adding all assemblies will ensure you have everything you could possibly need.
7. Click the OK button
Visual Studio should now be able to resolve the namespaces:
[ This code sample can be found in the Sitefinity documentation ]
If you received this error:
…then it probably means you have Telerik’s RadControls installed on your computer. Visual Studio has added a reference to these installed assemblies. If the installed version of RadControls matches the version used by Sitefinity, then everything will be fine. However, if there is a version mismatch then the Sitefinity project will crash.
I wrote a detailed blog post describing this issue and how to fix it.
To fix this, the existing references need removed and the new ~/bin assembly references need added.
These are common errors related to this blog post. I’m posting these errors for SEO & discoverability purposes:
A reference to ‘C:\Users\sumner\Desktop\Demo\Projects\Demo\bin\Telerik.WebDesign.dll’ could not be added. A reference to the component ‘Telerik.Web.Design’ already exists in the project.
A reference to ‘C:\Users\sumner\Desktop\Demo\Projects\Demo\bin\Telerik.Web.UI.dll’ could not be added. A reference to the component ‘Telerik.Web.Design’ already exists in the project.
The type or namespace name 'GenericContent' does not exist in the namespace 'Telerik.Sitefinity' (are you missing an assembly reference?).
Telerik.Sitefinity.Fluent.Content.BlogFacade.ContentFacade<BlogFacade, Telerik.Sitefinity.Blogs.Model.Blog.BlogFacade>.Do(Action<Telerik.Sitefinity.Blogs.Model.Blog> setAction)
Performs an arbitrary action on the content object.
Type types argument for method Telerik.Sitefinity.Fluent.Content.BlogFacade.ContentFacade<BlogFacade, Telerik.Sitefinity.Blogs.Model.Blog.BlogFacade>.Do(Action<Telerik.Sitefinity.Blogs.Model.Blog> setAction) cannot be inferred from usage. Try specifying the type arguments explicitly.
View all posts from The Progress Team on the Progress blog. Connect with us about all things application development and deployment, data integration and digital business.
Let our experts teach you how to use Sitefinity's best-in-class features to deliver compelling digital experiences.
Learn MoreSubscribe to get all the news, info and tutorials you need to build better business apps and sites
Progress collects the Personal Information set out in our Privacy Policy and the Supplemental Privacy notice for residents of California and other US States and uses it for the purposes stated in that policy.
You can also ask us not to share your Personal Information to third parties here: Do Not Sell or Share My Info
We see that you have already chosen to receive marketing materials from us. If you wish to change this at any time you may do so by clicking here.
Thank you for your continued interest in Progress. Based on either your previous activity on our websites or our ongoing relationship, we will keep you updated on our products, solutions, services, company news and events. If you decide that you want to be removed from our mailing lists at any time, you can change your contact preferences by clicking here.