VS 2010 CodedUI converted to >> VS 2012 CodedUI gives an erorr: Could not load file or assembly 'Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0'

Locked VS 2010 CodedUI converted to >> VS 2012 CodedUI gives an erorr: Could not load file or assembly 'Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0'

  • Tuesday, September 11, 2012 10:58 PM
     
     

    Hello,
    none of my VS2010 CodedUI solutions/projects work in VS2012.

    Here is a problem. I have been using VS2010 CodedUI tests for a while and have many test solutions. I have installed VS2012 and tried to open and run VS2010 solution in VS 2012. The system converts VS2010 >> VS2012 fine. But when trying to run 2010 project in 2012 I get an error. The same error I get if I open VS2010 project, that will be converted to VS2012 project, and try to add a new project.  To sum it up: non of my VS2010 UI Projects work in VS2012.

    Desktop is running Windows7 professional 64 bit.
    Visual Studio 2012 was completely (with all features) installed.

    What I have tried: 

    1. Tried on different machines. Still got same error.
    2. Tried to install Visual Studio 2012 on top of Visual Studio 2010. Still got same error.
    3. Created very very simple CodedUI test in VS2010 (that clicks 2 buttons on windows calculator) and tried to open and run it in VS2012. Still hot same error: Could not load file or assembly 'Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0'

    4. I checked culture on my machines, all of them have the same culture English(United States).

      I believe that bug should be pretty easy to repro by creating a simple CodedUI test in VS2010 and trying to run it in VS2012. 

      Thank you!

All Replies

  • Thursday, September 13, 2012 7:48 AM
    Moderator
     
     

    Hi Serge,

    Thank you for posting in the MSDN forum.

    Just to make this issue clearly, if you run this coded UI test in VS2010, whether it worked well?

    If you try to create a new same coded UI test in the VS2012, does it work well?

    As far as I know, the VS2012 supported the coded UI project created in the VS2010, I also try to create a simple coded UI test in the VS2010, and then update it to VS2012, and it worked well.

    If all test projects have this issue, I doubt that it is related to your VS2012 installing.

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us

  • Thursday, September 13, 2012 5:32 PM
     
     

    Jack, 

    thanks for your reply. 

    If I try a new same code UI test in VS2012 it works well. 

    If I run coded UI test in VS2010 it works good as well. I have many of those and all run well. 

    Jack, can you try on a clean VM snapshot with only VS2010 and VS 2012 installed ? Just a very simple calculator test. 

    I tried on 3 machines, 2 of them were clean VMs. No luck.  

  • Thursday, September 13, 2012 5:59 PM
     
     
    You have been trying with the right steps to approach towards a solution but I see something missing here. We had run into similar issues when we migrated from VSTS Beta to VSTS2010 and there was a plugin which we used to make it work. Can I know as to what error message you are receiving ? 

    abhinav

  • Thursday, September 13, 2012 6:27 PM
     
     

    Erorr: Could not load file or assembly 'Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0'

    I previously migrated from VS2010 Beta to VS2010 with no issues. 

    It should be very easy to repro: any Coded UI 2010 test will not run on VS 2012. 

    And I tried this on different machines. It's not just my box. 

    Thanks! 

  • Friday, September 14, 2012 6:21 AM
    Moderator
     
     

    Hi Serge,

    I also try to repro it in another PC which installed the VS2010 and VS2012, but it still worked well.

    I suggest you try to Clean and Rebuild your project in the VS2012 and check it.

    If all test projects have the same issue, if possible, I suggest you try to repair your VS2010/VS2012 and check it again. You could try to run the following step in the command line.

    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.

    If still no help, could you try to move a test project created in the VS2010 to another PC which just installed the VS2012? Check the result. I doubt that it is related to the installed assembly. Of course, if possible, you could share us a project created in your VS2010 with the sky driver, I will try to run it in the VS2012.

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us

  • Friday, September 14, 2012 11:07 PM
     
     

    Hello, Zack,

    I asked one of my colleagues to run my VS2010 test solution/project on her freshly installed VS2012. She got just the same results as I got. It converts with warnings and then crashes while running.

     Configuration:

    VS 2010 Ultimate (installed with all options)

    VS 2012 Professional (installed with all options)

    Windows 7 64 bit machines. 

    Please, make sure you have Microsoft.VisualStudio.TestTools.UITest.Extensionin your test project and that it will run OK in both vs2010 and vs 2012.

  • Monday, September 17, 2012 6:35 AM
    Moderator
     
     

    Hi Serge,

    Glad to receive your reply.

    Please, make sure you have Microsoft.VisualStudio.TestTools.UITest.Extensionin your test project and that it will run OK in both vs2010 and vs 2012.

    I make sure that it has the Microsoft.VisualStudio.TestTools.UITest.Extensionin, since it worked well in my PC, so I suggest you try to repair your VS and check it again.

    If no help, you can submit this feedback to Microsoft Connect feedback portal: http://connect.microsoft.com, Microsoft engineers will evaluate them seriously. Thanks for your understanding. If possible, you could share us a simple app and your test project created in the VS2010, we try to run it in the VS2012. If I get the same issue, I will vote your feedback.

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us

  • Monday, September 17, 2012 9:25 AM
     
     
    I think this is because of the version corruption of your references. When u had installed VS 2012 , i think it would use the Version = 11.0 , try seing which version of the reference your solution is having in the properties section. If its 11.0 , re move it and add 10.0 references and then it should complile
  • Friday, September 21, 2012 11:10 PM
     
     

    Jack,
    See screenshot attached.

    I think you are close to solution. Indeed, it says that I need version 10.0.0.0.

    Including "old" assembly from VS2010 does not help. I dropped version 11.0.0.0 and added a reference to version 10.0.0.0 and do a full rebuild. It compiled just fine. But I am still getting the same error message while running the test.

    I was also trying to enable assembly logging but it looks like I do not have a key in regedit. Do I have to add the key ?See screenshot attached.

    THank yoU!

    -Serge

  • Monday, September 24, 2012 2:46 AM
    Moderator
     
     

    Hi Serge,

    I was also trying to enable assembly logging but it looks like I do not have a key in regedit. Do I have to add the key ?

    I couldn’t repro this issue, so I’m no very sure whether it is related to the Registry Editor.  I doubt that it is related to the VS installing. Did you install the VS2010/VS2012 in the default path? If possible, I suggest you repair your VS and install the VS2010 SP1 and VS2010 FP2, check it again. But if still no help, submit this feedback to Microsoft Connect feedback portal: http://connect.microsoft.com, Microsoft engineers will evaluate them seriously.

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us

  • Tuesday, September 25, 2012 7:30 PM
     
     Answered

    Well,

    I actually ported the whole my framework manually to VS2012 (by creating a new project there). So, I am fine.

    I found out that it has to do with my version of VS2012 Premium edition as VS2012 Ultimate edition works fine. We had one and the same Premium edition on all machines and that explains why it didn't work for none of us in our team.

    Everyone, thanks for your help!

  • Tuesday, October 16, 2012 6:46 AM
     
      Has Code

    HI Jack 

    i'm facing the same issue. Please find the steps to reproduce.

    Create a class librabry in VS2010 and a coded UI test suite

    class libarary shall have these methods

            public static void clickLinkByHref(object browser,string href)
            {
                HtmlHyperlink link = new HtmlHyperlink((BrowserWindow)browser);
                link.SearchProperties.Add(HtmlHyperlink.PropertyNames.Href, href, PropertyExpressionOperator.Contains);
                Mouse.Click(link);
            }
            public static object GetBrowserObject(string url)
            {
                BrowserWindow browser = BrowserWindow.Launch(new Uri(url));
                return (object)browser;
            } now consume these methods in testsuite. It works fine in 2010.. now convert the solution to 2012 and now click link method wont work. Let me know if you need more details