Removed warnings, and added .NET 4 support#89
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds .NET Framework 4.x support and removes obsolete NLog configuration warnings by replacing the deprecated RequiredParameter attribute with manual validation logic in the InitializeTarget method.
- Adds support for .NET Framework 4.6.2, 4.7.2, and 4.8 target frameworks
- Replaces obsolete
[RequiredParameter]attributes with explicit validation code - Updates solution file to Visual Studio Version 18
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Nlog.RabbitMQ.Target/RabbitMqTarget.cs | Adds manual validation for Fields configuration to replace deprecated RequiredParameter attributes, checking for null entries, empty keys, missing layouts, and duplicate keys |
| src/Nlog.RabbitMQ.Target/Nlog.RabbitMQ.Target.csproj | Adds net462, net472, and net48 target frameworks and extends LangVersion condition to include these new frameworks |
| src/Nlog.RabbitMQ.Target/Field.cs | Removes deprecated [RequiredParameter] attributes from Key and Layout properties |
| Nlog.RabbitMQ.sln | Updates Visual Studio version to 18 and adds Directory.Packages.props to solution items |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Visual Studio Version 17 | ||
| VisualStudioVersion = 17.3.32804.467 | ||
| # Visual Studio Version 18 | ||
| VisualStudioVersion = 18.3.11310.294 d18.3 |
There was a problem hiding this comment.
The VisualStudioVersion value '18.3.11310.294 d18.3' appears malformed with an extra 'd18.3' suffix. Visual Studio version strings typically follow the format 'Major.Minor.Build.Revision' without additional suffixes. This could cause issues with tooling that parses this version string. The value should likely be '18.3.11310.294' without the 'd18.3' suffix.
| VisualStudioVersion = 18.3.11310.294 d18.3 | |
| VisualStudioVersion = 18.3.11310.294 |
|
It doesn't make sense to add NET4, as the RabbitMQ.Client-nuget-package only supports NETStandard 2.0 + NET8. Net462 only makes sense if you downgrade to RabbitMQ.Client ver. 6.8.1 |
Removed unsupported target frameworks and cleaned up project file.
No description provided.