Website is building normally but not during publish

76 Views Asked by At

I have developed a usercontrol in ASP.NET and used LoadControl to dynamically add the control to a page. When I want to read the usercontrol data (properties) I cast page control to its type like this:

 ((ASP.ucMultiSelectCallback)crtl)  

The website is building and working correctly but when I want to Publish the website , during its automatic build action, it faces error on the line of code I mentioned. The Error is

" the type or namespace does not exist ,are you missing an assembly reference "

what should I do?

1

There are 1 best solutions below

0
On

I think you have a probmel in compiled code. Be sure that when you test application it uses "Release" mode, because I think you publish and release mode.