locked
The type 'System.Attribute' is defined in an assembly that is not referenced RRS feed

  • Question

  • 1. Open Visual Studio 2013

    2. File > New > Project

    3.Visual C# > Windows Store > Coded UI Test Project

    4. Right click on References > Check  Windows > OK

    After running the test , below error occurs. Could you please suggest any solution.

    "Error 1 The type 'System.Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. "

    Monday, January 13, 2014 1:47 PM

Answers

All replies

  • Hi,

    I can get the same result with you. If I don’t add Windows assembly into Coded UI test project, I won’t get such issue.

    I find a Microsoft Connect: http://connect.microsoft.com/VisualStudio/feedback/details/759695/windows-winmd-cant-be-referenced-from-vs-in-a-desktop-app which said that Windows.winmdcan’t be referenced in a VS desktop app. So I doubt that  we can't use Windows.UI.Xaml.Media.Imaging in Coded UI test or we need to add something more.

    To get the issue confirmed and diagnose by product team, you also can  create connect report for it. You will get email notification for update.http://connect.microsoft.com/VisualStudio/feedback/CreateFeedback.aspx, if you submit it, you could share us the link here, so we could know the latest information from the Product team expert. And I will help you to vote it.

    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 Thursday, January 16, 2014 6:55 AM
    • Edited by Amanda Zhu Monday, January 20, 2014 1:00 AM edit
    • Marked as answer by Amanda Zhu Monday, January 20, 2014 1:01 AM
    Tuesday, January 14, 2014 3:34 AM
  • Try to install Microsoft .NET Framework 4.5.2 Developer Pack at https://support.microsoft.com/en-us/kb/2971005/

    Tornar o simples complicado é facil, tornar o complicado simples é criatividade, vontade e conhecimento

    Wednesday, April 29, 2015 12:16 PM