Solved

In VB.Net, is it possible to rename a dll and reference it with new name?

Posted on 2013-05-13
6
716 Views
Last Modified: 2013-05-14
Hi Experts.   In VB.Net, is it possible to rename a dll, reference it in your program with the new name and then use it in the normal way?   I have tried it and it seems to work OK.   I'm just wondering if there is some reason why it might fail at some point.  Thanks for your help.
0
Comment
Question by:PNRT
  • 2
  • 2
  • 2
6 Comments
 
LVL 9

Expert Comment

by:skipper68
ID: 39162878
Although possible, if you didn't build the dll, I would recommend against re-naming it.  It may work today, but next year when a microsoft update breaks and you can't figure out why, it may cause you headaches to find out that renaming is no longer supported.  Just a thought.

Of course, if you have the code, just rebuild it and redeploy the dll file.
0
 
LVL 9

Expert Comment

by:skipper68
ID: 39162881
If it is a .NET dll, open the source code project in Visual Studio.  In the Menu Bar, click on Project -> [Project name] Properties.  Click the 'Application' tab on the left-hand side, and change the Assembly name and Root Namespace as you please.

the Assembly name is the file name for the DLL, and Root Namespace is the namespace path of the code in the DLL (e.g., what you would have to type if using an Imports (VB) or using (C#) statement).  Note that if you change the Root Namespace, you will have to change your current code that accesses this DLL.

After changing those, simply save the project and rebuild it, then add the new DLL as a reference in your other project(s).
0
 
LVL 1

Author Comment

by:PNRT
ID: 39163751
Hi, thanks for your replies. With your second answer, I cant actually open the dll in VS so I'm assuming that's what I should do if I have the source code?   I don't so I suppose the only way would be to try and decompile it?
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 83

Expert Comment

by:CodeCruiser
ID: 39164233
Are you renaming the dll FILE and then referencing that file? In that case, I don't see any problem.
0
 
LVL 1

Author Comment

by:PNRT
ID: 39164250
Hi, yes I am renaming a original dll file and then referencing that dll by the new name in my program.   I was just wondering if that would cause a problem
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 39164342
It should not cause any issues generally speaking.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
This video discusses moving either the default database or any database to a new volume.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now