ASP.Net Server Control (Web Custom Control) Code Update Problem

P

Pete Mahoney

I have created a new Server Control or Web Custom Control, and
everything with the control itself works great. The problem is if I
want to change any of the code in my Server Control none of the
projects that pull in this control see the changes. Just for kicks
say I want to add the following line to my Server Control

Page.Response.Write("Hi there")

Well if I add this line of code, and say 5 .Net projects are pulling
in this server control none of these projects will display the message
"Hi there" until I go into each project remove the reference to the
old .Dll for the server control, and readd the .Dll for the updated
server control.

So each project is creating its own local copy of this .Dll and then
referencing that. I would like them all to reference ONE global copy,
and when I change that copy it updates all my projects.

Is there a way to do this? If so any links that show how to do it
would be great.
 
L

Levi Rosol

how are your projects setup? do you have one solution with all 5
projects, and the web control project in it?

If so, it sounds like you need to change the build order and
dependencies so that the control gets built first, and then the
web projects, and also so that each web project relies on the
control project.

To do this, assuming you have all projects in one solution, right click
on any one project or the solution, and select "Project Build Order"
Make sure that your server control project is the first one. Click OK.

Then, for each web project that needs the latest and greats of your
uber server control, right click on the project and select "Project
Dependencies". Put a check mark next to your server control project
and click OK.

Keep in mind that VS creates a solution for ever project you start. There
is no reason at all why you could not add your server control project to
each and every web solution you have instead of keeping them all in one
solution as I described above. Even though this would seem like duplication
of code, it's not because you are point to the same server control codebase,
just from 5 different locations.

Hope this helps.

--
Thanks
Levi Rosol

Find Cheap .Net Server Controls At:
http://www.IvelDesigns.com
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top