Ege.AspNetCore.Mvc.PluginsManager
1.0.2
dotnet add package Ege.AspNetCore.Mvc.PluginsManager --version 1.0.2
NuGet\Install-Package Ege.AspNetCore.Mvc.PluginsManager -Version 1.0.2
<PackageReference Include="Ege.AspNetCore.Mvc.PluginsManager" Version="1.0.2" />
paket add Ege.AspNetCore.Mvc.PluginsManager --version 1.0.2
#r "nuget: Ege.AspNetCore.Mvc.PluginsManager, 1.0.2"
// Install Ege.AspNetCore.Mvc.PluginsManager as a Cake Addin #addin nuget:?package=Ege.AspNetCore.Mvc.PluginsManager&version=1.0.2 // Install Ege.AspNetCore.Mvc.PluginsManager as a Cake Tool #tool nuget:?package=Ege.AspNetCore.Mvc.PluginsManager&version=1.0.2
Asp.Net Core Mvc Plugins Manager
That is an open-source plugin(modular) and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that application framework. Include a main project without referencing it using mvc structure in .dll projects as a plugin
Installation
.Net Core Mvc Plugins Manager is available on NuGet
dotnet add package Ege.AspNetCore.Mvc.PluginsManager
or
PM>Install-Package Ege.AspNetCore.Mvc.PluginsManager
Usage
Create Project as Sdk="Microsoft.NET.Sdk.Razor"
or Sdk="Microsoft.NET.Sdk.Web"
Choose build output path
Sample Plugin.Tax
plugin project in Plugin.Tax.csproj
:
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
</PropertyGroup>
...
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<OutputPath>..\..\Applications\Application.WebMvc\Plugins\Plugin.Tax</OutputPath>
<OutDir>$(OutputPath)</OutDir>
</PropertyGroup>
</Project>
Add plugin info as json file PluginInfo.json
:
{
"Name": "Plugin.Widget",
"File": "Plugin.Widget.dll",
"Description": "Plugin Widget"
}
set File key as assembly name
Add Setup.cs
like Asp.net core project for plugin:
using Ege.AspNetCore.Mvc.PluginsManager;
...
internal class PluginSetup :IPluginSetup
{
//for sorting between plugins middleware
public int Order => 10;
//your plugin ConfigureServices method
public void ConfigureServices(IServiceCollection services)
{
//TODO:
}
//your plugin Configure method
public void Configure(IApplicationBuilder app, IHostEnvironment env)
{
//TODO:
}
}
...
Add .Net Core MVC Main Project and some general Configurations for plugins
on Application.WebMvc.csproj
include plugins dll in main project
<Project Sdk="Microsoft.NET.Sdk.Web">
...
<ItemGroup>
<Folder Include="Plugins\" />
<Content Remove="Plugins\**\Properties\*.json" />
<Content Include="Plugins\**\*.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
...
<Target Name="CreatePluginFolder" AfterTargets="AfterPublish">
<MakeDir Directories="$(PublishDir)Plugins" Condition="!Exists('$(PublishDir)Plugins')" />
</Target>
...
</Project>
And configure Startup.cs
to load plugins
using Ege.AspNetCore.Mvc.PluginsManager;
...
...
public void ConfigureServices(IServiceCollection services)
{
services.AddControllersWithViews();
...
//your plugin root directory
var pluginRootPath = Path.Combine(AppContext.BaseDirectory, "Plugins");
//load plugins
services.AddPlugins(pluginRootPath);
...
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
...
app.UsePluginsConfigure(env);
...
}
...
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp3.0 is compatible. netcoreapp3.1 was computed. |
-
.NETCoreApp 3.0
- Microsoft.AspNetCore.Mvc.Razor (>= 2.2.0)
- Microsoft.Extensions.DependencyInjection (>= 3.1.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 3.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Plungin project should be Sdk="Microsoft.NET.Sdk.Razor" or Sdk="Microsoft.NET.Sdk.Web"