This is a migrated thread and some comments may be shown as answers.

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

4 Answers 222 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 17 Aug 2011, 09:32 PM
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.

4 Answers, 1 is accepted

Sort by
0
Stoich
Telerik team
answered on 18 Aug 2011, 09:40 AM
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!
0
Alex
Top achievements
Rank 1
answered on 18 Aug 2011, 02:04 PM
Stoich

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

Thank you,
0
Accepted
Stoich
Telerik team
answered on 22 Aug 2011, 05:23 PM
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!
0
Alex
Top achievements
Rank 1
answered on 23 Aug 2011, 02:34 PM
That worked great! Thanks!
Tags
General Discussions
Asked by
Alex
Top achievements
Rank 1
Answers by
Stoich
Telerik team
Alex
Top achievements
Rank 1
Share this question
or