In our team, the devs all have Visual Studio 2012, and we also use TFS2012 build. For space & manageability reasons, we don't install Visual Studio on our (many) build agents. This has worked so far with C# projects (csproj).
Now we want to add support for C++ project (vcxproj). These build on devs' machines, but not on the build agents - we get:
X.vcxproj(31,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
I suppose this is because the C++ compiler & targets are only installed with VS.
All Compilers & assemblers come as builtin with Windows without IDE and can be run from "the Windows Command prompt (cmd.exe)", so no extra downloads necessary; located in folder: C:\Windows\Microsoft.NET\Framework\vx.
Visual Studio comes with its own C compiler, which is actually the C++ compiler. Just use the . c file extension to save your source code. You don't have to be using the IDE to compile C.
Microsoft C++ Compiler (MSVC)This is the default compiler for most Visual Studio C++ projects and is recommended if you are targeting Windows.
It is simple for C#, the ability to compile C# programs is innate in the framework, System.CodeDom, so just installing .NET is enough. Not so for C++. You'll at a minimum need to install the Windows SDK, half a gig. This includes the C++ compiler in SDK versions earlier than 8.0
However, you'll next get to fret about finding a way to get the class libraries on that machine. ATL and MFC for example. You can't just copy them, that violates the license. Much worse, Microsoft is not doing business the way they used to. They switched to a rapid-release cycle since VS2012 with updates shipping in a manner of months. These are not updates you can ignore, they add pretty major chunks to get C++11 implemented. Definitely the kind that your C++ programmers will want to use.
In general, the SDK version of the C++ compiler is just not in sync with VS version, the Windows team has no obligation to keep it updated. The one thing that a build machine should never do is run a different set of build tools than the ones used by the programmers. That makes a build break that can't be reproduced by a dev a big nasty point of contention. Unless you like making your life complicated, the message is clear. Don't do it, install VS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With