Last post Apr 27, 2017 05:18 PM by mgebhard
Apr 27, 2017 03:33 PM|Yeoman|LINK
I have in Visual Studio a Web Forms project in C#, which has been growing for some years.
Whenever I had a common functionality that is not specific to the application, I have placed it into a special subfolder "lib".
I knew that this was no code that was reusable, but I separated it from the application-specific code this way.
Now, a second application is about to evolve, and I would like this to exist in a separate project, but reuse the library code from the existing application.
I guess that now it's time to separate the library code from the first application project.
I assume that there is some type of project to create library code that can be reused by several applications?
And can it be organized so that there is one solution, having one library and two application projects, so that can build everything with one command, while being able to deploy the applications to different destinations?
How can this be done?
Apr 27, 2017 05:18 PM|mgebhard|LINK
Create\Add a class library project and add your code.
Then create a reference to the new class library in your other projects.
Finally, cleanup the project namespaces to point to the new class library in your current application.