Solved

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

Posted on 2013-05-13
6
751 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 2

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
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 
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 2

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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
update textboxes with Streamreader 21 47
VB.Net - Project Software to help the Developer 7 36
VB.Net - MemoryMappedFiles - Confirm receipt 2 19
VB.NET 2008 - SQL Timeout 9 25
This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

831 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