Solved

Rename a .NET Project and related DLL

Posted on 2004-09-22
5
1,302 Views
Last Modified: 2012-06-22
I am just migrating to .NET from Access VBA.

I created an ASP.Net project using an odd name -  WebApplication101.

Now I want to change the name to SBS.Image.

My trouble is renaming the DLL that gets created when I build the project. It is still named WebApplication101.DLL.

Perhaps there is a better way, but this is what I have done.
_______________________________________________
1.  Rename the Web Share through IIS.

2.  Renamed the Solution and the Project and edited SBS.Image.sln so it points to the new web share name.

3.  Searched all files in the project and changed all references to WebApplication101 so they now read SBS.Image.

4.  Deleted WebApplication101.dll and WebApplication101.pdb from the Bin folder.
_______________________________________________

When I Build or Rebuild the project (SBS.Image) it still creates WebApplication101.dll rather than SBS.Image.dll.

Is there a way to create SBS.Image.dll, short of starting a new solution/project and importing everything?

Thanks!

John
0
Comment
Question by:JohnDesautels
  • 3
  • 2
5 Comments
 
LVL 20

Accepted Solution

by:
ihenry earned 500 total points
ID: 12129691
Follow these steps
1. Open Visual Studio .NET
2. On the View menu, click Solution Explorer.
3. In Solution Explorer, right-click your project, and then click Properties.
4. In the Common Properties list, click General.
5. Type the new name for your assembly in the Assembly Name box, and then click OK.
6. To change the project name, In Solution Explorer, right-click your project then select rename
7. Rename the project to a new name in the edit box, press enter.

HTH
0
 
LVL 6

Author Comment

by:JohnDesautels
ID: 12129706
I think I found the solution.

I used a text editor (UltraEdit) to search all files in the directory for WebApplication101.

There were two references in SBS.Image.vbproj, which apparently my search using Visual Studio did not detect.

I changed those references (AssemblyName and RootNamespace) to SBS.Image and rebuilt. The DLL was named SBS.Image.dll.

I suspect the AssemblyName is the key to the name of the dll.

I will likely be changing names again from time to time and will elave this question open for the "right" way to change the name.

(As I was typing this a solution came in from ihenry. I will review it and likely award the points!)

John
0
 
LVL 6

Author Comment

by:JohnDesautels
ID: 12129731
Thanks, ihenry.

Looks like the Common Properties - General - Assembly Name is the ticket. I suspect the same as what I found in the .vbproj file.

Is the rest of my procedure the "right" way to rename?

Frankly it's primarily the DLL name that I am interested in controlling. Is it typical that the DLL is named differently than the project?

How about the root namespace. Is this typically the same name as the DLL?

Points are on the way.

Thanks for the speedy reply!

John
0
 
LVL 20

Expert Comment

by:ihenry
ID: 12129811
>> Is the rest of my procedure the "right" way to rename?
try not to change the vbproj directly if not really necessary

>> it typical that the DLL is named differently than the project?
>> ...the root namespace. Is this typically the same name as the DLL?
Usually no, the assembly name and namespace should be different to avoid multiple projects sharing a same namespace.
0
 
LVL 6

Author Comment

by:JohnDesautels
ID: 12129850
Thanks.

I've got a lot to learn, but experts like you give me hope...
0

Featured Post

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

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

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

821 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