471,318 Members | 3,212 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,318 software developers and data experts.

How to properly update DLL ref?

I have two projects - one is an EXE and the other a DLL. The EXE
references the DLL. I make a change in the DLL and see the version
number change. .20969 for example. In the EXE, I rebuild and see the
DLL reference has the same version. However, when I run the EXE, I
don't see it using new features of the DLL. For example, I may have
added additional information to a string in the DLL. In the EXE, this
new string isn't coming through. Is there something I need to do for
the EXE to be sure it uses the latest and greatest?

Also, I have two VS.NET IDEs open - one for the EXE project and another
for the DLL. When I try to build the DLL, sometimes I get an error
related to not being able to copy to the output folder because it is in
use by another program. I make sure the EXE is not running. Same
error when building the DLL. I close the EXE project. Same error. I
close the EXE VS.NET IDE. Now the error has gone away. Other times, I
can have the EXE running and still be able to build the DLL. One last
thing, I'm copying local on the DLL in the EXE project.

Any ideas?

Thanks,
Brett

Dec 8 '05 #1
5 9540
Brett,

Add both DLL and EXE projects to the same solution. In the EXE reference the
DLL project. Reference it as a Project not the DLL itself.
--
HTH
Stoitcho Goutsev (100) [C# MVP]
"Brett Romero" <ac*****@cygen.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
I have two projects - one is an EXE and the other a DLL. The EXE
references the DLL. I make a change in the DLL and see the version
number change. .20969 for example. In the EXE, I rebuild and see the
DLL reference has the same version. However, when I run the EXE, I
don't see it using new features of the DLL. For example, I may have
added additional information to a string in the DLL. In the EXE, this
new string isn't coming through. Is there something I need to do for
the EXE to be sure it uses the latest and greatest?

Also, I have two VS.NET IDEs open - one for the EXE project and another
for the DLL. When I try to build the DLL, sometimes I get an error
related to not being able to copy to the output folder because it is in
use by another program. I make sure the EXE is not running. Same
error when building the DLL. I close the EXE project. Same error. I
close the EXE VS.NET IDE. Now the error has gone away. Other times, I
can have the EXE running and still be able to build the DLL. One last
thing, I'm copying local on the DLL in the EXE project.

Any ideas?

Thanks,
Brett

Dec 8 '05 #2
Brett,

If you replace the local dll, then it should just use that. Granted,
you won't be able to use new features, but if the general interface is the
same, then whatever results you return from it should be seen.

You aren't storing the dll's somewhere else, are you?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Brett Romero" <ac*****@cygen.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
I have two projects - one is an EXE and the other a DLL. The EXE
references the DLL. I make a change in the DLL and see the version
number change. .20969 for example. In the EXE, I rebuild and see the
DLL reference has the same version. However, when I run the EXE, I
don't see it using new features of the DLL. For example, I may have
added additional information to a string in the DLL. In the EXE, this
new string isn't coming through. Is there something I need to do for
the EXE to be sure it uses the latest and greatest?

Also, I have two VS.NET IDEs open - one for the EXE project and another
for the DLL. When I try to build the DLL, sometimes I get an error
related to not being able to copy to the output folder because it is in
use by another program. I make sure the EXE is not running. Same
error when building the DLL. I close the EXE project. Same error. I
close the EXE VS.NET IDE. Now the error has gone away. Other times, I
can have the EXE running and still be able to build the DLL. One last
thing, I'm copying local on the DLL in the EXE project.

Any ideas?

Thanks,
Brett

Dec 8 '05 #3
These are two different things though. This DLL will be used by other
apps and not specific to this one project. How will adding the DLL
into this project change anything besides debugging?

Also, how do I reference another project rather than a DLL?

Thanks,
Brett

Dec 8 '05 #4
Brett,

You can add a project to more than one solution. You may have some problems
if you use Vusial Source Safe though. I don't know if VSS has real problem
with this but it pops up a warning.

To add reference to a project rather than to assembly first both projects
needs to be in the same solution then you do the same steps that you do when
adding reference to a dll, but in the "Add Reference" dialog box you click
on the Projects tab.
There you should have listed all the projects in the solution that can be
added as references.
However it should work even if you reference the dll. VS checks that date of
modification of the referenced assemblies and if the bin folder contains
older dlls it will replace them with the newer versions. Make sure though
that you close all running isntances of the application before you compile
otherwise VS won't be able to copy the dlls and you'll run the application
with the old ones.

The version that VS shows for the referenced dll is from the copy in the
dll's original folder not from the application's bin folder.
--

Stoitcho Goutsev (100) [C# MVP]

"Brett Romero" <ac*****@cygen.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
These are two different things though. This DLL will be used by other
apps and not specific to this one project. How will adding the DLL
into this project change anything besides debugging?

Also, how do I reference another project rather than a DLL?

Thanks,
Brett

Dec 8 '05 #5
For one project, I'd like to reference the DLL. Whether I use copy
local = true/false, it doesn't update news builds of that DLL. Is
there a way to do this?

Thanks,
Brett

Dec 8 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Phil Powell | last post: by
1 post views Thread by Georges Heinesch | last post: by
1 post views Thread by Waldo Nell | last post: by
2 posts views Thread by Michael D. Reed | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.