So, I finally let myself get talked into trying out C++…
I decided that maybe trying to at least learn a little C++ would be good for me just for the experience (apparently C isn’t good enough ). So, I fired up Visual Studio. Things were actually going half-decently too. I wrote a little code, did some debugging, even had fun?
But the problem I’m going to whine about in this post arose when I went to put my project on GitHub.
.vcxproj file (the Visual Studio project file? No clue what the ‘x’ means), there is an XML tag called
WindowsTargetPlatformVersion. This property, apparently, is dependent on either the machine Visual Studio is running on in some way, or the version of Visual Studio. Either way, when I pushed my project to GitHub and pulled it onto my laptop, I faced hundreds of random errors that appeared to be about the C runtime? Nothing related to my code.
My desktop and laptop are both running Windows 10 and Visual Studio 2017.
The solution to this is to
Retarget Solution or
Retarget Project. This would be all fine and dandy except when doing this, the property in the
.vcxproj file changes… and since this file must be in source control for people to be able to pull the project and open it in Visual Studio… this is a conflict.
The two different values of this property I’ve ran into are
10.0.16299.0 (from my desktop) and
10.0.15063.0 (from my laptop).
So far I have not been able to find any solution or even anyone discussing the issue. I attempted to use a
User-Defined Macro in a
Property Sheet (which could be user-specific and in the
.gitignore) to fix this but apparently this specific property cannot be set with a macro?
So. It’s entirely possible that I’m an idiot and that this is easy to solve. But I suspect that is not the case.