'How to create a dll with the another .cs file in c# using Visual studio

I am using visual studio 2019

I wanna create a dll with the newly added .cs file other than the existing class1.cs in the class library project using .NET framework 4.7.2 in the c# platform

Project structure from the image you can see that there are 2 classes MathInt.cs and MathFloat.cs

Here MathInt.cs is the default created class Class1.cs, I renamed it and the class MathFloat.cs is added by myself, when i create the dll by building this project in the vs2019, the dll only the functions and properties of the 1st .cs file (i.e) MathInt.cs

How can i create a dll for the 2nd .cs file ie. MathFloat.cs Kindly help me or it is possible to a single dll for both the .cs file in the project.

Thanks in advance



Solution 1:[1]

All the classes in the project TestExecClasslibrary will get compiled into one dll.

you get one dll per project. if you want separate dlls you would have to add a second project to your solution.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 mjb