Upgrading unit test projects that contain database unit tests to the GDR release
-
Thursday, January 29, 2009 5:54 PMRight 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:
<configSections>
<section name="DatabaseUnitTesting" type="Microsoft.VisualStudio.TeamSystem.Data.UnitTesting.Configuration.DatabaseUnitTestingSection, Microsoft.VisualStudio.TeamSystem.Data.UnitTesting, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</configSections>
-
With this
<configSections>
<section name="DatabaseUnitTesting" type="Microsoft.Data.Schema.UnitTesting.Configuration.DatabaseUnitTestingSection, Microsoft.Data.Schema.UnitTesting, Version=9.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</configSections>
-
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.’
- Edited by Jamie Laflen MSFTMicrosoft Employee Monday, August 24, 2009 5:24 PM
- Edited by Jamie Laflen MSFTMicrosoft Employee Monday, August 24, 2009 5:25 PM
-
All Replies
-
Thursday, September 10, 2009 8:03 PMThanks ! It work great.
@Moderators
Please Pin this topic to be easily accessible or until the issue got fixed.
~~ Mark it as Answer if you find it correct~~ -
Saturday, October 03, 2009 3:34 PMModeratorFor people facing similar, but not the exact problem, also have a look on:
http://blogs.msdn.com/jenss/archive/2009/10/03/project-corruption-after-upgrade-vstsdb-unit-tests.aspx
-Jens
Jens K. Suessmeyer http://blogs.msdn.com/Jenss

