In the Visual Studio Debug property page (for a .NET 4 project) I want to be able to specify macros, e.g. $(OutDir), like I can in the Build Events. But it doesn't work, the macros aren't replaced.
在Visual Studio Debug属性页面(对于.NET 4项目),我希望能够指定宏,例如$(OutDir),就像我在Build Events中一样。但它不起作用,宏不会被替换。
Is it just not supported? Is there a work around?
它只是不受支持吗?有工作吗?
1 个解决方案
#1
20
It's not supported.
它不受支持。
One explanation is that pre- and post-build events are stored in the project file, which goes into source control and is shared between all developers. Therefore it's important to have macros that resolve to different paths on different developers' machines.
一种解释是,构建前和构建后事件存储在项目文件中,该文件进入源代码控制并在所有开发人员之间共享。因此,让宏在不同开发人员的计算机上解析为不同的路径非常重要。
Command arguments on the Debug property page are stored in the .user project file, which is user-specific and isn't stored in source control. Which means that you can generally safely used hard-wired arguments that are specific to your machine (and specific to the cases you want to test).
Debug属性页面上的命令参数存储在.user项目文件中,该文件是特定于用户的,不存储在源代码管理中。这意味着您通常可以安全地使用特定于您的计算机的硬连线参数(并且特定于您要测试的情况)。
#1
20
It's not supported.
它不受支持。
One explanation is that pre- and post-build events are stored in the project file, which goes into source control and is shared between all developers. Therefore it's important to have macros that resolve to different paths on different developers' machines.
一种解释是,构建前和构建后事件存储在项目文件中,该文件进入源代码控制并在所有开发人员之间共享。因此,让宏在不同开发人员的计算机上解析为不同的路径非常重要。
Command arguments on the Debug property page are stored in the .user project file, which is user-specific and isn't stored in source control. Which means that you can generally safely used hard-wired arguments that are specific to your machine (and specific to the cases you want to test).
Debug属性页面上的命令参数存储在.user项目文件中,该文件是特定于用户的,不存储在源代码管理中。这意味着您通常可以安全地使用特定于您的计算机的硬连线参数(并且特定于您要测试的情况)。