Skip to content

Removed warnings, and added .NET 4 support#89

Merged
artdolya merged 3 commits intomasterfrom
Removed-Warnings
Dec 17, 2025
Merged

Removed warnings, and added .NET 4 support#89
artdolya merged 3 commits intomasterfrom
Removed-Warnings

Conversation

@artdolya
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings December 17, 2025 18:30
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
VisualStudioVersion = 18.3.11310.294 d18.3
VisualStudioVersion = 18.3.11310.294

Copilot uses AI. Check for mistakes.
@snakefoot
Copy link
Contributor

snakefoot commented Dec 17, 2025

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

@artdolya artdolya merged commit aa3c892 into master Dec 17, 2025
1 check passed
@artdolya artdolya deleted the Removed-Warnings branch December 17, 2025 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments