开发者

How do I use macros for the command line arguments for debugging a .NET project?

In the Visual Studio Debug property page (for a .NET 4 project) I w开发者_StackOverflow中文版ant 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.

How do I use macros for the command line arguments for debugging a .NET project?

Is it just not supported? Is there a work around?


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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜