如何在 Visual Studio 中的项目/解决方案之间共享代码? [英] How do you share code between projects/solutions in Visual Studio?

查看:72
本文介绍了如何在 Visual Studio 中的项目/解决方案之间共享代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I have two solutions which have some common code, so I'd like to extract it out and share it between them. Furthermore, I'd like to be able to release that library independently because it might be useful to others.

  • What's the best way to do it with Visual Studio 2008?
  • Is a project present in more than one solution?
  • Do I have a separate solution for the separate piece of code?
  • Can a solution depend on another one?

解决方案

A project can be referenced by multiple solutions.

Put your library or core code into one project, then reference that project in both solutions.

这篇关于如何在 Visual Studio 中的项目/解决方案之间共享代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆