From 6c3bda5ff6bbdb49d3e5bdfbeaa4fd8f72fe3b9b Mon Sep 17 00:00:00 2001 From: mark Date: Mon, 4 Jul 2016 18:29:33 +0100 Subject: [PATCH] updated packages to support netcore1.0 and RabbitMQ.Client 4.0.0-ci need to add pre-release nuget feed for rabbit https://ci.appveyor.com/nuget/rabbitmq-dotnet-client-ci Also had to change the call to PublishBasic in RabbitAdvancedBus and remove the imediate flag. No Idea why, but it would not compile with it. --- Source/.vs/restore.dg | 1 + Source/EasyNetQ DNX/EasyNetQ DNX.xproj | 4 +- Source/EasyNetQ DNX/project.json | 72 ++++++++++--------- .../EasyNetQ/AutoSubscribe/AutoSubscriber.cs | 6 +- .../AutoSubscriberConsumerAttribute.cs | 2 +- .../AutoSubscriberConsumerInfo.cs | 2 +- .../AutoSubscribe/ForTopicAttribute.cs | 2 +- .../SubscriptionConfigurationAttribute.cs | 2 +- Source/EasyNetQ/ConnectionConfiguration.cs | 4 +- .../ConnectionStringGrammar.cs | 2 +- Source/EasyNetQ/Consumer/ExclusiveConsumer.cs | 2 +- Source/EasyNetQ/Consumer/HandlerCollection.cs | 2 +- Source/EasyNetQ/DeliveryModeAttribute.cs | 2 +- Source/EasyNetQ/EasyNetQException.cs | 12 ++-- .../MessageVersioning/MessageVersionStack.cs | 4 +- Source/EasyNetQ/PersistentConnection.cs | 2 +- Source/EasyNetQ/Preconditions.cs | 2 +- .../Producer/PublishInterruptedException.cs | 4 +- .../Producer/PublishNackedException.cs | 4 +- Source/EasyNetQ/Producer/Rpc.cs | 2 +- Source/EasyNetQ/QueueAttribute.cs | 2 +- Source/EasyNetQ/RabbitHutch.cs | 4 +- Source/EasyNetQ/ReflectionHelpers.cs | 2 +- Source/EasyNetQ/SystemMessages/ScheduleMe.cs | 2 +- .../EasyNetQ/SystemMessages/UnscheduleMe.cs | 2 +- Source/EasyNetQ/TimeoutSecondsAttribute.cs | 2 +- Source/EasyNetQ/TypeNameSerializer.cs | 2 +- 27 files changed, 75 insertions(+), 74 deletions(-) create mode 100644 Source/.vs/restore.dg diff --git a/Source/.vs/restore.dg b/Source/.vs/restore.dg new file mode 100644 index 000000000..f94fedc0f --- /dev/null +++ b/Source/.vs/restore.dg @@ -0,0 +1 @@ +#:C:\Users\mark\Source\Repos\EasyNetQ\Source\EasyNetQ DNX\EasyNetQ DNX.xproj diff --git a/Source/EasyNetQ DNX/EasyNetQ DNX.xproj b/Source/EasyNetQ DNX/EasyNetQ DNX.xproj index b4ee57ae6..92ea227b8 100644 --- a/Source/EasyNetQ DNX/EasyNetQ DNX.xproj +++ b/Source/EasyNetQ DNX/EasyNetQ DNX.xproj @@ -4,7 +4,6 @@ 14.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - ed270a39-d32c-438a-bf4f-aa0e66c7879c @@ -12,9 +11,8 @@ ..\artifacts\obj\$(MSBuildProjectName) ..\artifacts\bin\$(MSBuildProjectName)\ - 2.0 - + \ No newline at end of file diff --git a/Source/EasyNetQ DNX/project.json b/Source/EasyNetQ DNX/project.json index 961368ba1..dad595164 100644 --- a/Source/EasyNetQ DNX/project.json +++ b/Source/EasyNetQ DNX/project.json @@ -1,4 +1,4 @@ -{ +{ "version": "1.0.0-*", "description": "EasyNetQ DNX Class Library", "authors": [ "SapientGuardian" ], @@ -7,43 +7,45 @@ "licenseUrl": "", "compile": [ "../EasyNetQ/*.cs", "../EasyNetQ/**/*.cs" ], "frameworks": { - "dotnet5.4": { - "dependencies": { - "Microsoft.CSharp": "4.0.1-beta-23516", - "System.Collections": "4.0.11-beta-23516", - "System.Linq": "4.0.1-beta-23516", - "System.Threading": "4.0.11-beta-23516", - "System.Reflection.TypeExtensions": "4.1.0-beta-23516", - "System.Runtime.Handles": "4.0.1-beta-23516", - "System.Reflection": "4.1.0-beta-23516", - "System.Threading.Tasks": "4.0.11-beta-23516", - "System.Reflection.Primitives": "4.0.1-beta-23516", - "System.Reflection.Extensions": "4.0.1-beta-23516", - "System.Runtime.InteropServices": "4.0.21-beta-23516", - "System.Linq.Expressions": "4.0.11-beta-23516", - "System.Runtime.Extensions": "4.0.11-beta-23516", - "System.Resources.ResourceManager": "4.0.1-beta-23516", - "System.Globalization": "4.0.11-beta-23516", - "System.Diagnostics.Debug": "4.0.11-beta-23516", - "System.Dynamic.Runtime": "4.0.11-beta-23516", - "System.Reflection.Emit": "4.0.1-beta-23516", - "System.Reflection.Emit.ILGeneration": "4.0.1-beta-23516", - "System.Reflection.Emit.Lightweight": "4.0.1-beta-23516", - "System.ObjectModel": "4.0.11-beta-23516", - "System.Text.Encoding.Extensions": "4.0.11-beta-23516", - "System.IO.FileSystem.Primitives": "4.0.1-beta-23516", - "System.IO.FileSystem": "4.0.1-beta-23516", - "System.IO": "4.0.11-beta-23516", - "System.Diagnostics.Tools": "4.0.1-beta-23516", - "System.Text.Encoding": "4.0.11-beta-23516", - "System.IO.Compression": "4.1.0-beta-23516", - "System.Threading.Timer": "4.0.1-beta-23516", - "System.Net.NameResolution": "4.0.0-beta-23516" + "netcoreapp1.0": { + "imports": "dnxcore50", + "buildOptions": { + "define": [ "NET_CORE" ] } } }, "dependencies": { - "Newtonsoft.Json": "8.0.1", - "RabbitMQ.Client.CoreClrUnofficial": "3.5.6.1" + "Microsoft.NETCore.App": { + "type": "platform", + "version": "1.0.0" + }, + "Newtonsoft.Json": "9.0.1", + "RabbitMQ.Client": "4.0.0-ci-201607010902", + "System.Diagnostics.Debug": "4.0.11", + "System.Diagnostics.Tools": "4.0.1", + "System.Dynamic.Runtime": "4.0.11", + "System.Globalization": "4.0.11", + "System.IO": "4.1.0", + "System.IO.Compression": "4.1.0", + "System.IO.FileSystem": "4.0.1", + "System.IO.FileSystem.Primitives": "4.0.1", + "System.Linq.Expressions": "4.1.0", + "System.ObjectModel": "4.0.12", + "System.Reflection": "4.1.0", + "System.Reflection.Emit": "4.0.1", + "System.Reflection.Emit.ILGeneration": "4.0.1", + "System.Reflection.Emit.Lightweight": "4.0.1", + "System.Reflection.Extensions": "4.0.1", + "System.Reflection.Primitives": "4.0.1", + "System.Reflection.TypeExtensions": "4.1.0", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime.Extensions": "4.1.0", + "System.Runtime.Handles": "4.0.1", + "System.Runtime.InteropServices": "4.1.0", + "System.Text.Encoding": "4.0.11", + "System.Text.Encoding.Extensions": "4.0.11", + "System.Threading.Tasks": "4.0.11", + "System.Threading.Timer": "4.0.1", + "Microsoft.Extensions.Logging.TraceSource": "1.0.0" } } diff --git a/Source/EasyNetQ/AutoSubscribe/AutoSubscriber.cs b/Source/EasyNetQ/AutoSubscribe/AutoSubscriber.cs index ff6096324..ca112e7b8 100644 --- a/Source/EasyNetQ/AutoSubscribe/AutoSubscriber.cs +++ b/Source/EasyNetQ/AutoSubscribe/AutoSubscriber.cs @@ -146,7 +146,7 @@ protected virtual void InvokeMethods(IEnumerable m.Name == ConsumeMethodName); #else return markerType.IsInterface && markerType.GetMethods().Any(m => m.Name == ConsumeMethodName); @@ -280,7 +280,7 @@ private MethodInfo GetExplicitlyDeclaredInterfaceMethod(Type messageType) protected virtual IEnumerable> GetSubscriptionInfos(IEnumerable types,Type interfaceType) { -#if DOTNET5_4 +#if NET_CORE foreach (var concreteType in types.Where(t => t.GetTypeInfo().IsClass && !t.GetTypeInfo().IsAbstract)) { var subscriptionInfos = concreteType.GetInterfaces() diff --git a/Source/EasyNetQ/AutoSubscribe/AutoSubscriberConsumerAttribute.cs b/Source/EasyNetQ/AutoSubscribe/AutoSubscriberConsumerAttribute.cs index ac8c0b7a8..9d068b395 100644 --- a/Source/EasyNetQ/AutoSubscribe/AutoSubscriberConsumerAttribute.cs +++ b/Source/EasyNetQ/AutoSubscribe/AutoSubscriberConsumerAttribute.cs @@ -2,7 +2,7 @@ namespace EasyNetQ.AutoSubscribe { -#if !DOTNET5_4 +#if !NET_CORE #endif [AttributeUsage(AttributeTargets.Method)] public class AutoSubscriberConsumerAttribute : Attribute diff --git a/Source/EasyNetQ/AutoSubscribe/AutoSubscriberConsumerInfo.cs b/Source/EasyNetQ/AutoSubscribe/AutoSubscriberConsumerInfo.cs index a47c1f3a5..dc2a1063f 100644 --- a/Source/EasyNetQ/AutoSubscribe/AutoSubscriberConsumerInfo.cs +++ b/Source/EasyNetQ/AutoSubscribe/AutoSubscriberConsumerInfo.cs @@ -2,7 +2,7 @@ namespace EasyNetQ.AutoSubscribe { -#if !DOTNET5_4 +#if !NET_CORE #endif public class AutoSubscriberConsumerInfo { diff --git a/Source/EasyNetQ/AutoSubscribe/ForTopicAttribute.cs b/Source/EasyNetQ/AutoSubscribe/ForTopicAttribute.cs index dff452fa9..c81f72019 100644 --- a/Source/EasyNetQ/AutoSubscribe/ForTopicAttribute.cs +++ b/Source/EasyNetQ/AutoSubscribe/ForTopicAttribute.cs @@ -2,7 +2,7 @@ namespace EasyNetQ.AutoSubscribe { -#if !DOTNET5_4 +#if !NET_CORE #endif [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] public class ForTopicAttribute : Attribute diff --git a/Source/EasyNetQ/AutoSubscribe/SubscriptionConfigurationAttribute.cs b/Source/EasyNetQ/AutoSubscribe/SubscriptionConfigurationAttribute.cs index 8f7712ba0..fd21f760c 100644 --- a/Source/EasyNetQ/AutoSubscribe/SubscriptionConfigurationAttribute.cs +++ b/Source/EasyNetQ/AutoSubscribe/SubscriptionConfigurationAttribute.cs @@ -2,7 +2,7 @@ namespace EasyNetQ.AutoSubscribe { -#if !DOTNET5_4 +#if !NET_CORE #endif [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class)] public class SubscriptionConfigurationAttribute : Attribute diff --git a/Source/EasyNetQ/ConnectionConfiguration.cs b/Source/EasyNetQ/ConnectionConfiguration.cs index 600693c3b..8d5ac2832 100644 --- a/Source/EasyNetQ/ConnectionConfiguration.cs +++ b/Source/EasyNetQ/ConnectionConfiguration.cs @@ -67,7 +67,7 @@ public ConnectionConfiguration() private void SetDefaultClientProperties(IDictionary clientProperties) { string applicationNameAndPath = null; -#if DOTNET5_4 +#if NET_CORE var version = this.GetType().GetTypeInfo().Assembly.GetName().Version.ToString(); #else var version = Assembly.GetExecutingAssembly().GetName().Version.ToString(); @@ -94,7 +94,7 @@ private void SetDefaultClientProperties(IDictionary clientProper catch (PathTooLongException) { } } -#if DOTNET5_4 +#if NET_CORE var hostname = System.Net.Dns.GetHostName(); #else var hostname = Environment.MachineName; diff --git a/Source/EasyNetQ/ConnectionString/ConnectionStringGrammar.cs b/Source/EasyNetQ/ConnectionString/ConnectionStringGrammar.cs index 439eea260..22b4f0555 100644 --- a/Source/EasyNetQ/ConnectionString/ConnectionStringGrammar.cs +++ b/Source/EasyNetQ/ConnectionString/ConnectionStringGrammar.cs @@ -97,7 +97,7 @@ public static Action CreateSetter)property.GetSetMethod().CreateDelegate(typeof(Action)); #else diff --git a/Source/EasyNetQ/Consumer/ExclusiveConsumer.cs b/Source/EasyNetQ/Consumer/ExclusiveConsumer.cs index c185d9bf0..7240bbe12 100644 --- a/Source/EasyNetQ/Consumer/ExclusiveConsumer.cs +++ b/Source/EasyNetQ/Consumer/ExclusiveConsumer.cs @@ -47,7 +47,7 @@ IEventBus eventBus this.configuration = configuration; this.internalConsumerFactory = internalConsumerFactory; this.eventBus = eventBus; -#if DOTNET5_4 +#if NET_CORE timer = new Timer(s => { StartConsumer(); diff --git a/Source/EasyNetQ/Consumer/HandlerCollection.cs b/Source/EasyNetQ/Consumer/HandlerCollection.cs index ac8b14ca1..18f2e21f4 100644 --- a/Source/EasyNetQ/Consumer/HandlerCollection.cs +++ b/Source/EasyNetQ/Consumer/HandlerCollection.cs @@ -58,7 +58,7 @@ public Func GetHandler(Type messageType) // no exact handler match found, so let's see if we can find a handler that // handles a supertype of the consumed message. -#if DOTNET5_4 +#if NET_CORE var handlerType = handlers.Keys.FirstOrDefault(type => type.GetTypeInfo().IsAssignableFrom(messageType.GetTypeInfo())); #else var handlerType = handlers.Keys.FirstOrDefault(type => type.IsAssignableFrom(messageType)); diff --git a/Source/EasyNetQ/DeliveryModeAttribute.cs b/Source/EasyNetQ/DeliveryModeAttribute.cs index a6e2c3745..87eee72e3 100644 --- a/Source/EasyNetQ/DeliveryModeAttribute.cs +++ b/Source/EasyNetQ/DeliveryModeAttribute.cs @@ -2,7 +2,7 @@ namespace EasyNetQ { -#if !DOTNET5_4 +#if !NET_CORE #endif [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple = false)] public class DeliveryModeAttribute : Attribute diff --git a/Source/EasyNetQ/EasyNetQException.cs b/Source/EasyNetQ/EasyNetQException.cs index 51e8cff8e..83b702b0e 100644 --- a/Source/EasyNetQ/EasyNetQException.cs +++ b/Source/EasyNetQ/EasyNetQException.cs @@ -2,7 +2,7 @@ namespace EasyNetQ { -#if !DOTNET5_4 +#if !NET_CORE #endif public class EasyNetQException : Exception { @@ -11,11 +11,11 @@ public EasyNetQException(string message) : base(message) {} public EasyNetQException(string format, params string[] args) : base(string.Format(format, args)) {} public EasyNetQException(string message, Exception inner) : base(message, inner) {} -#if !DOTNET5_4 +#if !NET_CORE #endif } -#if !DOTNET5_4 +#if !NET_CORE #endif public class EasyNetQInvalidMessageTypeException : EasyNetQException { @@ -23,11 +23,11 @@ public EasyNetQInvalidMessageTypeException() {} public EasyNetQInvalidMessageTypeException(string message) : base(message) {} public EasyNetQInvalidMessageTypeException(string format, params string[] args) : base(format, args) {} public EasyNetQInvalidMessageTypeException(string message, Exception inner) : base(message, inner) {} -#if !DOTNET5_4 +#if !NET_CORE #endif } -#if !DOTNET5_4 +#if !NET_CORE #endif public class EasyNetQResponderException : EasyNetQException { @@ -35,7 +35,7 @@ public EasyNetQResponderException() { } public EasyNetQResponderException(string message) : base(message) { } public EasyNetQResponderException(string format, params string[] args) : base(format, args) { } public EasyNetQResponderException(string message, Exception inner) : base(message, inner) { } -#if !DOTNET5_4 +#if !NET_CORE #endif } } \ No newline at end of file diff --git a/Source/EasyNetQ/MessageVersioning/MessageVersionStack.cs b/Source/EasyNetQ/MessageVersioning/MessageVersionStack.cs index ea5d43bb2..877bf514a 100644 --- a/Source/EasyNetQ/MessageVersioning/MessageVersionStack.cs +++ b/Source/EasyNetQ/MessageVersioning/MessageVersionStack.cs @@ -56,7 +56,7 @@ private static Stack ExtractMessageVersions( Type type ) private static Type GetSupersededType( Type type ) { -#if DOTNET5_4 +#if NET_CORE return type .GetInterfaces() .Where( t => t.GetTypeInfo().IsGenericType && t.GetGenericTypeDefinition() == typeof( ISupersede<> ) ) @@ -73,7 +73,7 @@ private static Type GetSupersededType( Type type ) private static void EnsureVersioningValid( Type messageType, Type supersededType ) { -#if DOTNET5_4 +#if NET_CORE if ( !messageType.GetTypeInfo().IsSubclassOf( supersededType ) ) throw new EasyNetQException( "Message cannot supersede a type it is not a subclass of. {0} is not a subclass of {1}", messageType.Name, supersededType.Name ); #else diff --git a/Source/EasyNetQ/PersistentConnection.cs b/Source/EasyNetQ/PersistentConnection.cs index b2e96a14c..60ab371a6 100644 --- a/Source/EasyNetQ/PersistentConnection.cs +++ b/Source/EasyNetQ/PersistentConnection.cs @@ -74,7 +74,7 @@ public bool IsConnected void StartTryToConnect() { Timer timer; -#if DOTNET5_4 +#if NET_CORE timer = new Timer(TryToConnect, null, connectionFactory.Configuration.ConnectIntervalAttempt, Timeout.InfiniteTimeSpan); #else timer = new Timer(TryToConnect); diff --git a/Source/EasyNetQ/Preconditions.cs b/Source/EasyNetQ/Preconditions.cs index d526b79cc..233ddd778 100644 --- a/Source/EasyNetQ/Preconditions.cs +++ b/Source/EasyNetQ/Preconditions.cs @@ -218,7 +218,7 @@ public static void CheckShortString(string value, string name) public static void CheckTypeMatches(Type expectedType, object value, string name, string message) { bool assignable; -#if DOTNET5_4 +#if NET_CORE assignable = expectedType.GetTypeInfo().IsAssignableFrom(value.GetType().GetTypeInfo()); #else assignable = expectedType.IsAssignableFrom(value.GetType()); diff --git a/Source/EasyNetQ/Producer/PublishInterruptedException.cs b/Source/EasyNetQ/Producer/PublishInterruptedException.cs index 1b7f01798..e2451a5a6 100644 --- a/Source/EasyNetQ/Producer/PublishInterruptedException.cs +++ b/Source/EasyNetQ/Producer/PublishInterruptedException.cs @@ -2,7 +2,7 @@ namespace EasyNetQ.Producer { -#if !DOTNET5_4 +#if !NET_CORE #endif public class PublishInterruptedException : Exception { @@ -26,7 +26,7 @@ public PublishInterruptedException(string message, Exception inner) : base(message, inner) { } -#if !DOTNET5_4 +#if !NET_CORE #endif } } \ No newline at end of file diff --git a/Source/EasyNetQ/Producer/PublishNackedException.cs b/Source/EasyNetQ/Producer/PublishNackedException.cs index 902de6bc0..5e8c7b511 100644 --- a/Source/EasyNetQ/Producer/PublishNackedException.cs +++ b/Source/EasyNetQ/Producer/PublishNackedException.cs @@ -2,7 +2,7 @@ namespace EasyNetQ.Producer { -#if !DOTNET5_4 +#if !NET_CORE #endif public class PublishNackedException : Exception { @@ -24,7 +24,7 @@ public PublishNackedException(string message) : base(message) public PublishNackedException(string message, Exception inner) : base(message, inner) { } -#if !DOTNET5_4 +#if !NET_CORE #endif } } \ No newline at end of file diff --git a/Source/EasyNetQ/Producer/Rpc.cs b/Source/EasyNetQ/Producer/Rpc.cs index 5ebd8ae27..18a5e83c4 100644 --- a/Source/EasyNetQ/Producer/Rpc.cs +++ b/Source/EasyNetQ/Producer/Rpc.cs @@ -86,7 +86,7 @@ public virtual Task Request(TRequest request) var requestType = typeof(TRequest); Timer timer; -#if DOTNET5_4 +#if NET_CORE timer = new Timer(state => { ((Timer)state).Dispose(); diff --git a/Source/EasyNetQ/QueueAttribute.cs b/Source/EasyNetQ/QueueAttribute.cs index f205c4911..23047ba82 100644 --- a/Source/EasyNetQ/QueueAttribute.cs +++ b/Source/EasyNetQ/QueueAttribute.cs @@ -2,7 +2,7 @@ namespace EasyNetQ { -#if !DOTNET5_4 +#if !NET_CORE #endif [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple=false)] public class QueueAttribute : Attribute diff --git a/Source/EasyNetQ/RabbitHutch.cs b/Source/EasyNetQ/RabbitHutch.cs index 7f31063a4..176e57b2b 100644 --- a/Source/EasyNetQ/RabbitHutch.cs +++ b/Source/EasyNetQ/RabbitHutch.cs @@ -1,6 +1,6 @@ using System; using System.Collections.Generic; -#if !DOTNET5_4 +#if !NET_CORE using System.Configuration; #endif using EasyNetQ.ConnectionString; @@ -26,7 +26,7 @@ public static void SetContainerFactory(Func createContainer) createContainerInternal = createContainer; } - #if !DOTNET5_4 + #if !NET_CORE /// /// Creates a new instance of . /// The RabbitMQ broker is defined in the connection string named 'rabbit'. diff --git a/Source/EasyNetQ/ReflectionHelpers.cs b/Source/EasyNetQ/ReflectionHelpers.cs index 16aaf3ebd..0fa3ad75c 100644 --- a/Source/EasyNetQ/ReflectionHelpers.cs +++ b/Source/EasyNetQ/ReflectionHelpers.cs @@ -14,7 +14,7 @@ public static class ReflectionHelpers private static Dictionary GetOrAddTypeAttributeDictionary(Type type) { -#if DOTNET5_4 +#if NET_CORE return typesAttributes.GetOrAdd(type, t => t.GetTypeInfo().GetCustomAttributes(true) .Cast() .GroupBy(attr => attr.GetType()) diff --git a/Source/EasyNetQ/SystemMessages/ScheduleMe.cs b/Source/EasyNetQ/SystemMessages/ScheduleMe.cs index 7fdb2e6f9..7189d8512 100644 --- a/Source/EasyNetQ/SystemMessages/ScheduleMe.cs +++ b/Source/EasyNetQ/SystemMessages/ScheduleMe.cs @@ -2,7 +2,7 @@ namespace EasyNetQ.SystemMessages { -#if !DOTNET5_4 +#if !NET_CORE #endif public class ScheduleMe { diff --git a/Source/EasyNetQ/SystemMessages/UnscheduleMe.cs b/Source/EasyNetQ/SystemMessages/UnscheduleMe.cs index e253574d1..79e1a7d08 100644 --- a/Source/EasyNetQ/SystemMessages/UnscheduleMe.cs +++ b/Source/EasyNetQ/SystemMessages/UnscheduleMe.cs @@ -2,7 +2,7 @@ namespace EasyNetQ.SystemMessages { -#if !DOTNET5_4 +#if !NET_CORE #endif public class UnscheduleMe { diff --git a/Source/EasyNetQ/TimeoutSecondsAttribute.cs b/Source/EasyNetQ/TimeoutSecondsAttribute.cs index 47edfd9e6..3a126fb84 100644 --- a/Source/EasyNetQ/TimeoutSecondsAttribute.cs +++ b/Source/EasyNetQ/TimeoutSecondsAttribute.cs @@ -2,7 +2,7 @@ namespace EasyNetQ { -#if !DOTNET5_4 +#if !NET_CORE #endif [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple = false)] public class TimeoutSecondsAttribute : Attribute diff --git a/Source/EasyNetQ/TypeNameSerializer.cs b/Source/EasyNetQ/TypeNameSerializer.cs index 21849224c..f3de06f5d 100644 --- a/Source/EasyNetQ/TypeNameSerializer.cs +++ b/Source/EasyNetQ/TypeNameSerializer.cs @@ -43,7 +43,7 @@ public string Serialize(Type type) return serializedTypes.GetOrAdd(type, t => { -#if DOTNET5_4 +#if NET_CORE var typeName = t.FullName + ":" + t.GetTypeInfo().Assembly.GetName().Name; #else