• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1307
  • Last Modified:

Rename a .NET Project and related DLL

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
JohnDesautels
Asked:
JohnDesautels
  • 3
  • 2
1 Solution
 
ihenryCommented:
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
 
JohnDesautelsAuthor Commented:
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
 
JohnDesautelsAuthor Commented:
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
 
ihenryCommented:
>> 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
 
JohnDesautelsAuthor Commented:
Thanks.

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

Featured Post

Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now