Sharing Source Code Across Projects in a Solution
Just clarifying something, forgive the novice question.
I've got some source code that applies to multiple projects within a given Visual Studio solution. Best practice suggests I create another project within the solution "ApplicationBase", put the source code there, compile it and reference the dll in the other projects?
开发者_运维知识库This is my first time doing a multi-project solution, so I just want to make sure.
Yes, this is correct. The best practice is to not share "source code", but rather to place the shared code into a separate, class library project, and then to reference that project in more than one place.
精彩评论