User Controls - Debug vs Release

G

Guest

I've got a solution with two projects. One project is a DLL that provides
services. It contains an User Control that provides a UI to some of these
services. The other project is an applet on which I've placed this User
Control. The reference from this project to the other is a 'project'
reference. I developed everything in debug - everything worked - life was
good. Then I built a release version and life has taken a change for the
worse.

The first symptom is that the control no longer draw in the designer.
Usually I can drop another instance from the toolbox and it will draw.
However, sometimes I get the following message box;

---------------------------
Microsoft Development Environment
---------------------------
The user control 'RDTA.ReportingServices.PdpDataExtension.PdpQueryControl'
could not be loaded. Ensure that the library containing the control has been
built and a project reference has been made to the library containing the
control. If you have changed the name of the user control, close and re-open
the control's designer to update the toolbox item.
---------------------------
OK
---------------------------

I've closed everything and rebuilt everything (I verified in the \bin\debug
and \bin\release folders). I've checed the reference (it was added as a
'project' reference) and it is to the respective \bin directory. Local copies
of all the dependancies exist in the respective \bin directory too.

So, what is the problem and how do I fix it?
 
G

Guest

Prior to this new set of symptoms, when I attempted to drop an instance of
the User Control onto my test app, I often ran into the following problem. I
never resolved it - just traded it for a new symptom. Perhaps they are
related.

I have a user control that will not instantiate when I drop it on a form at
design time, however, it will create fine at runtime.

I do not understand the following error messages that appears both as a
message box when I drop the user control, and in the Task window both after
dropping it and whenever showing the form in the designer.

An exception occurred while trying to create an instance of
RDTA.ReportingServices.PdpDataExtension.PdpQueryControl. The exception was
"Destination array was not long enough. Check destIndex and length, and the
array's lower bounds.".

I don't know what array they would be referring to, nor do I have an
instance of "destIndex" anywhere in my code.
 
G

Guest

Another interesting piece of the puzzle.

I've modified the control to look different in Debug and Release modes. The
control is NOT display in the designer in either debug or release modes. It
does display when running in either mode. Interestingly, it is always the
debug version - even in release.

Previously I had stated that I verified that the project reference was to
the appropriate \bin\debug or \bin\release folder - correction - it is to the
appropriate \obj\debug or \obj\release folder.

I've deleted the control, and now I'm back to the state where I can't drop a
new instance of the control on the form without getting the darn error
message. I'm hosed.
 
G

Guest

Some more information.

The DLL is strong named!

Strong naming both a debug and a release version seams a little odd to me.

Putting local copies of it in \bin\debug and \bin\release doesn't really
make sense to me.

The project reference is it to a PDB (not DLL) in \obj\... However, that
file does NOT exist in \obj\..! It exists in \bin\..! I've removed the
project reference and re-added it and no change.

Interestingly, when I drag-n-drop another instance of the control (and get
the errors), VS.NET adds the dependancies to the references for me (in this
case Microsoft.ReportingServices.Designer and
Microsoft.ReportingServices.Interfaces). I guess this is good.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top