Solved

Rename a .NET Project and related DLL

Posted on 2004-09-22
5
1,301 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

815 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

8 Experts available now in Live!

Get 1:1 Help Now