Skip to content

AMQPNetLite.Core instead of AMQPNetLite#351

Open
erwinkramer wants to merge 1 commit intocloudevents:mainfrom
erwinkramer:feature/ampqcore
Open

AMQPNetLite.Core instead of AMQPNetLite#351
erwinkramer wants to merge 1 commit intocloudevents:mainfrom
erwinkramer:feature/ampqcore

Conversation

@erwinkramer
Copy link
Copy Markdown
Contributor

This PR reduces the dependency of AMQPNetLite to just AMQPNetLite.Core

Signed-off-by: Erwin <erwinkramer@hotmail.com>
@erwinkramer
Copy link
Copy Markdown
Contributor Author

The build error seems unrelated to the PR and improved via #352

@jskeet
Copy link
Copy Markdown
Contributor

jskeet commented May 6, 2026

It's unclear to me how the two packages relate to each other - in particular, which assembly Message belongs to when you depend on AMQPNetLite. This is either a "just about breaking change" for customers who are relying on the dependency on AMQPNetLite for types that aren't in AMQPNetLite.Core, or "definitely a binary breaking change" if we're changing which assembly things come from.

I'll need to take a bit of time to look into this more carefully - not sure when that will be, I'm afraid. (I'm going to prioritize the "get tests running in .NET 4.8".)

@erwinkramer
Copy link
Copy Markdown
Contributor Author

erwinkramer commented May 6, 2026

I checked the assemblies. The signature is the same: Assembly Amqp.Net, Version=2.5.0.0, Culture=neutral, PublicKeyToken=905a7b1e6458e0c3, so I don't see how it could cause an issue:

Original:

#region Assembly Amqp.Net, Version=2.5.0.0, Culture=neutral, PublicKeyToken=905a7b1e6458e0c3
// C:\Users\x\.nuget\packages\amqpnetlite\2.5.2\lib\net5.0\Amqp.Net.dll
// Decompiled with ICSharpCode.Decompiler 9.1.0.7988
#endregion

using System;
using Amqp.Framing;
using Amqp.Types;

namespace Amqp;

//
// Summary:
//     The Message class represents an AMQP message.
public class Message : IDisposable
{

...

Core:

#region Assembly Amqp.Net, Version=2.5.0.0, Culture=neutral, PublicKeyToken=905a7b1e6458e0c3
// C:\Users\x\.nuget\packages\amqpnetlite.core\2.5.2\lib\netstandard2.0\Amqp.Net.dll
// Decompiled with ICSharpCode.Decompiler 9.1.0.7988
#endregion

using System;
using Amqp.Framing;
using Amqp.Types;

namespace Amqp;

//
// Summary:
//     The Message class represents an AMQP message.
public class Message : IDisposable
{

...

@jskeet
Copy link
Copy Markdown
Contributor

jskeet commented May 6, 2026

I definitely want to check. Example of how this could get weird - suppose someone already has a dependency on AMQPNetLite. Presumably that package will be installed as well as AMQPNetLite.Core. Does that cause problems? Hopefully not, but I'd want to check to make sure. What happens if those two packages are installed at different versions? Which assembly will be used? (Overall, it feels like an antipattern for the same type to be in two different packages - making this sort of change risky.)

@erwinkramer
Copy link
Copy Markdown
Contributor Author

Yeah, let me know your findings. They have some docs here explaining a little bit about the positioning of the libraries: https://azure.github.io/amqpnetlite/articles/installation.html#nuget-packages

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.

2 participants