{"id":15011592,"url":"https://github.com/weikio/pluginframework","last_synced_at":"2025-04-04T12:07:53.712Z","repository":{"id":40865686,"uuid":"216737096","full_name":"weikio/PluginFramework","owner":"weikio","description":"Everything is a Plugin in .NET","archived":false,"fork":false,"pushed_at":"2024-04-04T13:11:10.000Z","size":761,"stargazers_count":573,"open_issues_count":43,"forks_count":109,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-04-04T12:07:48.285Z","etag":null,"topics":["dotnet","netcore","nuget","plugin","plugin-architecture","roslyn"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/weikio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-22T06:17:24.000Z","updated_at":"2025-04-03T14:47:34.000Z","dependencies_parsed_at":"2024-04-04T08:28:18.233Z","dependency_job_id":"bd5f5a2f-0d79-4ba5-be10-2449ff1747d0","html_url":"https://github.com/weikio/PluginFramework","commit_stats":{"total_commits":72,"total_committers":4,"mean_commits":18.0,"dds":0.08333333333333337,"last_synced_commit":"5414bf718ef30b10f3929de88dc8103f713238ab"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weikio%2FPluginFramework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weikio%2FPluginFramework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weikio%2FPluginFramework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weikio%2FPluginFramework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weikio","download_url":"https://codeload.github.com/weikio/PluginFramework/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247174418,"owners_count":20896078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dotnet","netcore","nuget","plugin","plugin-architecture","roslyn"],"created_at":"2024-09-24T19:41:18.825Z","updated_at":"2025-04-04T12:07:53.690Z","avatar_url":"https://github.com/weikio.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg align=\"right\" alt=\"Plugin Framework Logo\" src=\"docs/logo_transparent_color_256.png\"\u003e\n\n# Plugin Framework for .NET Core [![NuGet Version](https://img.shields.io/nuget/v/Weikio.PluginFramework.svg?style=flat\u0026label=Weikio.PluginFramework)](https://www.nuget.org/packages/Weikio.PluginFramework/)\n\nWith Plugin Framework for .NET Core, everything is a plugin! Plugin Framework is a **plugin platform** for .NET Core applications, including **ASP.NET Core, Blazor, WPF, Windows Forms and Console apps**. It is light-weight and easy to integrate and supports multiple different plugin catalogs, including .NET assemblies, **Nuget packages** and **Roslyn scripts**.\n\n### Main Features \n\nHere are some of the main features of Plugin Framework: \n\n* Everything is a plugin! Deliver plugins as Nuget-packages, .NET assemblies, Roslyn scripts and more.\n* Easy integration into a new or an existing .NET Core application.\n* Automatic dependency management.\n* Handles platform specific runtime DLLs and native DLLs when using Nuget-packages.\n* MIT-licensed, commercial support available.\n\n## Quickstart: Plugin Framework \u0026 ASP.NET Core\n\nPlugin Framework is available from Nuget as a .NET Core 3.1 package. There's a separate package which makes it easier to work with plugins in an ASP.NET Core app:\n\n[![NuGet Version](https://img.shields.io/nuget/v/Weikio.PluginFramework.AspNetCore.svg?style=flat\u0026label=Weikio.PluginFramework.AspNetCore)](https://www.nuget.org/packages/Weikio.PluginFramework.AspNetCore/)\n\n```\nInstall-Package Weikio.PluginFramework.AspNetCore\n```\n\nUsing Plugin Framework can be as easy as adding a single new line into ConfigureServices:\n\n```\nservices.AddPluginFramework\u003cIOperator\u003e(@\".\\myplugins\");\n```\n\nThe code finds all the plugins (types that implement the custom IOperator-interface) from the myplugins-folder. The plugins can be used in a controller using constructor injection:\n\n```\npublic CalculatorController(IEnumerable\u003cIOperator\u003e operator)\n{\n\t_operators = operators;\n}\n```\n\nAlternatively, you can provide multiple plugin locations using catalogs:\n\n```\nvar folderPluginCatalog = new FolderPluginCatalog(@\".\\myplugins\", type =\u003e\n{\n    type.Implements\u003cIOperator\u003e();\n});\n\nvar anotherPluginCatalog = new FolderPluginCatalog(@\".\\morePlugins\", type =\u003e\n{\n    type.Implements\u003cIOperator\u003e();\n});\n\nservices.AddPluginFramework()\n    .AddPluginCatalog(folderPluginCatalog)\n    .AddPluginCatalog(anotherPluginCatalog)\n    .AddPluginType\u003cIOperator\u003e();\n```\n\n## Samples\n\nThe following Plugin Framework samples are available from GitHub:\n\n#### [Plugin Framework \u0026 .NET Console Application](https://github.com/weikio/PluginFramework/tree/master/samples/ConsoleApp)\n\n#### [Plugin Framework \u0026 ASP.NET Core](https://github.com/weikio/PluginFramework/tree/master/samples/WebApp)\n\n#### [Plugin Framework \u0026 Blazor](https://github.com/weikio/PluginFramework/tree/master/samples/BlazorApp)\n\n#### [Plugin Framework \u0026 WPF App](https://github.com/weikio/PluginFramework/tree/master/samples/WpfApp)\n\n#### [Plugin Framework \u0026 WinForms App](https://github.com/weikio/PluginFramework/tree/master/samples/WinFormsApp)\n\n#### [Nuget \u0026 Plugin Framework \u0026 ASP.NET Core](https://github.com/weikio/PluginFramework/tree/master/samples/WebAppWithNuget)\n\n#### [Roslyn \u0026 Plugin Framework \u0026 ASP.NET Core](https://github.com/weikio/PluginFramework/tree/master/samples/WebAppWithRoslyn)\n\n#### [Delegates \u0026 Plugin Framework \u0026 ASP.NET Core](https://github.com/weikio/PluginFramework/tree/master/samples/WebAppWithDelegate)\n\n#### [Tagging \u0026 WinForms App](https://github.com/weikio/PluginFramework/tree/master/samples/WinFormsApp)\n\n#### [AppSettings.json \u0026 ASP.NET Core](https://github.com/weikio/PluginFramework/tree/master/samples/WebAppWithAppSettings)\n\n## Background and introduction\n\nFor more details related to Plugin Framework's background, please see the following [introduction article from InfoQ](https://www.infoq.com/articles/Plugin-Framework-DotNet/).\n\n## Main concepts\n\nUsing Plugin Framework concentrates around two concepts: **Plugins** and **Plugin Catalogs**.\n\n### Plugin\n\nPlugins are software programs, which provide extensions to an application. Plugins are designed to work with a single application. This app is often called the **host application**. The host application is designed in such a way that it can locate and run plugins dynamically, runtime. **The application works without the plugins, the plugins can't work without the host application.**\n\nThe host application defines the specifications for the plugins. In some applications a plugin can add new functionality into the UI. In other apps, plugins are used to distribute logs into multiple different systems. The host application defines what kind of extensions it supports.\n\nPlugin-based software architecture can help in the following scenarios:\n\n* Adding new features to application after the release\n* Splitting large systems into smaller parts\n* Updating always-on software system without restarting it\n\nPlugins are dynamic, and they are often only loaded when the application needs them. Plugins are not usually compiled as part of the system but distributed as separate packages (assemblies, Nuget packages).\n\nIn the context of the Plugin Framework, **plugin is a single .NET Type**. What makes a plugin? As described previously, it depends on the host application. For some applications a plugin is a type which implements a specific interface. In some applications a plugin is a type which has a single public method called Run. Attributes are often used to indicate the plugins and that is also supported by Plugin Framework. From the Plugin Framework's point of view anything or everything can be a plugin. \n\nAs mentioned, in Plugin Framework a single plugin is a .NET Type. Even though Plugin Framework's ASP.NET Core support makes it easy to instantiate and use plugins in services and controllers through dependency injection (IServiceProvider), Plugin Framework itself doesn't provide any built-in mechanisms for creating instances (objects) from the plugins (types). In some cases Activator.CreateInstance is all that is needed and in some cases it is best to hook Plugin Framework with the app's DI-system. The requirements are host application specific.\n\nIn Plugin Framework, each Plugin is composed of the following information:\n* Type\n* Plugin name\n* Plugin version\n\n### Plugin Catalogs\n\nPlugin Framework contains a concept called \"Catalog\". A single assembly can be a catalog. A .NET type can be a catalog. Folders with dlls are often used as catalogs and Plugin Framework also supports Nuget packages, Nuget feeds and Roslyn scripts as Plugin catalogs. Multiple catalogs are often combined into a single Composite catalog.\n\nEach catalog contains 0-n plugins. \n\nPlugin Framework provides the following officially supported catalogs:\n\n* Type\n* Assembly\n* Folder\n* Delegate (Action or a Func) ([Documentation](https://github.com/weikio/PluginFramework/wiki/Delegate-Plugin-Catalog))\n* Roslyn script ([Nuget: Weikio.PluginFramework.Catalogs.Roslyn](https://www.nuget.org/packages/Weikio.PluginFramework.Catalogs.Roslyn/), [Documentation](https://github.com/weikio/PluginFramework/wiki/Roslyn-Plugin-Catalog))\n* Nuget package ([Nuget: Weikio.PluginFramework.Catalogs.Nuget](https://www.nuget.org/packages/Weikio.PluginFramework.Catalogs.Nuget/))\n* Nuget feed ([Nuget: Weikio.PluginFramework.Catalogs.Nuget](https://www.nuget.org/packages/Weikio.PluginFramework.Catalogs.Nuget/))\n\n## Source code\n\nSource code for Plugin Framework is available from [GitHub](https://github.com/weikio/PluginFramework).\n\n## Support \u0026 Build by\n\nPlugin Framework is build by [Adafy](https://adafy.com). Adafy also provides commercial support for the framework.\n\n![Adafy Logo](docs/Adafy_logo_256.png)\n\nAdafy is a Finnish software development house, focusing on Microsoft technologies.\n\n## Constributors\n\nThanks to the following contributors who have helped with the project:\n\n#### [@panoukos41](https://github.com/panoukos41)\n\n## License\n\nPlugin Framework is available as an open source, MIT-licensed project. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweikio%2Fpluginframework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweikio%2Fpluginframework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweikio%2Fpluginframework/lists"}