如何在命令行参数中将解决方案文件夹作为参数传递(用于调试)? [英] How to pass solution folder as parameter in command line arguments (for debug)?

查看:25
本文介绍了如何在命令行参数中将解决方案文件夹作为参数传递(用于调试)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Visual Studio Debug 部分,我们可以传递参数.

In Visual Studio Debug part, we can pass arguments.

我想知道如何将解决方案文件夹作为参数传递,但不将目录硬编码.我将在不同位置使用该项目,我不想一直更改这些参数.

I want to know how to pass the solution folder as an argument, but without putting the directory hardcoded. I will use the project in different locations and I don't want to change those arguments all the time.

推荐答案

在 Visual Studio 中,打开项目设置 (Alt + F7),然后转到配置属性/调试.在命令参数组合框中选择编辑",将弹出一个对话框.单击宏按钮并选择 SolutionDir 作为参数.

In visual studio, open project settings (Alt + F7), then goto configuration properties/debugging. In the command arguments combo box select 'edit', a dialog box will popup. Click on Macros button and select SolutionDir as the argument.

这篇关于如何在命令行参数中将解决方案文件夹作为参数传递(用于调试)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆