Deployment without administration while using form components from the admin package

I'm trying to use a form component from the admin package (ContentItemSelectorComponent) in my web project, the namespace for this package is "Kentico.Xperience.Admin.Base.Forms".

While trying to publish the web project without admin package (as mentioned in the Kentico documentation) I get the following error: "The name 'ContentItemSelectorComponent' does not exist in the current context", I think this might be due to the exclusion of the Kentico admin package as I am doing in the code below.

Is there anything I can do to fix this matter while still having the deployment without the administration site?

The exclusion of the CMS project in the web project:

<ProjectReference Include="..\Kentico.Cms\Kentico.Cms.csproj" Condition="'$(AdminAttached)' == 'true'" />

With the CMS project having the admin package:

<PackageReference Include="Kentico.Xperience.Admin" Version="30.8.2" />

Environment

Tags:
Xperience Administration .NET Deployments Environments
0

Answers

Accepted answer

Already found the solution, I didn't use the new way of defining the configuration dialog for widgets:

[ContentItemSelectorComponent(Types.Slider.CONTENT_TYPE_NAME, Label = "SliderPath", Order = 0)]

Instead I used the old way:

[EditingComponent(ContentItemSelectorComponent.IDENTIFIER, Order = 0, Label = "SliderPath")]

The new way used the following namespace that is included: Kentico.Xperience.Admin.Base.FormAnnotations

0

To response this discussion, you have to login first.