简体   繁体   English

使用Visual Studio 2010和Subversion共享包含2个不同项目的CS文件

[英]Share a CS file with 2 different projects using Visual Studio 2010 and Subversion

We are moving from SourceSafe to Subversion as our source control provider... All is going well so far except I can figure out how you "share" a file between more than one project. 我们正在从SourceSafe迁移到Subversion作为我们的源代码控制提供商...到目前为止一直进展顺利,除了我可以弄清楚你如何在多个项目之间“共享”一个文件。 In sourcesafe you made a link to the file and then added it to your project, then source safe knew that the file was really just one file. 在sourcesafe中,您创建了一个指向该文件的链接,然后将其添加到您的项目中,然后source safe知道该文件实际上只是一个文件。 How do you do the equivalent with Subversion? 你如何与Subversion做同等的事情?

You can add a file as a link within Visual Studio directly. 您可以直接在Visual Studio中添加文件作为链接

Doing this means you don't have to worry about how your source control will manage things, so long as the referenced file in in source control - the link is managed by VS. 这样做意味着您不必担心源代码控制将如何管理事物,只要源控件中引用的文件 - 链接由VS管理即可。

You're looking to share a CS (as in a code file) between 2 projects? 您是否希望在两个项目之间共享CS(如在代码文件中)? From an design aspect, why not extrapolate that file into it's own project and then reference that project from the other projects. 从设计方面来说,为什么不将该文件外推到它自己的项目中,然后从其他项目中引用该项目。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM