diff --git a/packaging/nuget/NServiceBus.SqlServer.nuspec b/packaging/nuget/NServiceBus.SqlServer.nuspec
index 71c8a30f4..990b22a99 100644
--- a/packaging/nuget/NServiceBus.SqlServer.nuspec
+++ b/packaging/nuget/NServiceBus.SqlServer.nuspec
@@ -15,6 +15,8 @@
nservicebus servicebus msmq cqrs publish subscribe
+
+
diff --git a/src/NServiceBus.SqlServer/NServiceBus.SqlServer.csproj b/src/NServiceBus.SqlServer/NServiceBus.SqlServer.csproj
index e1fdd968b..563c08c9d 100644
--- a/src/NServiceBus.SqlServer/NServiceBus.SqlServer.csproj
+++ b/src/NServiceBus.SqlServer/NServiceBus.SqlServer.csproj
@@ -13,7 +13,8 @@
512
true
$(SolutionDir)NServiceBus.snk
- a65d899d
+
+
true
@@ -42,12 +43,12 @@
False
-
- ..\packages\NServiceBus.Interfaces.4.7.5\lib\net40\NServiceBus.dll
+
+ ..\packages\NServiceBus.Interfaces.4.4.8\lib\net40\NServiceBus.dll
True
-
- ..\packages\NServiceBus.4.7.5\lib\net40\NServiceBus.Core.dll
+
+ ..\packages\NServiceBus.4.4.8\lib\net40\NServiceBus.Core.dll
True
@@ -78,18 +79,20 @@
-
+
+ Designer
+
-
This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
+
+
\ No newline at end of file
diff --git a/src/NServiceBus.SqlServer/SqlServerMessageSender.cs b/src/NServiceBus.SqlServer/SqlServerMessageSender.cs
index 5156dff94..4a0672feb 100644
--- a/src/NServiceBus.SqlServer/SqlServerMessageSender.cs
+++ b/src/NServiceBus.SqlServer/SqlServerMessageSender.cs
@@ -7,6 +7,7 @@
using Serializers.Json;
using Unicast.Queuing;
using System.Collections.Generic;
+ using NServiceBus.Pipeline;
///
/// SqlServer implementation of .
@@ -28,7 +29,9 @@ public class SqlServerMessageSender : ISendMessages
public Dictionary SchemaNameCollection { get; set; }
public UnitOfWork UnitOfWork { get; set; }
-
+
+ public PipelineExecutor PipelineExecutor { get; set; }
+
public SqlServerMessageSender()
{
ConnectionStringCollection = new Dictionary(StringComparer.InvariantCultureIgnoreCase);
@@ -61,7 +64,9 @@ public void Send(TransportMessage message, Address address)
schemaName = SchemaNameCollection[ address.Queue ];
}
- if (UnitOfWork.HasActiveTransaction(queueConnectionString))
+ bool suppressNativeTransactions;
+ PipelineExecutor.CurrentContext.TryGet("do-not-enlist-in-native-transaction", out suppressNativeTransactions);
+ if (UnitOfWork.HasActiveTransaction(queueConnectionString) && !suppressNativeTransactions)
{
//if there is an active transaction for the connection, we can use the same native transaction
var transaction = UnitOfWork.GetTransaction(queueConnectionString);
diff --git a/src/NServiceBus.SqlServer/SqlServerTransport.cs b/src/NServiceBus.SqlServer/SqlServerTransport.cs
index a9460ecfb..fb6a6fe6e 100644
--- a/src/NServiceBus.SqlServer/SqlServerTransport.cs
+++ b/src/NServiceBus.SqlServer/SqlServerTransport.cs
@@ -19,7 +19,9 @@ protected override string ExampleConnectionStringForErrorMessage
protected override void InternalConfigure(Configure config)
{
-
+ // required for TimeoutPersistenceVersionCheck on NSB.Core
+ SettingsHolder.Set("NServiceBus.Transport.SupportsNativeTransactionSuppression", true);
+
Enable();
Enable();
}
diff --git a/src/NServiceBus.SqlServer/packages.config b/src/NServiceBus.SqlServer/packages.config
index bb0c9e1a2..1af0a64af 100644
--- a/src/NServiceBus.SqlServer/packages.config
+++ b/src/NServiceBus.SqlServer/packages.config
@@ -1,9 +1,9 @@
-
+
-
-
+
+
\ No newline at end of file