locked
Using a VS2010 Unit Test Extension in VS2012 fails RRS feed

  • Question

  • Hi,

    I have developed an extension for MSTest in VS2010 that simulates the same behaviour as TestCase does in NUnit, which works perfectly in VS2010.

    But now we are migrating to VS2012, and when we tries to run the unit tests that uses this TestCase extension we're getting an errormessage stating:

    "Failed to initialize the unit test extension 'urn:TestCaseClassAttribute': A unit test extension is not registered for the following attribute: TestCaseExtension.TestCaseClassAttribute.

    Obviously there is something wrong with the registering of my TestCaseClass attribute, but I can't find any information on how to register this in VS2012. In 2010, it was enough with some registry keys and putting the assembley in a folder. But I have tried doing the same in VS2012 without any luck.

    Does anyone know how I can get my VS2010 unit test extension to work in vs2012?

    As I understand it, VS2010 unit tests runs in some kind of legacy mode in VS2012 using an QTAgent running the test, does this need some configuration?

    A another thing, where can I find any information on creating native unit test extensions for VS2012?

    Any help or pointing in right direction is appreciated,


    --Rune

    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful" if the post helped you to a solution of your problem.

    Thursday, January 10, 2013 10:46 AM

Answers

  • After worked with this as a support case together with Microsoft I found that the problems was that the assembly was compiled for use with the Visual Studio 2010 *QualityTools* assemblies which didn't existed on my Visual Studio 2012 computer. This caused a FileNotFoundException on one of the QualityTools assemblies (the exception was well  hidden), and wasn't easy to spot.

    I upgraded the extension project to 2012 and the unit test project to .NET 4.5 (since the QualityTools assemblies is bound to .NET 4.5) and everything worked (can still unit test .NET 4.0 project with .NET 4.5 unit test project).

    There was a problem that the ExtensionView system that exists in the extension system in 2010 isn't visible in 2012, but I worked around this problem by providing more information on a earlier level, so I don't use the ExtensionView system anymore.


    --Rune

    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful" if the post helped you to a solution of your problem.

    Monday, March 25, 2013 1:00 PM

All replies

  • Hi Rune,

    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, January 11, 2013 3:44 AM
  • Thanks!

    --Rune

    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful" if the post helped you to a solution of your problem.

    Friday, January 11, 2013 9:33 AM
  • Regarding your plugin  from a support perspective this is really beyond what we can do here in the forums. If you cannot determine your answer here or on your own, consider opening a support case with us. Visit this link to see the various support options that are available to better meet your needs:  http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone

    Please see:

    Unit Testing Enhancements in Visual Studio 11

    http://blogs.msdn.com/b/jasonz/archive/2012/05/22/my-favorite-features-unit-testing-enhancements-in-visual-studio-11.aspx

    Thank you

    Thursday, January 24, 2013 7:13 PM
  • Sorry for this extremely late response, I have been totally busy with other things.

    But I have reported this using the support now; when I get an answer I'll post it here for future reference for others!


    --Rune

    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful" if the post helped you to a solution of your problem.

    Thursday, March 21, 2013 9:33 AM
  • After worked with this as a support case together with Microsoft I found that the problems was that the assembly was compiled for use with the Visual Studio 2010 *QualityTools* assemblies which didn't existed on my Visual Studio 2012 computer. This caused a FileNotFoundException on one of the QualityTools assemblies (the exception was well  hidden), and wasn't easy to spot.

    I upgraded the extension project to 2012 and the unit test project to .NET 4.5 (since the QualityTools assemblies is bound to .NET 4.5) and everything worked (can still unit test .NET 4.0 project with .NET 4.5 unit test project).

    There was a problem that the ExtensionView system that exists in the extension system in 2010 isn't visible in 2012, but I worked around this problem by providing more information on a earlier level, so I don't use the ExtensionView system anymore.


    --Rune

    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful" if the post helped you to a solution of your problem.

    Monday, March 25, 2013 1:00 PM