I have a Console app that runs some actions on a C# solution using csc.exe
, msbuild.exe
and tf.exe
.
I would like to run my app in the context of the Visual Studio developer command prompt
(without actually make the user open it) since it automatically sets up the paths for the files above thus reducing the need to search for them and store the paths locally for each user.
How can I run my console app under the developer command prompt?
You can create a batch file like so:
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\VsDevCmd.bat" && echo %FrameworkDir%
This sets up the environment, then echoes the value of one of the variables set up. Just replace the echo
command with your own command.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.