2

I developed a logging service in .net standard class library project. It is perfectly working without System.Transaction (TransactionScope class).
When I add transaction to a process, logger insert method throws an exception. [This platform does not support distributed transactions.]

When I add code to core console app with System.Transaction it works.

Is .net standard not supporting System.Transaction(TransactionScope)?

NOTE: For now : .net core and nugets are lastest.

  • Distribution Transaction Coordinator service is working,
  • EF Core version: 2.1.0 preview2-final,
  • Class library versions .NET Standard 2.0
  • AspNetCore 2.0.5

Edit:
I realized that exception throws when I try to open second connection in same database with in the same TransactionScope block. post

SLYN
  • 176
  • 1
  • 4
  • 16
  • Which Netstandard are you targeting? `netstandard2.0` and `netcoreapp20` shouldn't support it, but `netstandard2.1`/`netcoeapp2.0` And keep in mind "Microsoft Distributed Transaction Coordinator (MS DTC) " is windows only and not available on linux and mac which is required for distributed transactions – Tseng May 04 '18 at 14:45
  • 1
    in property page, dropdown of target framework contains only _.NET Standard 1.0_ to _2.0_ and my class library target framework is `.NET Standard 2.0` – SLYN May 04 '18 at 14:57
  • The latest version of .NET Standard is 2.0. Which platform are you running this code on? Do you have a small code sample to share? – Alex Ghiondea - MSFT May 04 '18 at 21:48
  • I would encourage you to upvote and/or comment on the official issue for this missing feature: https://github.com/dotnet/corefx/issues/13532 – Randy Burden Dec 06 '19 at 19:13

1 Answers1

5

The error message you are mentioning points to this is running on .NET Core and that you are trying to use/create a Distributed Transaction.

Browsing the code for DistributedTransaction in the CoreFx repo it looks like Distributed Transactions are not supported on .NET Core.

Alex Ghiondea - MSFT
  • 3,182
  • 1
  • 8
  • 11