我正在为 Visual Studio 中的 .NET 应用程序准备所有基础结构,解决方案中包含大约 17 个项目。这包括全局枚举、公共(public)资源文件、接口(interface)、公共(public)异常等。我还没有到编写特定于应用程序本身的代码的地步。
此时我想卡住我的解决方案结构的图像并使其可重复使用。意思是,在我的下一个项目中,我想从我现在所在的结构开始。
如何使用 Visual Studio 做到这一点?是只使用 Windows 资源管理器复制结构更好,还是 T4 模板提供一种方法来执行此操作?或者 Visual Studio 有更简单的方法吗?我目前使用的是 Visual Studio 2013。
最佳答案
您可以创建自己的项目或解决方案模板。
Multi-project templates act as containers for two or more projects. When a project based on a multi-project template is created from the New Project dialog box, every project in the template is added to the solution.
和
Visual Studio project and item templates provide reusable stubs that give users some basic code and structure that they can use for their own purposes.
关于c# - 创建可重用的项目和解决方案结构,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21105265/