---
title: How to Uninstall the Nodinite Log4Net Appender NuGet Package
description: Uninstall the Nodinite Log4Net Appender NuGet package from your Visual Studio project. Step-by-step guide for safe removal using Visual Studio or the .NET CLI.
---

:ReleaseNotes(https://portal.nodinite.com/marketplace/17):

# :fa-trash-can: Uninstalling the Nodinite Log4Net Appender

This guide walks you through the safe and complete removal of the :Nodinite: [Log4Net Appender][] NuGet package from your .NET Framework project. Whether you are migrating to a different logging solution, upgrading to [Serilog][], or troubleshooting, follow these steps to ensure a clean uninstallation.

With this guide, you will:

* ✅ Remove the NuGet package and all dependencies safely  
* ✅ Clean up configuration files properly  
* ✅ Prevent orphaned resources in [Monitor Views][]  
* ✅ Minimize downtime and ensure rollback options  

>[!TIP]
>**Migrating to .NET Core or .NET 5+?** Consider using the :Nodinite: [Serilog][] sinks instead of Log4Net for modern .NET applications.

## :fa-exclamation-triangle: Before You Begin

>[!IMPORTANT]
>Before uninstalling the [Log4Net Appender][], remove or update any related [Resources][] in [Monitor Views][]. This prevents orphaned monitoring configurations and ensures clean removal.

>[!TIP]
>**Back up your configuration files** before making changes. This allows you to quickly rollback if needed.

---

## Uninstall Guide

Follow these steps to uninstall the :Nodinite: [Log4Net Appender][]:

### :fa-forward-step: Step 1: Remove Monitor View Resources (If Applicable)

If you have created [Monitor Views][] that reference the Log4Net Appender, specifically for [Non-Events][] monitoring:

1. Log in to the :Nodinite: [Web Client][]
2. Navigate to **Administration** > **Monitor Management** > **Monitor Views**
3. Locate any Monitor Views using the Log4Net Appender for [Non-Events][] monitoring
4. Remove or update the [Resources][] that reference this appender
5. Save your changes

This step prevents errors and orphaned references after the appender is removed.

>[!NOTE]
>For [Non-Events][] monitoring configuration details, see the [Non-Events][] documentation.

### :fa-forward-step: Step 2: Remove NuGet Package

Choose one of the following methods to uninstall the NuGet package:

#### 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 **Installed** tab
5. Search for `Nodinite.LogAgent.Log4NetAppender`
6. Select the package and click **Uninstall**
7. Confirm the uninstallation when prompted

#### 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
Uninstall-Package Nodinite.LogAgent.Log4NetAppender
```

#### Option C: .NET CLI

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

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

### :fa-forward-step: Step 3: Remove Configuration

Remove the Nodinite appender configuration from your `log4net.config`, `app.config`, or `web.config` file:

1. Open your configuration file in Visual Studio or a text editor
2. Locate the `<appender>` element with `type="Nodinite.LogAgent.Log4NetAppender.NodiniteLog4NetAppender,Nodinite.LogAgent.Log4NetAppender"`
3. Remove the entire `<appender>` element
4. Remove the `<appender-ref>` reference from the `<root>` or `<logger>` element

#### Example: Before

```xml
<log4net>
  <appender name="NodiniteLog4NetAppender" type="Nodinite.LogAgent.Log4NetAppender.NodiniteLog4NetAppender,Nodinite.LogAgent.Log4NetAppender">
    <!-- Configuration parameters -->
  </appender>
  <root>
    <level value="INFO"/>
    <appender-ref ref="NodiniteLog4NetAppender"/>
  </root>
</log4net>
```

#### Example: After

```xml
<log4net>
  <root>
    <level value="INFO"/>
  </root>
</log4net>
```

>[!IMPORTANT]
>Be careful not to damage the XML structure of your configuration file. Ensure proper closing tags and XML syntax.

### :fa-forward-step: Step 4: Remove Unused Dependencies (Optional)

The NuGet package manager typically removes unused dependencies automatically. However, if other packages in your project use the same dependencies, they will remain installed.

To check for unused packages:

1. Right-click on the project in **Solution Explorer**
2. Select **Manage NuGet Packages...**
3. Review the **Installed** tab for packages like:
   * `IBSS.Libraries.Contracts.LogRestApi`
   * Any other dependencies that are no longer needed

### :fa-forward-step: Step 5: Rebuild and Test

1. **Rebuild your solution** in Visual Studio (`Build` > `Rebuild Solution`)
2. **Test your application** to ensure it runs correctly without the Log4Net Appender
3. **Verify** that no errors appear related to missing Nodinite references

---

## :fa-clock-rotate-left: Rollback

If you need to rollback after uninstalling, simply reinstall the NuGet package:

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

Then restore your configuration from the backup you created in Step 1.

---

## :fa-lightbulb: What Happens to Existing Data?

### Log Data

>[!NOTE]
>Uninstalling the Log4Net Appender does **not** delete any log data already stored in :Nodinite:. Historical log events remain in the [Log Databases][] and can still be viewed in [Log Views][].

After uninstalling:

* **No new log events** will be sent to :Nodinite: from your application
* **Existing log data** persists in [Log Views][] until removed by retention policies or manual deletion by administrators
* **Retention policies** will eventually remove old log data according to configured schedules

### MessageTypes

>[!IMPORTANT]
>**MessageTypes persist forever** in the :Nodinite: [Configuration Database][] and are not automatically removed when uninstalling the appender. Administrators must manually delete unused MessageTypes if needed.

---

## :fa-user-md: Support

If you need help to uninstall, contact [Support][].

---

## :fa-hand-point-right: Next Steps

* :fa-display: [Manage Monitor Views][Add or manage Monitor View]  
* :fa-monitor-waveform: [Manage Monitoring Agent Configurations][Add or manage a Monitoring Agent Configuration]  
* :fa-cloud: [Explore Serilog for .NET Core/.NET 5+][Serilog]  

## :fa-link-horizontal: Related Topics

* :fa-cloud: [Log4Net Appender Overview][Log4Net Appender]  
* :fa-rocket: [Install][]  
* :fa-arrow-turn-up: [Update][]  
* :fa-lightbulb-on: [Resources][]  
* :fa-monitor-waveform: [Monitoring Agents][]  
* :fa-display: [Monitor Views][]  
* :fa-ban: [Non-Events][]  

[Add or manage a Monitoring Agent Configuration]:{ndr}/Administration/2.%20Monitor%20Management/2.%20Monitor%20Agents/Features/Add%20or%20manage%20Monitor%20Agent.md
[Add or manage Monitor View]:{ndr}/Administration/2.%20Monitor%20Management/1.%20Monitor%20Views/Features/Add%20or%20manage%20Monitor%20View.md
[Configuration Database]:{ndr}/Core%20Services/Configuration%20Database/Overview.md
[Install]:{ndr}/Logging%20and%20Monitoring/Log4Net%20Appender/Getting%20started/2.%20Install.md
[Log Databases]:{ndr}/Core%20Services/Log%20Databases/Overview.md
[Log Views]:{ndr}/Administration/1.%20Log%20Management/1.%20Log%20Views/Features/What%20is%20a%20Log%20View.md
[Log4Net Appender]:{ndr}/Logging%20and%20Monitoring/Log4Net%20Appender/Overview.md
[Monitor Views]:{ndr}/Administration/2.%20Monitor%20Management/1.%20Monitor%20Views/Features/What%20is%20a%20Monitor%20View.md
[Monitoring Agents]:{ndr}/Administration/2.%20Monitor%20Management/2.%20Monitor%20Agents/Features/What%20is%20a%20Monitor%20Agent.md
[Non-Events]:{ndr}/Logging%20and%20Monitoring/Non-Events/Overview.md
[Resources]:{ndr}/Administration/2.%20Monitor%20Management/3.%20Resources/Features/What%20is%20a%20Resource.md
[Serilog]:{ndr}/Logging%20and%20Monitoring/Serilog/Overview.md
[Support]:https://support.nodinite.com
[Update]:{ndr}/Logging%20and%20Monitoring/Log4Net%20Appender/Updating.md
[Web Client]:{ndr}/Getting%20Started/Overview.md