locked
What is the need of GeneratedCode("Coded UITest Builder", "11.0.51106.1") attribute RRS feed

  • Question

  • Hi,

    We would like to know what is the actual significance of GeneratedCode("Coded UITest Builder", "11.0.51106.1") attribute which comes for the UIMap class.

    We have generated the test project in 2012 and this attribute has the version "11.0.51106.1" where as if the project is generated in 2010 we see the attribute having the version "10.0.40219.415".

    Will the tests created in 2012 run fine on 2010 even if there is a version change?

    Any help is appreciated.

    Regards,

    Sirisha


    sirisha

    Wednesday, April 17, 2013 5:11 AM

Answers

  • Hi Amanda,

    The project created in 2012 will target to .Net 4.5. So, when you open the solution on  machine with 2010 it will fail because it has the .Net version 4.0.

    Change the target version to 4.0 and open it in 2010 environment. It works. We were able to open the test projects.

    Could you please tell the significance of GeneratedCode attribute in the test projects?

    Regards,

    Sirisha


    sirisha

    • Marked as answer by Amanda Zhu Wednesday, April 24, 2013 9:58 AM
    Friday, April 19, 2013 7:29 AM
  • Hello,

    Glad to receive your reply.

    Please see:

    GeneratedCodeAttribute Class

    It identifies code generated by a tool. Its constructor initializes a new instance of the GeneratedCodeAttribute class specifying the name and version of the tool that generated the code.

    So I think that GeneratedCode("Coded UITest Builder", "11.0.51106.1") means that the code is generated by VS2012 Coded UI Test Builder tool.

    Also you can see: http://stackoverflow.com/questions/2388148/what-is-the-utility-of-the-attribute-generatedcodeattribute-in-c

    Hope it can help you.

    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.

    • Marked as answer by Amanda Zhu Wednesday, April 24, 2013 9:58 AM
    Friday, April 19, 2013 7:40 AM

All replies

  • Hello,

    Thank you for your post.

    GeneratedCode("Coded UITest Builder", "11.0.51106.1") attribute and GeneratedCode("Coded UITest Builder", "10.0.40219.415") attribute is desired in VS2012 and VS2010 coded UI test. As my personal point of view, it could be used to declare which version of VS the test project is created.

    And I am afraid that we can’t straightforwardly run VS2012 coded UI test from VS2010 successfully. When you open VS2012 coded UI test project from VS2010, there is an error: The project is incompatible with the current version of Visual Studio. You can try that on your side.

    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.


    • Edited by Amanda Zhu Friday, April 19, 2013 7:40 AM
    Thursday, April 18, 2013 5:25 AM
  • Hi Amanda,

    The project created in 2012 will target to .Net 4.5. So, when you open the solution on  machine with 2010 it will fail because it has the .Net version 4.0.

    Change the target version to 4.0 and open it in 2010 environment. It works. We were able to open the test projects.

    Could you please tell the significance of GeneratedCode attribute in the test projects?

    Regards,

    Sirisha


    sirisha

    • Marked as answer by Amanda Zhu Wednesday, April 24, 2013 9:58 AM
    Friday, April 19, 2013 7:29 AM
  • Hello,

    Glad to receive your reply.

    Please see:

    GeneratedCodeAttribute Class

    It identifies code generated by a tool. Its constructor initializes a new instance of the GeneratedCodeAttribute class specifying the name and version of the tool that generated the code.

    So I think that GeneratedCode("Coded UITest Builder", "11.0.51106.1") means that the code is generated by VS2012 Coded UI Test Builder tool.

    Also you can see: http://stackoverflow.com/questions/2388148/what-is-the-utility-of-the-attribute-generatedcodeattribute-in-c

    Hope it can help you.

    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.

    • Marked as answer by Amanda Zhu Wednesday, April 24, 2013 9:58 AM
    Friday, April 19, 2013 7:40 AM