VB6 DLL versus VB.NET DLL

  • Thread starter Thread starter Chris Zopers
  • Start date Start date
C

Chris Zopers

Hello,

I would like to know the following:

In VB 6 I could create a dll file, place it on a server and register the
dll file on each client computer, so all client computers know that the
dll file is on the server.
This way, I could make small changes to the dll, without having to
reïnstall components on the client.

In VB.NET, each dll is automatically being copied to the /bin directory
in the directory where the executable file is located. This means that
the dll file also is located on the client machine. When I have made
small changes to the dll, I have to recompile the executable file and
install a new version of the executable and the dll file to each client.
Isn't there a way to make changes to a dll without having to recompile
and redistribute to client machines?

Greetings,
Chris
 
What you're seeing is an intended behaviour of .NET that permits
side-by-side installation of many different versions of a program.

If you don't want this sort of thing to happen you should...

#1 remove the asterisks from the version number generation string in
AssemblyInfo.xx and lock the version to a number that you decide. This will
prevent many different versions being generated.

#2 Give your DLL a strong name and deploy it to the Global Assembly Cache
(GAC) where it will be used to provide ALL applications with services as
opposed to just the application that was build for the specific version
x.x.x.x.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
Hello Bob,

Your solution will solve my problem on one client machine, but when I
install my dll in the GAC, I think it is still available to only one
client machine (or am I wrong in this?).

What I would like is that a dll is placed on a server and that all
client computers are linked to that dll on the server, and that a change
in the dll can immediately be used by the executable on each client,
without having to redistribute the executable to each client.

Is this possible?

Greetings,
Chris
 
No, haven't tried it yet,

But now I think of it, I can install a dll that is located on a server
in the GAC with the regasm.exe tool, just like I would register a VB 6
DLL with regsvr. Than my problem would indeed be solved. Am I right?
(can't check it right now, too busy with another project....)

Greetings,
Chris.
 
You can place the exe and dll on a network share and all other computers run
the app from there. It is simple and you only keep one copy of production
code running. I do this to a few smaill offices (10 to 30 computers) for all
my .NET apps (you know how many bugs/fixes/changes would be needed if you
were the only developer/tester for these apps). The computer (server) where
the app's exe/dll is held is merely a file server in this case.

By default in .NET, if the code is from other somewhere outside the computer
is considered not safe and you need to do some configuration for this, using
..NET configuration in control panel. Usually, I give a specific shared
folder "full trust" that holds all my .NET apps, and users only have
"read/execute" permission on that folder. You can give full trust to only
that specific app, though.

Of course you need do some security configuration change (
 
Back
Top