0

I'm trying to set up Jenkins with MSBuild plugin. I got Jenkins to check out solution from repository and run a build. But every build fails with several

error CS0433: The type 'CustomControls_WarningPopup' exists in both (...)

WarningPopup is an .ascx defined twice - once per web site project, and there are two website projects in the solution. The thing is this never rises any problems when compiling whole solution from VS2010. Should I run MSBuild with some specific parameters to make it behaving like VS?

I already tried moving Temporary ASP.NET files to custom folder (like in this answer) and it didn't help. Probably I'm missing something obvious to CI experts here...

Community
  • 1
  • 1
Episodex
  • 4,479
  • 3
  • 41
  • 58
  • How are you building the project with MSBuild? Can you show us the script? – jrummell Jul 23 '12 at 13:01
  • I just create build step in Jenkins using MSBuild and as input I use my .sln file. I must point out that I'm very new to CI... – Episodex Jul 23 '12 at 13:03

1 Answers1

1

I found the cause. There was another UserControl in second project which accidentally inherited class of the same name. Both controls were in the same directory and nor Visual Studio during compilation nor ReSharper saw anything wrong with this. Moreover MSBuild threw errors in both Web Projects despite the duplicated control was in only one of them. The funniest part is that this situation was like this for months and never rised any problems...

Anyway changing class of this control solved the issue and finally automated build succeeded!

Episodex
  • 4,479
  • 3
  • 41
  • 58