Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Mateusz Kotwica 29 posts 129 karma points
    Apr 24, 2024 @ 15:48
    Mateusz Kotwica

    Custom dashboard from external project


    I'm trying to create a custom dashboard where all the assets and code will sit in the dedicated project (class library).

    I've created all the views, scripts and styles as well as manifest file and everything works well when I keep above files in the App_Plugins directory within main CMS project.

    When I move the assets for my dashboard to the App_Plugins in my external project, my custom view disappears with no error. What is funny, the assets are correctly copied to the bin directory.

    I've tried with implementing manifest via C# code but even when I'm able to at least see the dashboard tab, I'm receiving an error that the view is missing: enter image description here What am I doing wrong?

  • Bo Jacobsen 601 posts 2399 karma points
    Apr 25, 2024 @ 09:23
    Bo Jacobsen

    Hi Mateusz.

    You cannot use a class library for the containment of the /App_Plugins/ files.

    You need to create a Razor Class Library which is intended for this purpose.

    Markus wrote something about it here:

  • Mateusz Kotwica 29 posts 129 karma points
    Apr 25, 2024 @ 09:29
    Mateusz Kotwica

    Hi Bo,

    thank you for the clue! I'll try it out!

  • Bo Jacobsen 601 posts 2399 karma points
    Apr 25, 2024 @ 09:32
    Bo Jacobsen


    Kevin Jump also wrote a very good guide in steps here:

    Hope it gets you on the right track.

  • Luuk Peters 84 posts 326 karma points
    Apr 25, 2024 @ 10:52
    Luuk Peters

    I think the missing step is that the AppPlugins folder needs to be copied to the AppPlugins folder of your CMS project. It needs those files to be in the CMS project.

    If you start a new Umbraco package project using the Umbraco template for a package, you'll see that you need a targets file that takes care of this. This file makes sure that AppPlugins folder of your package is copied to the AppPlugins folder of you CMS when you build the CMS project that uses the package.

    So you should have a folder in your package project called buildTransitive which should have a file called -projectname-.targets.

    <Project xmlns="">
      <Target Name="CopyUmbracoPackage1Assets" BeforeTargets="BeforeBuild">
          <UmbracoPackage1ContentFiles Include="$(UmbracoPackage1ContentFilesPath)" />
        <Message Text="Copying UmbracoPackage1 files: $(UmbracoPackage1ContentFilesPath) - #@(UmbracoPackage1ContentFiles->Count()) files" Importance="high" />
        <Copy SourceFiles="@(UmbracoPackage1ContentFiles)" DestinationFiles="@(UmbracoPackage1ContentFiles->'$(MSBuildProjectDirectory)\App_Plugins\UmbracoPackage1\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
      <Target Name="ClearUmbracoPackage1Assets" BeforeTargets="Clean">
          <UmbracoPackage1Dir Include="$(MSBuildProjectDirectory)\App_Plugins\UmbracoPackage1\" />
        <Message Text="Clear old UmbracoPackage1 data" Importance="high" />
        <RemoveDir Directories="@(UmbracoPackage1Dir)" />

    This file is responsible for copying the AppPlugins folder of your package to the AppPlugins folder of your CMS on build.

Please Sign in or register to post replies

Write your reply to: