Solved

Rename a .NET Project and related DLL

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

914 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

23 Experts available now in Live!

Get 1:1 Help Now