Hi All,
I have been assigned a VC++ project and its my first time am working on a VC++ project.
The project was earlier built on visual Studio 2015 and I can see a Post-Build event being mentioned in project properties where it is calling a batch file - "vsvars32.bat".
Am using Visual Studio 2017 and I have changed the file name to - "vsdevcmd.bat".
I was doing some research and some questions came up into my mind. I understood something and also found some more topics related to this, which I have mentioned in "What have u tried" section. I am googling till now to find the answers but I couldn't find any till now. Might be I can get a good explanation here.
1. Why this batch file needs to be executed?
2. Can I call this batch file for any other C#/other language projects also?
3. If I don't call this batch file for current VC++ project then what could be the consequences?
What I have tried:
As per the questions came into my mind, I started finding the answers and came to know that all these are part of "MSBUild".
Basically, "vsdevcmd.bat" file is used to setup environment variables.
Also, I came to know that we can build Visual Studio projects using "MSBuild" and it has a property named as "Platform Toolset", where we can specify for which platform am trying to build the application and it can be for driver and non-driver projects.
Now, again a lot of questions came into my mind:
1. What is the relation between Platform Toolset and Environment Variable?
2. Is this environment variable specifically for Visual Studio applications or the whole system (like we set after installation of many software e.g - Java SDK)?
3. I have worked on C# projects but never I set up these environment variables ever using this batch file. So, is it required for any VC++ project?
4. Am already writing the code in Visual Studio and building the application using VS Build, so it means its managed by CLR and so why I need to specify all these env variables or platform toolset?
Please help me to understand in core. Any links would also be helpful.
Thanks to all.