问题
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
回答1:
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.
来源:https://stackoverflow.com/questions/50177520/net-standard-class-library-not-support-distributed-transaction-error