locked
VS2012 breaks compilation in VS2010 RRS feed

  • Question

  • Hi,

    I installed trial version of VS2012 - ultimate lately to evaluate Coded UI accessibilty issues for some controls.

    However after running the set up i am unable to compile my code base in VS 2010.

    The error seen while building the solution for every project is as follows:

    Error loading <dll or ordered test file> Unable to load the test container <dll or ordered test file> or one of its dependencies. Error details: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestTools.UITesting, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

    Is there an easy fix for this? I do not wish to get into uninstalling VS2012 or re-installing VS2010.

    Also I am using VS2010 with SP1. And There are no references to TFS assemblies in the projects, and the solution has not been opened in VS2012.

    Thanks and Regards,

    Neha.


    Neha Rana

    Sunday, January 20, 2013 9:17 AM

Answers

  • Hi Neha,

    Glad to receive your reply.

    Just to make this issue clearly, you create a solution with some test projects in VS2010, it worked well before you installed the VS2012, and then you installed the VS2012, but the test projects didn’t work well if you build it in VS2010, am I right? Actually you didn’t updated this solution in VS2012, am I right?

    To make sure that it is not the VS setup issue, I suggest you restart your machine, and then run your VS2010 in safemode, and then create a single test project, and then build it, whether it worked well? I mean that if all test projects in VS2010 have the same issue, I’m afraid that it is related to the installing.

    I involved the VS setup expert, the result is that it doesn’t have the limitations when we install the VS2010 and VS2012 in the same machine. Of course, we need to install the VS2010 SP1 for the VS2010. Maybe you could try to check it with the following steps:

    You need locate to the IDE folder then run these commands, or you can set path to the system environment.

    C:\Program Files (x86)\Microsoft Visual Studio 10.0(Microsoft Visual Studio 11.0)\Common7\IDE

     

    Devenv.exe /SafeMode: Launches the IDE in safe mode loading minimal windows.

    Devenv.exe /ResetSettings: Restores the IDE's default settings, optionally resets to the specified VSSettings file.

    Devenv.exe /ResetAddin: Removes commands and command UI associated with the specified Add-in.

    Devenv.exe /ResetSkipPkgs: Clears all SkipLoading tags added to VSPackages.

    After these, you can create a new test project in a new workspace to avoid if there’re any problems of the old workspace settings. And then build it again.

    If still no help, I’m afraid that it will be related to your VS setup. Actually I installed the VS2010 and VS2012 in the same machine, but all test projects worked well. As you said that it worked well after you uninstall the VS2012, I suggest you repair/re-install it, check it again. Hope it could help.

    But if this just specific solution has this issue, maybe you could share us a simple sample, I will try to build it in my machine.

    Best Regards,


    Jack Zhai [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.

    Monday, January 21, 2013 8:15 AM

All replies

  • Hi Neha,

    Since you open the test project with VS2012 which is created in VS2010, you would check whether you reference the .dll file with the correct versions in your project.

    Reference:

    http://qa.social.msdn.microsoft.com/Forums/nb-NO/vstest/thread/96df7ba7-94f0-4d4a-af8d-821c5acd253e

    http://qa.social.msdn.microsoft.com/Forums/en-GB/vsautotest/thread/6e125c9d-c071-49f6-b64a-1aba828c2f5b

    Best Regards,


    Jack Zhai [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.

    Monday, January 21, 2013 5:50 AM
  • Hi Jack,

    I havent opened the test project in question here in VS2012 yet.

    Also the references do not show an error in VS2010.

    Thanks,

    Neha.


    Neha Rana

    Monday, January 21, 2013 7:01 AM
  • Hi Neha,

    Glad to receive your reply.

    I havent opened the test project in question here in VS2012 yet.

    It seems that I misunderstood this issue, do you mean that you don’t open the project in VS2012 which is created in VS2010? If so, how about creating a simple test project in VS2010? To make this issue clearly, would you mind sharing us the detailed steps to repro this issue? I will try to check it in my machine. Thanks for your understanding.

    Best Regards,


    Jack Zhai [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.



    Monday, January 21, 2013 7:28 AM
  • Hi Jack

    Surely..this is what i have done.

    I have a .sln file consisting of various test projects that was implemented using VS2010.

    I installed VS2012 ultimate on my machine and launched it to use the new Coded UI Builder. I havent done anything apart from this in VS2012 yet.

    When i try to build the VS2010 solution (after VS2012 was installed) i get the following error for all the test projects:

    Error loading <dll or ordered test file> Unable to load the test container <dll or ordered test file> or one of its dependencies.

    Error details: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestTools.UITesting, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

    The error here is seen for the project .dll and the ordered test file (every project has an ordered test).

    When i check the references in the solution explorer in VS2010, they aren't broken.

    Also after i uninstall VS2012, i am able to build the solution.

    I hope this helps..let me know in case you need any more information. I would really like to have both VS2010 and VS2012 running on my development machine.

    Thanks,

    Neha.


    Neha Rana

    Monday, January 21, 2013 7:48 AM
  • Hi Neha,

    Glad to receive your reply.

    Just to make this issue clearly, you create a solution with some test projects in VS2010, it worked well before you installed the VS2012, and then you installed the VS2012, but the test projects didn’t work well if you build it in VS2010, am I right? Actually you didn’t updated this solution in VS2012, am I right?

    To make sure that it is not the VS setup issue, I suggest you restart your machine, and then run your VS2010 in safemode, and then create a single test project, and then build it, whether it worked well? I mean that if all test projects in VS2010 have the same issue, I’m afraid that it is related to the installing.

    I involved the VS setup expert, the result is that it doesn’t have the limitations when we install the VS2010 and VS2012 in the same machine. Of course, we need to install the VS2010 SP1 for the VS2010. Maybe you could try to check it with the following steps:

    You need locate to the IDE folder then run these commands, or you can set path to the system environment.

    C:\Program Files (x86)\Microsoft Visual Studio 10.0(Microsoft Visual Studio 11.0)\Common7\IDE

     

    Devenv.exe /SafeMode: Launches the IDE in safe mode loading minimal windows.

    Devenv.exe /ResetSettings: Restores the IDE's default settings, optionally resets to the specified VSSettings file.

    Devenv.exe /ResetAddin: Removes commands and command UI associated with the specified Add-in.

    Devenv.exe /ResetSkipPkgs: Clears all SkipLoading tags added to VSPackages.

    After these, you can create a new test project in a new workspace to avoid if there’re any problems of the old workspace settings. And then build it again.

    If still no help, I’m afraid that it will be related to your VS setup. Actually I installed the VS2010 and VS2012 in the same machine, but all test projects worked well. As you said that it worked well after you uninstall the VS2012, I suggest you repair/re-install it, check it again. Hope it could help.

    But if this just specific solution has this issue, maybe you could share us a simple sample, I will try to build it in my machine.

    Best Regards,


    Jack Zhai [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.

    Monday, January 21, 2013 8:15 AM