Using Com+ For Transaction in C# 2005 RRS feed

  • Question

  • Hi

    I have a problem when I tried to use COM+ to rollback data access method in unit test. Here is my code:

        public class DALImplTest


            public void TestSaveEntity()
                DALImpl dal = new DALImpl();

                DataSet ds = dal.GetEntity();

            public void Rollback()
                if (ContextUtil.IsInTransaction)


    I generated .snk file, but when I added [assembly: AssemblyKeyFile(...)] to AssemblyInfo.cs, system notified me to configure in project setting instead of using "AssemblyKeyFile". I think it's maybe the change of .Net 2005, and I do the setting.

    Complie is ok, but when the unit test is running, ContextUtil.SetAbort() hasn't been executed, and test data is inserted into database.

    Anyone can help.



    Tuesday, August 7, 2007 3:06 PM