Skip to content

Commit

Permalink
Update Obsolete.Fody and remove workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
bording committed Feb 7, 2025
1 parent 023ee72 commit 8494cf4
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ namespace NServiceBus.Transport.RabbitMQ.ManagementApi;
using System.Text.Json;
using System.Text.Json.Serialization;

// This is to prevent Fody throwing an error on classes with `required` properties (since the compiler marks the default constructor with an `[Obsolete]` attribute)
// https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-11.0/required-members#metadata-representation
[method: DoNotWarnAboutObsoleteUsage]
class FeatureFlag()
{
[JsonRequired]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ namespace NServiceBus.Transport.RabbitMQ.ManagementApi;
using System.Text.Json;
using System.Text.Json.Serialization;

// This is to prevent Fody throwing an error on classes with `required` properties (since the compiler marks the default constructor with an `[Obsolete]` attribute)
// https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-11.0/required-members#metadata-representation
[method: DoNotWarnAboutObsoleteUsage]
class Overview()
{
[JsonPropertyName("product_name")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ namespace NServiceBus.Transport.RabbitMQ.ManagementApi;
using System.Text.Json;
using System.Text.Json.Serialization;

// This is to prevent Fody throwing an error on classes with `required` properties (since the compiler marks the default constructor with an `[Obsolete]` attribute)
// https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-11.0/required-members#metadata-representation
[method: DoNotWarnAboutObsoleteUsage]
class Policy()
{
[JsonPropertyName("vhost")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ namespace NServiceBus.Transport.RabbitMQ.ManagementApi;
using System.Text.Json;
using System.Text.Json.Serialization;

// This is to prevent Fody throwing an error on classes with `required` properties (since the compiler marks the default constructor with an `[Obsolete]` attribute)
// https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-11.0/required-members#metadata-representation
[method: DoNotWarnAboutObsoleteUsage]
class Queue()
{
[JsonRequired]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<ItemGroup>
<PackageReference Include="Fody" Version="6.9.1" PrivateAssets="All" />
<PackageReference Include="Obsolete.Fody" Version="5.3.0" PrivateAssets="All" />
<PackageReference Include="Obsolete.Fody" Version="5.3.1" PrivateAssets="All" />
<PackageReference Include="Particular.Packaging" Version="4.2.0" PrivateAssets="All" />
</ItemGroup>

Expand Down

0 comments on commit 8494cf4

Please sign in to comment.