locked
Issues in Importing Database Unit Solution from VS 2010 Ultimate to VS 2012 RRS feed

  • Question

  • I am not able to build a solution developed in VS 2010 ultimate in VS 2012. Getting the errors regarding DatabaseTest and DatabaseTestAction.

    Error 12 The type or namespace name 'DatabaseTestClass' could not be found (are you missing a using directive or an assembly reference?) 

    Error 13 The type or namespace name 'DatabaseTestActions' could not be found (are you missing a using directive or an assembly reference?) 

    I followed the steps here: http://msdn.microsoft.com/en-us/library/jj860450(v=vs.103).aspx to upgrade my project, but it still fails with the above errors. You answered a previous question with the comment that the types were to be found at C:\Program Files (x86)\Microsoft Visual Studio 10.0\VSTSDB\Microsoft.Data.Schema.UnitTesting.dll. However, I do not have this folder on my system, even though I have VS2010 installed. Is there any specific component I need to get these assemblies?

    Thursday, July 3, 2014 2:48 PM

Answers

  • Hi,

    Both DatabaseTestClass and DatabaseTestActions are from the assembly Microsoft.Data.Schema.UnitTesting which is from VS2010 installation rather than other components. You said that you don’t have Microsoft.Data.Schema.UnitTesting.dll under %Program Files (x86)%\Microsoft Visual Studio 10.0\VSTSDB, how did you build the VS2010 solution successfully in VS2010? Before you upgrade, you need to make sure the project can be built and run fine from VS2010. For the issue, I doubt there is anything wrong with your VS2010 installation. You can uninstall and reinstall VS2010.

    In addition, this blog introduces sql server unit testing using VS2010 and 2012 side by side, you can reference it to know how to use custom test conditions in side by side scenarios.

    As for you upgrade VS2010 database unit test to VS2012, actually you upgrade it to sql server data tools like this document: How to: Upgrade a Visual Studio 2010 Custom Test Condition from a Previous Release to SQL Server Data Tools , you need to remove Microsoft.Data.Schema.UnitTesting and Microsoft.Data.Schema then add Microsoft.Data.Tools.Schema.Sql.dll from C:\Program Files (x86)\Microsoft SQL Server\110\DAC\Bin folder to use. In order to get Microsoft.Data.Tools.Schema.Sql.dll, you need install SQL Server Data Tools, please make sure you install it successfully.

    Best regards,


    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.
    Click HERE to participate the survey.

    • Proposed as answer by Amanda Zhu Tuesday, July 8, 2014 9:37 AM
    • Marked as answer by Amanda Zhu Monday, July 14, 2014 1:53 AM
    Monday, July 7, 2014 5:56 AM

All replies

  • Hi,

    Both DatabaseTestClass and DatabaseTestActions are from the assembly Microsoft.Data.Schema.UnitTesting which is from VS2010 installation rather than other components. You said that you don’t have Microsoft.Data.Schema.UnitTesting.dll under %Program Files (x86)%\Microsoft Visual Studio 10.0\VSTSDB, how did you build the VS2010 solution successfully in VS2010? Before you upgrade, you need to make sure the project can be built and run fine from VS2010. For the issue, I doubt there is anything wrong with your VS2010 installation. You can uninstall and reinstall VS2010.

    In addition, this blog introduces sql server unit testing using VS2010 and 2012 side by side, you can reference it to know how to use custom test conditions in side by side scenarios.

    As for you upgrade VS2010 database unit test to VS2012, actually you upgrade it to sql server data tools like this document: How to: Upgrade a Visual Studio 2010 Custom Test Condition from a Previous Release to SQL Server Data Tools , you need to remove Microsoft.Data.Schema.UnitTesting and Microsoft.Data.Schema then add Microsoft.Data.Tools.Schema.Sql.dll from C:\Program Files (x86)\Microsoft SQL Server\110\DAC\Bin folder to use. In order to get Microsoft.Data.Tools.Schema.Sql.dll, you need install SQL Server Data Tools, please make sure you install it successfully.

    Best regards,


    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.
    Click HERE to participate the survey.

    • Proposed as answer by Amanda Zhu Tuesday, July 8, 2014 9:37 AM
    • Marked as answer by Amanda Zhu Monday, July 14, 2014 1:53 AM
    Monday, July 7, 2014 5:56 AM
  • Hi Crystal,

    Thanks for the reply.

    So you are saying that I need to install VS2010 just for these two assemblies? Which version of VS2010 has these folders? I have VS2010 developer edition, and it does not have them.

    Regards,

                      Patrick

    Monday, July 7, 2014 7:43 AM
  • Hi,

    On my side, it is VS2010 Ultimate. If you also use it, but don't have that dll, I said that I doubt there is anything wrong with your VS installation, I suggest reinstalling VS2010. It is better if you also install VS2010 SP1.

    Thanks,


    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.
    Click HERE to participate the survey.

    Monday, July 7, 2014 8:14 AM