---
title: How to Install the Nodinite Log4Net Appender NuGet Package in Visual Studio
description: Install the Nodinite Log4Net Appender NuGet package in Visual Studio to enable centralized logging for your .NET Framework applications. Step-by-step guide using NuGet Package Manager and CLI.
---

<a class="nodinite-release-notes" href="https://portal.nodinite.com/marketplace/17" data-url="https://portal.nodinite.com/marketplace/17"><i class="fal fa-fw fa-file-alt" aria-hidden="true"></i> Release Notes</a>

# <i class="fal fa-rocket" aria-hidden="true"></i> Installing the Nodinite Log4Net Appender

Add centralized logging to your .NET Framework applications by installing the Nodinite Log4Net Appender NuGet package. This guide provides step-by-step instructions for installation using Visual Studio's NuGet Package Manager, the Package Manager Console, or the .NET CLI.

With this guide, you will:

* ✅ Quickly install the NuGet package in your .NET Framework project  
* ✅ Automatically manage dependencies and versioning  
* ✅ Configure the appender for seamless integration with <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span>  
* ✅ Start logging to <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> with minimal configuration  

> This guide shows you how to install the <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> [Log4Net Appender][] NuGet package and perform basic configuration.  
> For detailed implementation examples, see the [Implement in a new .NET application][Log4Net - Implementing] user guide.

## <i class="fal fa-square-plus" aria-hidden="true"></i> Before you begin  

Ensure you meet all [prerequisites][], including Visual Studio (2019 or later) and a .NET Framework 4.6.2+ project.

## <i class="fal fa-forward-step" aria-hidden="true"></i> Step 1: Install the NuGet Package  

Choose one of the following methods to install the Nodinite Log4Net Appender NuGet package in your project:

### Option A: Visual Studio NuGet Package Manager (GUI)

1. Open your .NET Framework project in Visual Studio
2. Right-click on the project in **Solution Explorer**
3. Select **Manage NuGet Packages...**
4. Click the **Browse** tab
5. Search for `Nodinite.LogAgent.Log4NetAppender`
6. Select the package and click **Install**
7. Accept any license agreements and dependency installations

### Option B: Package Manager Console

1. Open Visual Studio
2. Go to **Tools** > **NuGet Package Manager** > **Package Manager Console**
3. Run the following command:

```powershell
Install-Package Nodinite.LogAgent.Log4NetAppender
```

### Option C: .NET CLI

Open a command prompt or terminal in your project directory and run:

```bash
dotnet add package Nodinite.LogAgent.Log4NetAppender
```

### What Gets Installed

The NuGet package automatically installs the following dependencies:

* `Nodinite.LogAgent.Log4NetAppender.dll` - The main appender library
* `IBSS.Libraries.Contracts.LogRestApi.dll` - [Log API][] contracts
* Apache `log4net` (if not already installed)
* Required .NET dependencies (Newtonsoft.Json, System.Text.Json, etc.)

All dependencies are managed automatically by NuGet. The exact versions are determined by the package manifest and will be kept up to date when you update the package.

## <i class="fal fa-forward-step" aria-hidden="true"></i> Step 2: Configure the Appender  

Add or update your `log4net.config` file (or configure within `App.config` / `Web.config`) with the Nodinite appender configuration:

```xml
<log4net>
  <appender name="NodiniteLog4NetAppender" type="Nodinite.LogAgent.Log4NetAppender.NodiniteLog4NetAppender,Nodinite.LogAgent.Log4NetAppender">
    <!-- Nodinite Configuration -->
    <OriginalMessageType value="Nodinite.LogAgent.Log4NetAppender/2.0#DefaultMessageType" />
    <MessageTypeExtractFromBody value="false" />
    <LogAgentID value="101"/>
    <EventNumber value="0"/>
    <EndPointName value="My .NET Application"/>
    <EndPointUri value="myapp.company.local"/>
    <ProcessingUser value="SYSTEM"/>
    <ModuleType value=".NET Application"/>
    <ProcessName value="MyApp"/>
    <ProcessingMachineName value="APP-SERVER-01"/>
    <ProcessingModuleType value=".NET Framework"/>
    <ProcessingModuleName value="MyApplication"/>
    <LogApiServiceURI value="https://nodinite.company.local:40002/LogAPI/"/>
    <ApplicationInterchangeId value="{99106FF5-C7BB-4244-9EB7-F99040190F32}"/>
    <LocalInterchangeId value="{E4CDDF18-9925-4A79-8E9F-71BC0D4C5172}"/>
    <ServiceInstanceActivityId value="{E4CDDF18-9925-4A79-8E9F-71BC0D4C5173}"/>
  </appender>
  
  <root>
    <level value="INFO"/>
    <appender-ref ref="NodiniteLog4NetAppender"/>
  </root>
</log4net>
```

<aside aria-label="Important" class="nodinite-note nodinite-note--important">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-message-exclamation"></i> Important</p>
<div class="nodinite-note__content"><p>Update the <code>LogApiServiceURI</code> value to point to your <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> <a href="https://docs.nodinite.com/core-services/log-api/overview/">Log API</a> endpoint. Use HTTPS for production environments. The host and port come from your environment's settings in the <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> Portal (<a href="https://docs.nodinite.com/install-and-update/getting-started/version-7/install-nodinite-v7-steps/04-servers/#core-platform-services">Servers step</a>).</p></div>
</aside>

<aside aria-label="Tip" class="nodinite-note nodinite-note--tip">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-lightbulb"></i> Tip</p>
<div class="nodinite-note__content"><p>The configuration creates rich <a href="https://docs.nodinite.com/core-services/log-event/features/json-log-event/">JSON Log Events</a> that are sent to <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span>. Customize values like <code>EndPointName</code>, <code>ProcessingMachineName</code>, and <code>ModuleType</code> to match your application and environment.</p></div>
</aside>

### Key Configuration Parameters

|Parameter|Description|Example|  
|---|---|---|  
|<i class="fal fa-link" aria-hidden="true"></i> `LogApiServiceURI`|URL of the Nodinite Log API endpoint|`https://nodinite.company.local:40002/LogAPI/`|  
|<i class="fal fa-tag" aria-hidden="true"></i> `EndPointName`|Friendly name for your application|`Customer Portal API`|  
|<i class="fal fa-link" aria-hidden="true"></i> `EndPointUri`|Unique identifier for the application instance|`customerportal.prod.company.local`|  
|<i class="fal fa-fingerprint" aria-hidden="true"></i> `LogAgentID`|Unique ID for this log agent (obtain from Nodinite)|`101`|  
|<i class="fal fa-filter" aria-hidden="true"></i> `level`|Minimum log level to capture|`INFO`, `WARN`, `ERROR`, `DEBUG`|  

For detailed configuration options, see the [Configuration][] page.

## <i class="fal fa-forward-step" aria-hidden="true"></i> Step 3: Initialize Log4Net in Your Application

Ensure Log4Net is configured to read your configuration file. Add this code to your application startup (e.g., `Program.cs`, `Global.asax.cs`, or `Startup.cs`):

### For Console Applications

```csharp
using log4net;
using log4net.Config;

// In Main method
XmlConfigurator.Configure(new FileInfo("log4net.config"));
```

### For ASP.NET Applications

```csharp
// In Global.asax.cs Application_Start
XmlConfigurator.Configure(new FileInfo(Server.MapPath("~/log4net.config")));
```

### For ASP.NET Core / .NET Framework Hybrid

```csharp
// In Startup.cs or Program.cs
XmlConfigurator.Configure(new FileInfo("log4net.config"));
```

## <i class="fal fa-forward-step" aria-hidden="true"></i> Step 4: Verify Installation

Test that the appender is working correctly:

```csharp
using log4net;

private static readonly ILog log = LogManager.GetLogger(typeof(Program));

public void TestLogging()
{
    log.Info("Test message from Nodinite Log4Net Appender");
    log.Warn("This is a warning");
    log.Error("This is an error", new Exception("Test exception"));
}
```

Check the <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> [Log Views][] in the [Web Client][] to verify that log events are being received.

---

## Release Notes

<aside aria-label="Note" class="nodinite-note nodinite-note--note">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-note"></i> Note</p>
<div class="nodinite-note__content"><p>The Log4Net Appender is distributed as a NuGet package. Release notes and version history are maintained in the <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> Portal, not as a downloadable installation package.</p></div>
</aside>

View the latest release information, version history, and changelogs:

<i class="fal fa-file-alt" aria-hidden="true"></i> [View Release Notes in Nodinite Portal](https://portal.nodinite.com/marketplace/17)<sup><i class="fal fa-arrow-up-right-from-square" aria-hidden="true"></i></sup><sup><i class="fal fa-arrow-up-right-from-square" aria-hidden="true"></i></sup>

The Portal provides:

* Current and historical version information
* Feature additions and bug fixes
* Breaking changes and migration guides
* Compatibility notes

To check your installed version, view the package version in Visual Studio's NuGet Package Manager or check your project's `.csproj` file.

---

## <i class="fal fa-user-md" aria-hidden="true"></i> Support  

If you encounter issues during installation, contact [Support][].

<aside aria-label="Note" class="nodinite-note nodinite-note--note">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-note"></i> Note</p>
<div class="nodinite-note__content"><p>Additional troubleshooting information may be available in the Windows Event Logs or in your application's log output.</p></div>
</aside>

## <i class="fal fa-question" aria-hidden="true"></i> Frequently asked questions  

Find more solutions and answers in the [Troubleshooting][] user guide for the <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> [Log4Net Appender][Log4Net Appender].

---

## <i class="fal fa-hand-point-right" aria-hidden="true"></i> Next Steps

* <i class="fal fa-edit" aria-hidden="true"></i> [Configuration][] - Learn about advanced configuration options  
* <i class="fal fa-flask" aria-hidden="true"></i> [Implement in a new .NET application][Log4Net - Implementing] - Step-by-step implementation guide  

## <i class="fal fa-link-horizontal" aria-hidden="true"></i> Related Topics

* <i class="fal fa-clipboard-check" aria-hidden="true"></i> [Prerequisites][]  
* <i class="fal fa-arrow-turn-up" aria-hidden="true"></i> [Update][]  
* <i class="fal fa-trash-can" aria-hidden="true"></i> [Uninstall][]  
* <i class="fal fa-cloud-arrow-down" aria-hidden="true"></i> [Log API][]  
* <i class="fal fa-search" aria-hidden="true"></i> [Log Views][]  

[Configuration]:https://docs.nodinite.com/logging-and-monitoring/log4net-appender/getting-started/configuration/
[JSON Log Event]:https://docs.nodinite.com/core-services/log-event/features/json-log-event/
[Log API]:https://docs.nodinite.com/core-services/log-api/overview/
[Log Views]:https://docs.nodinite.com/administration/log-management/log-views/features/what-is-a-log-view/
[Log4Net - Implementing]:https://docs.nodinite.com/logging-and-monitoring/log4net-appender/troubleshooting/implement-in-a-new-net-application/
[Log4Net Appender]:https://docs.nodinite.com/logging-and-monitoring/log4net-appender/overview/
[Prerequisites]:https://docs.nodinite.com/logging-and-monitoring/log4net-appender/getting-started/prerequisites/
[Servers step]:https://docs.nodinite.com/install-and-update/getting-started/version-7/install-nodinite-v7-steps/04-servers/#core-platform-services
[Support]:https://support.nodinite.com
[Troubleshooting]:https://docs.nodinite.com/logging-and-monitoring/log4net-appender/troubleshooting/overview/
[Uninstall]:https://docs.nodinite.com/logging-and-monitoring/log4net-appender/troubleshooting/uninstalling/
[Update]:https://docs.nodinite.com/logging-and-monitoring/log4net-appender/updating/
[Web Client]:https://docs.nodinite.com/getting-started/overview/