I want to build .NET solution using batch file.
I am aware that I need to use following statement
devenv /build release "D:\Source Code\Source\test.sln"
But I do not know how to create batch file which will execute on VS command prompt.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The visual studio command prompt just loads some variables and path settings. That’s all it is, it’s nothing specially, it’s not a different command prompt, it’s the same command prompt with some settings configured. You can load the same settings in your own batch file by including the following line at the top:
(Obviously, for different versions of VS, the path might change slightly)
You can replace “x86” with the appropriate architecture for your machine. The permitted values are:
That said, I don’t think you actually need to load all the vars/paths all you really need to do is provide the full path to the
devenv.exefile. You could try this instead:(Again, the path will change for different versions of visual studio)