Upgrading unit test projects that contain database unit tests to the GDR release

    General discussion

  • Right now, when you install the Database Edition GDR release you need to manually upgrade your test projects that contain database unit tests to reference and use the new code.  If you do not upgrade and open a database unit test designer you will see a non-intuitive error saying “The service Microsoft.VisualStudio.Shell.Interop.ISelectionContainer already exists in the service container.”


    We are working on an automated solution; in the meantime, here are the steps to take to upgrade your test projects:


    • Remove the reference to Microsoft.VisualStudio.TeamSystem.Data.UnitTesting.dll
    • Add a reference to Microsoft.Data.Schema.UnitTesting.dll and Microsoft.Data.Schema.dll
    • In the app.config you can do the following replacement or just clear the section and then reconfigure.  To manually change, replace:



            <section name="DatabaseUnitTesting" type="Microsoft.VisualStudio.TeamSystem.Data.UnitTesting.Configuration.DatabaseUnitTestingSection, Microsoft.VisualStudio.TeamSystem.Data.UnitTesting, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />



    • With this



            <section name="DatabaseUnitTesting" type="Microsoft.Data.Schema.UnitTesting.Configuration.DatabaseUnitTestingSection, Microsoft.Data.Schema.UnitTesting, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />



    • Search/replace all instances of ‘Microsoft.VisualStudio.TeamSystem.Data.UnitTesting;’ with ‘Microsoft.Data.Schema.UnitTesting;’
    • Search/replace all instances of ‘using Microsoft.VisualStudio.TeamSystem.Data.UnitTesting.Conditions;’ with ‘’
    • Search/replace all instance of ‘Microsoft.VisualStudio.TeamSystem.Data.UnitTesting.’ with ‘Microsoft.Data.Schema.UnitTesting.’



    Thursday, January 29, 2009 5:54 PM

All replies