问题
While customizing the Dashboard, I tried to add a new Ribbon like media and settings. I have followed the documentation...
[Application("siteExporter", "Site Exporter", "tray-icon.png", 10)]
public class SiteExporterApplication : IApplication
{
public SiteExporterApplication () {}
}
... but I have received the following compilation error:
CS0246: The type or namespace 'IApplication' could not be found (are you missing a using directive or an assembly reference?)
What is wrong with the code that is causing this error?
回答1:
Make sure you are properly importing the umbraco.interfaces
namespace in your file. Not doing so may cause the error you're seeing.
来源:https://stackoverflow.com/questions/48070897/cs0246-the-type-or-namespace-iapplication-could-not-be-found