From where is the assembly name taken when you build a user control dll

T

tony

Hello!

I just want to find out how the system find the name to set on a assembly
User control dll.

I have done this.
1. Create a user control
- Here the namespace was set by the system to WindowsControlLibrary2
- The name of the class was also set by the system to UserControl1
- The name of the assembly dll was set by the system to
WindowsControlLibrary2.dll
- The project name was also set by the system to WindowsControlLibrary2
- The name of the cs file was set by the system to UserControl1.cs


Now I have renamed the namespace where the user control is located.
I have also renamed the actual class.
I have renamed the project
I have renamed the solution
I have renamed the cs file

I have delete the user control from the toolbox.
I have delete the reference to user control
I have deleted all file with name WindowsControlLibrary.dll and
all file with name WindowsControlLibrary.*

When I now build the user control dll I still get WindowsControlLibrary.dll
I can't find out why the system still use that name.

So my question is how does the system find out what assembly name should be
set on a user control when building the dll file.

I have renamed everything that has something to do with
WindowsControlLibrary but still does the system use WindowsControlLibrary
when building the usercontrol dll.

It looks like when you have once chosen a assembly name you can't change it.

Please tell me how the naming of user control works.

//Tony
 
T

Tom Porterfield

tony said:
Hello!

I just want to find out how the system find the name to set on a assembly
User control dll.

I have done this.
1. Create a user control
- Here the namespace was set by the system to WindowsControlLibrary2
- The name of the class was also set by the system to UserControl1
- The name of the assembly dll was set by the system to
WindowsControlLibrary2.dll
- The project name was also set by the system to WindowsControlLibrary2
- The name of the cs file was set by the system to UserControl1.cs


Now I have renamed the namespace where the user control is located.
I have also renamed the actual class.
I have renamed the project
I have renamed the solution
I have renamed the cs file

I have delete the user control from the toolbox.
I have delete the reference to user control
I have deleted all file with name WindowsControlLibrary.dll and
all file with name WindowsControlLibrary.*

When I now build the user control dll I still get
WindowsControlLibrary.dll I can't find out why the system still use that
name.

So my question is how does the system find out what assembly name should
be set on a user control when building the dll file.

I have renamed everything that has something to do with
WindowsControlLibrary but still does the system use WindowsControlLibrary
when building the usercontrol dll.

It looks like when you have once chosen a assembly name you can't change
it.

Please tell me how the naming of user control works.

When you first create a project, the assembly name is the same as the
project name. To change the assembly name, and you can do that without
changing the name of anything else, in Solution Explorer right click on the
project and select Properties. Under Common Propererties select General.
One of the General Properties is the Assembly Name. Since you changed your
namespace, you might also want to change the Default Namespace property so
that if you add a new class t picks up your new namepace.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top