problem with creation DLL file
I try to convert cs file to DLL file ..
when I am using Class Library project ... it works and create DLL file when I built the project , but when I create new file , as class file , and built it I don't found new dll file in project folder !! why ?? and when I am using the namespace , that is in the new file , in new project I don't found it .
second , can I convert Any cs 开发者_Python百科file in Any type of project like " Console project " into dll file ?? How ?? I am try to built it but any Dll file created !!
Your project build type must be 'Class Library' to generate an assembly DLL. All classes inside of a single project will be compiled into a single library. For console applications, if you go to the project's properties under the 'Application' tab, you can change the output type to 'Class Library' from 'Console Application'.
Also, the assembly DLL isn't put directly in the project folder. It goes in the \bin\ folder. For instance, the path will look like: MyProject\bin\Debug\MyProject.dll.
Each project has one DLL file.
So for example your project has the namespace "Car" and it contains two classes. Class "Engine" and class "Tire. If you build this project into a class library your .dll contains the two classes.
You can load this dll in another project as reference. Now you can use Car.engine and Car.tire.
精彩评论