Visual Studio 2008 中的复制任务

发布于 2024-08-22 18:49:12 字数 468 浏览 3 评论 0原文

这是与我发布的上一个问题相关的问题(请参阅此处)。
我需要配置一个 .csproj 文件以将一些文件从一个目录复制到另一个目录(让我将它们称为源和目标)。我还需要根据我正在使用的配置更改源路径。例如,如果我在调试模式下编译项目,则 SOURCE 路径必须包含名为 Debug 的子文件夹。
我尝试了 Schmitt 在上一篇文章中提出的解决方案,使用 $(ConfigurationName) 将动态目录设置到 SOURCE 路径中。当我打开包含该项目的解决方案时,项目的主树中出现了源文件的链接列表,并且它们与调试模式正确相关。但是当我切换到Release模式时,我看到链接的源文件的路径再次设置为Debug版本。
有没有办法在 SourceFiles 元素的 Include 属性中指定参数?
谢谢。

This is a question related to a previous question I posted (see here).
I need to configure a .csproj file to copy some files from a directory to another one (let me call them SOURCE and DESTINATION). I also need to change the SOURCE path depending from the configuration I'm using. For example, if I compile my project in Debug mode, the SOURCE path must contain a subfolder called Debug.
I tried the solution proposed by Schmitt in the previous post, using $(ConfigurationName) to set the dynamic directory into the SOURCE path. When I opened the solution containing that project, a list of links to the source files appeared in the main tree of the project and they were correctly related to the Debug mode. But when I changed to the Release mode, I saw that the path of the linked source files were set again to the Debug version.
Is there a way to specify a parameter in the Include attribute of the SourceFiles element?
Thank you.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文