visual-studio Visual Studio 相对引用路径

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/128998/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 09:39:18  来源:igfitidea点击:

Visual studio relative reference path

visual-studio

提问by pmlarocque

I usually format my project directory like J-P Boodhoo. a main dir containing solution file, then a lib folder for all third-party lib, a src dir, a tools lib for third-party that wont be deployed.... For more info look here

我通常将我的项目目录格式化为 JP Boodhoo。一个包含解决方案文件的主目录,然后是所有第三方库的 lib 文件夹,一个 src 目录,一个第三方的工具库,不会被部署......有关更多信息,请看这里

I set in my project the reference path for all the needed folder, but if a developper checkout the trunk, he have to set all the reference path. Is there a way to simplify this ?

我在我的项目中为所有需要的文件夹设置了参考路径,但是如果开发人员检出主干,他必须设置所有参考路径。有没有办法简化这个?

And am I using Visual Studio 2008.

我是否使用 Visual Studio 2008。

Thank you.

谢谢你。

采纳答案by jwfearn

I'm not sure which Visual Studio language you use, but if it's C++, then then file paths are stored in the .vcprojproject file which should also be under version control. (NOTE: the .slnsolution file does NOT store path settings) If you are careful to use relative, rather than absolute paths, it should be easily sharable among multiple developers.

我不确定您使用的是哪种 Visual Studio 语言,但如果它是 C++,则文件路径将存储在.vcproj项目文件中,该文件也应受版本控制。(注意:.sln解决方案文件不存储路径设置)如果您小心使用相对路径而不是绝对路径,它应该很容易在多个开发人员之间共享。

In Visual C++ 2008, project files are XMLso you can edit them directly. If you want to get really fancy, you can use .vspropsproperty sheetsfor additional control.

在 Visual C++ 2008 中,项目文件是 XML,因此您可以直接编辑它们。如果您想变得更花哨,可以使用.vsprops属性表进行额外控制。

回答by mattlant

I use a shared folder on the network for stuff like that. And give that folder full trust. on the PDC i just have a login script that maps approriately. Its might not be the best way, but its worked for me without any issues.

我使用网络上的共享文件夹来处理类似的事情。并完全信任该文件夹。在 PDC 上,我只有一个适当映射的登录脚本。它可能不是最好的方法,但它对我有用,没有任何问题。

Another solution I have used in the past is a common folder on each machine where all dependancies go, and have it syncronize with some sort of tool. I use Backup Exec which comes with Desktop and Laptop option which has a syncing feature, but other things work as well.

我过去使用的另一个解决方案是每台机器上的公共文件夹,所有依赖项都在其中,并与某种工具同步。我使用带有桌面和笔记本电脑选项的 Backup Exec,它具有同步功能,但其他功能也能正常工作。