-
The idea is to create content types, content parts & seed data on startup programmatically to ensure the deterministic environment during development. I've tried using
var builder = WebApplication.CreateBuilder(args);
builder
.Services.AddOrchardCms()
.AddSetupFeatures("OrchardCore.AutoSetup");
var app = builder.Build();
if (app.Environment.IsDevelopment())
{
// Enable content feature/module that handle content types & content parts migrations
builder.AddSetupFeatures("MyApp.Content");
} else {
app.UseExceptionHandler("/Error");
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseOrchardCore();
await app.RunAsync(); |
Beta Was this translation helpful? Give feedback.
Answered by
lamualfa
Mar 26, 2025
Replies: 1 comment
-
Solved. You need to set the right configurations (
using OrchardCore.Modules.Manifest;
[assembly: Module(
Name = "Content",
Author = "My Self",
Website = "https://mysite.com",
Version = "0.0.1"
)]
[assembly: Feature(
Id = "MyApp.Content",
Name = "Content",
Description = "Module to handle content definitions for mysite.com.",
Dependencies = ["OrchardCore.Widgets", "OrchardCore.Flows"],
Category = "Content"
)] |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
lamualfa
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Solved. You need to set the right configurations (
assembly: Module
&assembly: Feature
) in module's manifest file.Manifest.cs