Skip to content

Commit 08e1837

Browse files
#1479 Rework conditional packages in v6 branch including adding net 6 (#1482)
* Have added net 6 as a TFM and implement conditional packages Revert NetworkOrderDeserializer Have ported some changes from V7 + Reviewed conditional compiles * Bump Erlang and RabbitMQ versions for CI --------- Co-authored-by: Luke Bakken <[email protected]>
1 parent 1b9a40d commit 08e1837

24 files changed

+1063
-62
lines changed

.ci/versions.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"erlang": "26.0.2",
3-
"rabbitmq": "3.12.4"
2+
"erlang": "26.2.3",
3+
"rabbitmq": "3.13.0"
44
}

projects/RabbitMQ.Client.OAuth2/RabbitMQ.Client.OAuth2.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net462;netstandard2.0</TargetFrameworks>
4+
<TargetFrameworks>net462;netstandard2.0;net6.0</TargetFrameworks>
55
<NoWarn>$(NoWarn);CS1591</NoWarn>
66
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
77
<AssemblyTitle>RabbitMQ OAuth2 Client Library for .NET</AssemblyTitle>
@@ -59,6 +59,9 @@
5959
<ItemGroup>
6060
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
6161
<PackageReference Include="MinVer" Version="4.3.0" PrivateAssets="all" />
62+
</ItemGroup>
63+
64+
<ItemGroup Condition="$(TargetFramework) == 'net462' OR $(TargetFramework) == 'netstandard2.0'">
6265
<PackageReference Include="System.Net.Http.Json" Version="7.0.1" />
6366
<PackageReference Include="System.Text.Json" Version="7.0.2" />
6467
</ItemGroup>

projects/RabbitMQ.Client/RabbitMQ.Client.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net462;netstandard2.0</TargetFrameworks>
4+
<TargetFrameworks>net462;netstandard2.0;net6.0</TargetFrameworks>
55
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
66
<NoWarn>$(NoWarn);CS1591</NoWarn>
77
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
@@ -60,10 +60,10 @@
6060
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
6161

6262
<PackageReference Include="MinVer" Version="4.3.0" PrivateAssets="All" />
63-
<PackageReference Include="System.Threading.Channels" Version="7.0.0" />
6463
</ItemGroup>
6564

66-
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
65+
<ItemGroup Condition="$(TargetFramework) == 'net462' OR $(TargetFramework) == 'netstandard2.0'">
66+
<PackageReference Include="System.Threading.Channels" Version="7.0.0" />
6767
<PackageReference Include="System.Memory" Version="4.5.5" />
6868
</ItemGroup>
6969

projects/RabbitMQ.Client/client/exceptions/AlreadyClosedException.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ namespace RabbitMQ.Client.Exceptions
3636
/// <summary>Thrown when the application tries to make use of a
3737
/// session or connection that has already been shut
3838
/// down.</summary>
39-
#if !NETSTANDARD1_5
4039
[Serializable]
41-
#endif
4240
public class AlreadyClosedException : OperationInterruptedException
4341
{
4442
///<summary>Construct an instance containing the given

projects/RabbitMQ.Client/client/exceptions/AuthenticationFailureException.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ namespace RabbitMQ.Client.Exceptions
3535
{
3636
/// <summary> Thrown when the cause is an
3737
/// authentication failure. </summary>
38-
#if !NETSTANDARD1_5
3938
[Serializable]
40-
#endif
4139
public class AuthenticationFailureException : PossibleAuthenticationFailureException
4240
{
4341
public AuthenticationFailureException(string msg) : base(msg)

projects/RabbitMQ.Client/client/exceptions/BrokerUnreachableException.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ namespace RabbitMQ.Client.Exceptions
3636
{
3737
///<summary>Thrown when no connection could be opened during a
3838
///ConnectionFactory.CreateConnection attempt.</summary>
39-
#if !NETSTANDARD1_5
4039
[Serializable]
41-
#endif
4240
public class BrokerUnreachableException : IOException
4341
{
4442
///<summary>Construct a BrokerUnreachableException. The inner exception is

projects/RabbitMQ.Client/client/exceptions/ChannelAllocationException.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ namespace RabbitMQ.Client.Exceptions
3636
/// <summary> Thrown when a SessionManager cannot allocate a new
3737
/// channel number, or the requested channel number is already in
3838
/// use. </summary>
39-
#if !NETSTANDARD1_5
4039
[Serializable]
41-
#endif
4240
public class ChannelAllocationException : ProtocolViolationException
4341
{
4442
/// <summary>

projects/RabbitMQ.Client/client/exceptions/ConnectFailureException.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@
3434
namespace RabbitMQ.Client.Exceptions
3535
{
3636
/// <summary>Thrown when a connection to the broker fails</summary>
37-
#if !NETSTANDARD1_5
3837
[Serializable]
39-
#endif
4038
public class ConnectFailureException : ProtocolViolationException
4139
{
4240
public ConnectFailureException(string msg, Exception inner)

projects/RabbitMQ.Client/client/exceptions/OperationInterruptedException.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ namespace RabbitMQ.Client.Exceptions
4040
/// operation, an OperationInterruptedException will be thrown to
4141
/// the caller of IModel.QueueDeclare.
4242
/// </summary>
43-
#if !NETSTANDARD1_5
4443
[Serializable]
45-
#endif
4644
public class OperationInterruptedException
4745
// TODO: inherit from OperationCanceledException
4846
: RabbitMQClientException

projects/RabbitMQ.Client/client/exceptions/PacketNotRecognizedException.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ namespace RabbitMQ.Client.Exceptions
4141
///The peer's {'A','M','Q','P',txHi,txLo,major,minor} packet is
4242
///decoded into instances of this class.
4343
///</remarks>
44-
#if !NETSTANDARD1_5
4544
[Serializable]
46-
#endif
4745
public class PacketNotRecognizedException : RabbitMQClientException
4846
{
4947
///<summary>Fills the new instance's properties with the values passed in.</summary>

0 commit comments

Comments
 (0)