Distributed Transaction support - has it been implemented for Net 7?

Howard Reagor 6 Reputation points
2022-11-30T20:50:31.09+00:00

My understanding is that Net 7 would have distributed transaction support enabled for Windows only. I installed Net 7 and distributed transaction support does not appear to work. Windows 10 , WPF/MVVM application. Currently running under .Net 6, but the application was originally written in the framework where distributed transactions did work.

Oracle is the main database, but also have some connects to SQL and Progress.

.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,136 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 60,376 Reputation points
    2022-11-30T21:17:56.61+00:00

    MSDTS support was added in net 5.

    https://learn.microsoft.com/en-us/dotnet/api/system.transactions.transactionscope?view=net-7.0

    also see thread:

    https://github.com/dotnet/runtime/issues/715

    each .net core native database driver needs to add support. sqlserver has support. see your database vendor for their support.

    0 comments No comments

  2. Howard Reagor 6 Reputation points
    2022-12-01T15:31:42.927+00:00

    I don't believe it was added in Net 5 actually. The 715 issue you refer to is for the change to occur in .Net 7. I also tried using just SQL database instead of Oracle and in Net 6 I get "This platform does not support distributed transactions.". However, in Net 7 running the same code, I get this error "Implicit distributed transactions have not been enabled. If you're intentionally starting a distributed transaction, set TransactionManager.ImplicitDistributedTransactions to true."

    So, it appears it was added in Net 7, and I think SQL would work if that property mentioned above set to true. However, Oracle databases accessed give the same error message in Net 7 as in Net 6. So, I am guessing this is an Oracle driver issue.