TFS Build error: The type or namespace name 'controls_XXXXX_ascx' does not exist in the namespace 'ASP'

420 views Asked by At

I am getting following error during the TFS build process:

c:\Builds\7\XXXX\CI\src\XXXXX\XXXX.XXXX.Application\Controls\XXXXXX_XXXX.ascx.cs (65): The type or namespace name 'controls_XXXXXX_ascx' does not exist in the namespace 'ASP' (are you missing an assembly reference?)

I suspect following line of the code is not being handled properly during build process:

((ASP.controls_XXXXXX_ascx)this.Parent.Parent.Parent.FindControl("XXXXXX")).Visible = true;

The project gets compiled without any issues, as well as I have made sure that everything is checked in, and the workspace is in complete sync with the source control.

I tried compiling the project both in Debug and Release modes in development environment but it compiled and built successfully both the times. However, its failing on build server with the above error.

1

There are 1 answers

0
Nirman On BEST ANSWER

I found this was an issue with the cyclic reference in user controls. That means, a user control in "Folder A" was referencing to a user control existing in "Folder B", and then another control in "Folder B" was referring to a same/ different control existing in "Folder A". This was resulting into a cyclic reference of DLLs in the website application.