Sophairk
Sophairk

Reputation: 273

How to separate Class Library into multiple assembly (*.dll)?

I build a class library project with separate class by folder.

Example:

After I compile project, I will have TEST.dll

but I want TEST.dll, TEST.Security.dll, TEST.Converter.dll, & TEST.Utility.dll

Note: Security, Converter, Utility is folder in TEST project. In each folder have c# class.

How to do?

Upvotes: 1

Views: 1304

Answers (2)

Andrei Dragotoniu
Andrei Dragotoniu

Reputation: 6335

the fact that you separate classes by folders means nothing when it comes to the dll output.

If you want one dll per folder then you will have to create one separate class library project for each one. In the properties of each project you can set the name of the dll file itself.

This being said, the name of the dll is less important, it's the namespaces that will matter. The namespace is set in each class file and this will affect your "using" statements.

Upvotes: 2

Spark K
Spark K

Reputation: 46

Create separate projects for each

Example:

  • name project TEST.Security class library
  • name project TEST.Converter class library
  • name project TEST.Utility class library

Upvotes: 3

Related Questions