views:

25

answers:

1

during debug in cassini the code runs fine, but when I explictly build it, the compile breaks on an object saying it can't find the reference. During a breakpoint shows the proper reference to the object, and I can view the debug intellisense.

The code itself is simple

using CFTW.Controls;
...
controls_LatestPresentations c = LoadControl("~/controls/LatestPresentations.ascx") as controls_LatestPresentations;
c.loadContent();
return RenderControl(c);

The control is a simple user control, with the namespace CFTW.Controls. The calling code is in a webcontrol, which lives in the same folder. I even tried adding the calling code to the same namespace.

EDIT: The biggest issue is that I cannot publish the dll's. Well, at a high level anyway.

A: 

If you're using a web site (created by File->Create Web Site), then you are not using a project. Unlike every other project type in Visual Studio, web sites don't have project files, and don't actually build until runtime.

John Saunders
Then why does ctrl+shift+B blow up, as well as publish, but loading the page and control doesn't?
Steve Syfuhs