Quantcast
Channel: C1 CMS Foundation - Open Source on .NET
Viewing all articles
Browse latest Browse all 2540

New Post: Installing Static Data Types with Dependencies via Package

$
0
0
In your assembly that contains the static types, make sure you've created the data types (on the startup). Something like that:
using Composite.Core.Application;
using Composite.Data.DynamicTypes;

namespace Test
{
    [ApplicationStartup]
    class Startup
    {
        public static void OnBeforeInitialize()
        {
        }

        public static void OnInitialized()
        {
            DynamicTypeManager.EnsureCreateStore(typeof(Test.IClient));
            DynamicTypeManager.EnsureCreateStore(typeof(Test.IClientHour));
        }
    }
}
This may help IClientHour find IClient :)

Also, in my case, it was enough to just add the assembly to the package as a file in /Bin. Please see/try the package I built to mimic your setup:

Composite.Test.ClientHours.zip

Viewing all articles
Browse latest Browse all 2540

Trending Articles