Can't use System.Transactions RRS feed

  • Question

  • I'd like to use TransactionScope in a class library, so I added a reference to System.Transactions, but my "using System.Transactions" gives me:

    The type or namespace name 'Transactions' does not exist in the namespace 'System' (are you missing an assembly reference?)

    I read that I need to change its Copy Local to True, but that didn't help.

    I tried adding a new class to my class library, and simply referenced System.Transactions, I took out the references from my other C# file, and the project built fine this time.  So, are there .NET libraries which, when you reference them, prevent referencing System.Transactions???

    • Edited by Uncaged Monday, August 4, 2014 4:37 PM
    Monday, August 4, 2014 4:27 PM


  • Hi Uncaged,

    >So, are there .NET libraries which, when you reference them, prevent referencing System.Transactions???

    No, I think there should be some conceptual confusion.

    When you are in designer time on developer machine, the system.Transactions assembly is provided by .NET Framework. If you cannot reference this assembly, I think there must be some mistake with the Framework. Try to repair or reinstall it. See more from http://www.microsoft.com/en-hk/download/details.aspx?id=30135. Did you try this on other machine? Is the problem persists?

    When you are in runtime on product machine, this might be happen because the local environment doesn’t contain this assembly. So you should make System.Transactions assembly Copy Local in your project. See more form http://stackoverflow.com/questions/16217459/the-type-or-namespace-name-transactions-does-not-exist-in-the-namespace-syste.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

    Tuesday, August 5, 2014 2:14 AM