27 Oct 2014
02 Jun 2015
Link to this post
I would like to know how to include and reference external dll's. I would like to add our data layer as a DLL to a Sitefinity project and reference it in controllers for custom MVC widgets.
I have done the following:
1. Copied Entities.dll from another project and pasted it into the Sitefinity BIN folder.
2. Right Clicked the References folder and selected "Add Reference"
3. Browsed to the Entities.dll in the Sitefinity bin folder then added it.
4. Adding using Entities; to the controller
This gives me the following error on build:
"The type or namespace name 'Entities' could not be found (are you missing a using directive or assembly reference?)"
Without the using directive, the project builds fine.
There is no yellow icon on the Entities reference and "UpdateReferences.0.log" file in shows that I found 1 new reference.
I have also tried:
1. Importing the Entities project into the Sitefinitiy solution and adding a reference.
2. Adding the reference by selecting the Entities.dll from the source project bin folder and verified that it "automatically" copied it to the sitefinity bin folder
The error is the same regardless.
Thank you for your guidance,