Plugfy.Core.Extension.Library.Runner.DotNet 1.0.17

dotnet tool install --global Plugfy.Core.Extension.Library.Runner.DotNet --version 1.0.17
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local Plugfy.Core.Extension.Library.Runner.DotNet --version 1.0.17
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Plugfy.Core.Extension.Library.Runner.DotNet&version=1.0.17
                    
nuke :add-package Plugfy.Core.Extension.Library.Runner.DotNet --version 1.0.17
                    

logo_plugfy_core_foundation_256x55

Plugfy Core Extension Library Runner for .NET

Overview

The Plugfy Core Extension Library Runner for .NET is a command-line tool designed to dynamically load and execute .NET assemblies. It facilitates inter-process communication and allows users to list available assemblies, obtain detailed metadata, and execute methods within assemblies.

This tool is part of the Plugfy Core ecosystem, providing a standardized approach to managing dynamic module execution in .NET applications.


Features

  • List Available Assemblies: Retrieve a list of all dynamically loadable assemblies.
  • Get Assembly Metadata: Extract class, method, event, and field details from assemblies.
  • Execute Methods Dynamically: Invoke methods within loaded assemblies, supporting constructor parameters and runtime event subscription.
  • Interactive Mode: Run the tool interactively for real-time command execution.
  • Multiple Communication Modes: Supports different inter-process communication mechanisms (e.g., STDInOut, NamedPipes).
  • Extensible Logging and Caller Communication: Configurable logging and communication extensions via JSON parameters.

Installation

Prerequisites

  • .NET SDK 6.0 or later
  • Windows, Linux, or macOS

Building the Project

Clone the repository and navigate to the project folder:

 git clone https://github.com/plugfy/plugfy-core-extension-library-runner-dotnet.git
 cd plugfy-core-extension-library-runner-dotnet

Build the project using .NET CLI:

 dotnet build -c Release

Run the executable from the output directory:

 dotnet run -- list

Usage

Command Structure

The tool uses a command-based interface where commands are specified as verbs:

 Plugfy.Core.Extension.Library.Runner.DotNet <command> [options]

Available Commands

1. Listing Available Assemblies
 Plugfy.Core.Extension.Library.Runner.DotNet list

Options:

  • -t, --communicationType (optional): Communication method (e.g., STDInOut, NamedPipes)
  • -i, --interactive (optional): Enables interactive mode
  • -c, --caller (optional): Caller extensions configuration in JSON format
  • -l, --log (optional): Log extensions configuration in JSON format
2. Getting Assembly Information
 Plugfy.Core.Extension.Library.Runner.DotNet info '{"AssemblyName": "MyLibrary.dll"}'

Options:

  • -t, --communicationType (optional): Communication method
  • -i, --interactive (optional): Enables interactive mode
  • -c, --caller (optional): Caller extensions configuration in JSON format
  • -l, --log (optional): Log extensions configuration in JSON format
3. Running a Method in an Assembly
 Plugfy.Core.Extension.Library.Runner.DotNet run '{"AssemblyName": "MyLibrary.dll", "Class": "MyNamespace.MyClass", "Method": "MyMethod", "Parameters": ["arg1", 42]}'

Options:

  • -t, --communicationType (optional): Communication method
  • -i, --interactive (optional): Enables interactive mode
  • -c, --caller (optional): Caller extensions configuration in JSON format
  • -l, --log (optional): Log extensions configuration in JSON format

Configuration

The application relies on appsettings.json for configuration. Below is an example:

{
  "Extensions": {
    "Communications": {
      "STDInOut": {
        "LibrariesPath": "./Extensions/STDInOut"
      },
      "NamedPipes": {
        "LibrariesPath": "./Extensions/NamedPipes"
      }
    }
  },
  "LibrariesPath": "./Assemblies"
}

Customizing Communication Extensions

  • Define additional communication types in appsettings.json.
  • Ensure the corresponding .dll exists in the specified LibrariesPath.

Example Workflows

Example 1: Listing Assemblies

Plugfy.Core.Extension.Library.Runner.DotNet list -t NamedPipes

Example 2: Retrieving Assembly Information

Plugfy.Core.Extension.Library.Runner.DotNet info '{"AssemblyName": "MyLibrary.dll"}'

Example 3: Executing a Method in an Assembly

Plugfy.Core.Extension.Library.Runner.DotNet run '{"AssemblyName": "MyLibrary.dll", "Class": "MyNamespace.MyClass", "Method": "SayHello", "Parameters": ["World"]}'

License

This project is licensed under the GNU General Public License v3.0. See GNU GPL v3.0 for details.


Contributing

We welcome contributions! To contribute:

  1. Fork the repository.
  2. Create a new feature branch (git checkout -b feature-new).
  3. Commit changes (git commit -m "Added new feature").
  4. Push to the branch (git push origin feature-new).
  5. Submit a Pull Request.

For major changes, open an issue first to discuss the proposed changes.


Contact

For inquiries, feature requests, or issues, please open a GitHub issue or contact the Plugfy Foundation.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
1.0.17 116 2/19/2025
1.0.16 114 2/18/2025
1.0.15 110 2/18/2025
1.0.11 115 2/17/2025
1.0.10 107 2/16/2025
1.0.9 102 2/16/2025
1.0.8 97 2/16/2025
1.0.7 103 2/16/2025
1.0.6 108 2/16/2025
1.0.5 121 2/15/2025
1.0.4 118 2/9/2025