3

Following the instructions here: Adding a new tab to a Ribbon toolbar

I created an ASCX user control inheriting from Tridion.Web.UI.Controls.TridionUserControl and configured it to be loaded in the GUI. When I start the GUI, however, I get the following:

System.Web.HttpParseException (0x80004005): Could not load type 'HelloGUI.RibbonToolbarUserControl'. ---> System.Web.HttpParseException (0x80004005): Could not load type 'HelloGUI.RibbonToolbarUserControl'. ---> System.Web.HttpException (0x80004005): Could not load type 'HelloGUI.RibbonToolbarUserControl'. at System.Web.UI.TemplateParser.GetType(String typeName, Boolean ignoreCase, Boolean throwOnError) at System.Web.UI.TemplateParser.ProcessInheritsAttribute(String baseTypeName, String codeFileBaseTypeName, String src, Assembly assembly) at System.Web.UI.TemplateParser.PostProcessMainDirectiveAttributes(IDictionary parseData) at System.Web.UI.TemplateParser.ProcessException(Exception ex) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath) at System.Web.UI.TemplateParser.Parse() at System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType() at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider) at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate) at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at Tridion.Web.UI.Controls.ExternalUserControlProcessor.CreateExternalChildControls() at Tridion.Web.UI.Controls.RibbonPage.CreateExternalChildControls() at System.Web.UI.Control.EnsureChildControls() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

At first sight this appears to be a problem loading the type, but I have established that assembly probing is working correctly, so there really seems to be a problem with loading the type. Or of course, a dependency - I have references to Tridion.Web.UI.Core and Tridion.Web.UI.Editors.CME in my project, and it appears to compile without problems or warnings. Thorough manual cleanup between builds doesn't help.

My first question is whether this technique works for anyone else. If so, any clues about what I'm doing wrong would be welcome.

2
  • 1
    Did you put your compiled dll into the tridion installation /webui/bin directory?
    – johnwinter
    Commented Jul 6, 2014 at 12:03
  • Just tried it in /webui/webroot/bin - I'm not seeing the error message any more. So if you put that as an answer I'll accept. Commented Jul 6, 2014 at 18:20

1 Answer 1

6

You need to drop your compiled DLL into /webui/webroot/bin this should fix your issue.

When I have a VS project that needs to drop the dll in there, I always set up the post build to drop the file automatically into this directory. I learnt this from the power tools project:

https://code.google.com/p/tridion-2011-power-tools/source/browse/trunk/PowerTools.Model/PowerTools.Model.csproj

... See the snippet here :

<PostBuildEvent>IF DEFINED TRIDION_CM_HOME (
xcopy "$(TargetDir)$(TargetName).*" "%25TRIDION_CM_HOME%25\Web\WebUI\WebRoot\bin" /yi
)</PostBuildEvent>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.