Solved

Rename a .NET Project and related DLL

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

759 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

18 Experts available now in Live!

Get 1:1 Help Now