I am creating a new Visual Studio class project that sites alongside my Umbraco CMS web project (Umbraco v7). I have added a new Global class (similar to this method, but in my own class project: https://gist.github.com/jkarsrud/5143239):
public class Global: Umbraco.Web.UmbracoApplication
However, it is unable to find Umbraco.Web.UmbracoApplication. I have checked the object explorer in the web project (e.g. umbraco, businesslogic, Umbraco.Core, etc.) however, none of these seem to contain Umbraco.Web.UmbracoApplication. What reference am I missing? I am assuming it would be an overkill to include the whole CMS nuget package for just a class library project.
Removed my class library project, and added an empty MVC4 application
and removed all but the Controllers folder (so I could easily add
Controllers to it).
Added the Umbraco Core nuget package
Renamed my namespace from MyCompany.Umbraco.Logic to
MyCompany.UmbracoWebsite.Logic as it thought I was trying to
reference MyCompany.Umbraco.Web.UmbracoApplication.
DLL Reference for Umbraco.Web.UmbracoApplication?
Hi all,
I am creating a new Visual Studio class project that sites alongside my Umbraco CMS web project (Umbraco v7). I have added a new Global class (similar to this method, but in my own class project: https://gist.github.com/jkarsrud/5143239):
public class Global: Umbraco.Web.UmbracoApplication
However, it is unable to find Umbraco.Web.UmbracoApplication. I have checked the object explorer in the web project (e.g. umbraco, businesslogic, Umbraco.Core, etc.) however, none of these seem to contain Umbraco.Web.UmbracoApplication. What reference am I missing? I am assuming it would be an overkill to include the whole CMS nuget package for just a class library project.
Many thanks.
Ben
UmbracoApplication is in the umbraco.dll (Namespace Umbraco.Web) which inherits Umbraco.Core.dll (Namespace Umbraco.Core)
using Umbraco.Web should be what you need.
As for the references, If I recall correctly there are some assemblies like businesslogic and cms that are used by the compiler so they are needed.
Thank you Jerode. I actually did the following:
Controllers to it).
reference MyCompany.Umbraco.Web.UmbracoApplication.
Many thanks.
Ben
Nice job. Good luck.
is working on a reply...