Error building due to duplicate pages.g.cs file?

5 posts, 1 answers
  1. Alex
    Alex avatar
    24 posts
    Member since:
    Aug 2010

    Posted 17 Aug 2011 Link to this post

    I'm getting the following build error whenever I try to build my project  

    "Error 1 The item "Pages.g.cs" was specified more than once in the "Sources" parameter.  Duplicate items are not supported by the "Sources" parameter. c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.CSharp.targets 160 9

    Everything I've read online indicates that there is a second reference to Pages.g.cs in the .csproj file or a duplicate .resx file is in the project. I've checked both numerous times and have been unable to resolve the issue.... HELP!

    I can see that pages.g.cs is listed twice in the build log, but I'm completely at a loss as to why.
  2. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 18 Aug 2011 Link to this post

    Hello Alex,
        the quickest way to get this resolved would be for you to send us your entire test project. Since you're experiencing a compilation issue we'll be able to to reproduce the issue without require access to the app that's under testing. We can analyze the issue and resolve it for you.

    If you don't want to share your test project on a public forum I can go ahead and provide you with an e-mail account to send me the project.

    Best wishes,
    Stoich
    the Telerik team
    Vote for Telerik Test Studio at the Annual Automation Honors Voting!
  3. Alex
    Alex avatar
    24 posts
    Member since:
    Aug 2010

    Posted 18 Aug 2011 Link to this post

    Stoich

    Please send me a private email and I will send you the project.

    Thank you,
  4. Answer
    Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 22 Aug 2011 Link to this post

    Hi Alex,
        in order to resolve this error you have to exclude Pages.g.cs from your project files (screenshot 1).
    Pages is already included automatically as part of Import:
    <Import Condition="true" Project="$(MSBuildExtensionsPath)\Telerik\WebUITestStudio\Telerik.WebUITestStudio.targets" />
     
    Greetings,
    Stoich
    the Telerik team
    Vote for Telerik Test Studio at the Annual Automation Honors Voting!
  5. Alex
    Alex avatar
    24 posts
    Member since:
    Aug 2010

    Posted 23 Aug 2011 Link to this post

    That worked great! Thanks!
Back to Top