可以在项目(.vcproj)文件中设置工作目录吗?

发布于 2024-07-19 14:58:55 字数 318 浏览 5 评论 0原文

我有一个为 Visual Studio 2005 生成 .sln 文件和一些 .vcproj 文件的脚本。我需要设置工作目录选项,但它是在 .user 文件中指定的。 我们当前无法生成文件。 我在 msdn 上找到了 vcproj 文件定义,但是似乎无法从那里设置此选项。

如何从 .sln 或 .vcproj 文件中指定“配置属性 -> 调试 -> 工作目录”?

I have a script that generates a .sln file and a few .vcproj files for visual studio 2005. I need to set the WorkingDirectory option but its specified in the .user file. A file we cannot currently generate. I found the vcproj file definition at msdn, but it seems that this option cant be set from there.

How does one specify "Configuration Properties->Debugging->Working Directory" from the .sln or .vcproj file?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

治碍 2024-07-26 14:58:55

根据我的评论进行更改。 我确实找到了该属性:

VCDebugSettings.WorkingDirectory< /a>

使用 Visual Studio Extensibility 创建调用此方法的加载项或宏。 您应该能够挂钩 BeforeCompile 事件或其他事件来设置它。

这不是一个简单的答案,但可行。

Change from my comment. I did find the property:

VCDebugSettings.WorkingDirectory

Use Visual Studio Extensibility to create an add-in or macro that calls this method. You should be able to hook into a BeforeCompile event or something to set it.

Not an easy answer, but doable.

极度宠爱 2024-07-26 14:58:55

更改设置并关闭 sln 后,您将获得一个名为以下内​​容的用户文件:

Project_Name.vcproj.Domain.user_name.user

将其更改为:
Project_Name.vcproj.user 并提交。

下一个检查代码的人将使用此用户文件来创建其用户特定的文件。

After you change your settings, and close the sln you will get a user file named something like:

Project_Name.vcproj.Domain.user_name.user

Change it to:
Project_Name.vcproj.user and commit.

The next person who checks out the code will use this user file to create their user specific one.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文