dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 12 of 12

Thread: VS2019 - why doesn't it like vcxproj files any more ?

  1. #1
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,509

    VS2019 - why doesn't it like vcxproj files any more ?

    Until recently I'd been using VS2015. I've attached a small snip from my Solution Explorer showing a VS Solution which contains some sub-projects. You'll see some sub-projects called liblo, intl, and sigc++. These all get implemented via vcxproj files.

    Yesterday I installed VS2019 but when I tried to load that VS Solution, all its projects showed up as "unloaded". I tried loading them manually (via Add->Existing Project) but the file window won't even show me any vcxproj files (it only seems to know about Solution files). So I created a Solution file for one of the projects and tried to load it. That produced a dialog saying Preparing Solution and then VS2019 just hung!!!

    Determined not to be beaten I then opted for Add->Existing Item. That window does show me vcxproj files - but when I try to load one, it doesn't load the project as I'd expect (it literally loads the actual vcxproj file into my Editor window!!)

    What's going on here???

    [Edit...] I'm not sure if this'll make sense but I don't think it's actually installed everything. I decided to see if I could create a new VC++ project from scratch - and this time, it created a sln file, plus a small folder structure containing an extra file called .suo (but no vcxproj file). It's as if I've only installed the Solution Explorer somehow but none of the other components that are needed...
    Attached Images Attached Images    
    Last edited by John E; May 12th, 2019 at 08:52 AM.
    "A problem well stated is a problem half solved. - Charles F. Kettering

  2. #2
    2kaud's Avatar
    2kaud is online now Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    6,671

    Re: VS2019 - why doesn't it like vcxproj files any more ?

    What options did you choose when you installed VS2019 - the necessary C++ options (for SDKs etc) are not installed by default. You have to choose to install what's needed. If you run VS Installer - for VS2019 on the right hand side of the window, what options have you got checked for Desktop development with C++?
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++17 Compiler: Microsoft VS2019 (16.0.4)

  3. #3
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,509

    Re: VS2019 - why doesn't it like vcxproj files any more ?

    Quote Originally Posted by 2kaud View Post
    What options did you choose when you installed VS2019 - the necessary C++ options (for SDKs etc) are not installed by default.
    Yep, you just beat me to it, 2kaud! After a bit more experimenting I realised that all the various compilers etc get installed as something called "Extensions" (and nothing at all got installed during my installation). I must've forgotten to tick anything...
    "A problem well stated is a problem half solved. - Charles F. Kettering

  4. #4
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,509

    Re: VS2019 - why doesn't it like vcxproj files any more ?

    It looks like I'll need to create a 'default' property sheet (i.e. that'll add various folder paths etc to all my projects) but I can't remember how I did that with VS2015. Could you remind me..? In earlier versions of VS it was in 'Options->Projects and Solutions->VC++ Directories' (but that seems to have gone now).
    "A problem well stated is a problem half solved. - Charles F. Kettering

  5. #5
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,509

    Re: VS2019 - why doesn't it like vcxproj files any more ?

    Here's the scenario... I just bought a new PC and I'm in the process of transferring stuff to it. Previously I'd been building with VS2015 so this time I opted for VS2019. Obviously, my projects were in VS2015 format so I assumed Visual Studio would update them to compile with VS2019. However, that didn't seem to happen. VS2019 asked me to install the relevant extension so it could carry on compiling with VS2015 (which I did).

    But as soon as I select a file and try to compile it, I get error C1696: cannot open source file 'windows.h'. It then advises me to add the relevant SDK into my property sheet (that's the bit I've forgotten how to do...).

    It looks like I can retarget projects so that they'll build with VS2019 - but I wouldn't mind persevering with this and see if I can make the 2015 compiler work. I've a vague memory that the property sheet was a file called Microsoft.cpp.default.props but I've no idea what I'd need to do to make it recognise the 2015 SDK.

    [Edit...] I think I just found this... opening the property page for my project (rather than the default properties) I can see an entry called General->Target Platform Version. This was set to <inherit from parent or project defaults>. For some strange reason, this equates to a target platform of 8.1 - but the dropdown menu contains another entry I can select (10.0.17763.0) and if I select that option, my source file compiles okay.

    The only strange thing now is that 10.0.xxxxx will surely equate to VS2010, rather than VS2015 (isn't VS2015's version number 14.0.xxxxx ?)

    So I'm still confused...
    Last edited by John E; May 13th, 2019 at 03:19 AM.
    "A problem well stated is a problem half solved. - Charles F. Kettering

  6. #6
    2kaud's Avatar
    2kaud is online now Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    6,671

    Re: VS2019 - why doesn't it like vcxproj files any more ?

    The only strange thing now is that 10.0.xxxxx will surely equate to VS2010, rather than VS2015 (isn't VS2015's version number 14.0.xxxxx ?)
    The 14.x refers to the version of VS (14 for VS2015, 15 for VS2017, 16 for VS2019). The 10.x refers to the OS/SDK version.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++17 Compiler: Microsoft VS2019 (16.0.4)

  7. #7
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,509

    Re: VS2019 - why doesn't it like vcxproj files any more ?

    Quote Originally Posted by 2kaud View Post
    The 10.x refers to the OS/SDK version.
    Ah I see... so when I was seeing 8.1 that meant my apps would be targeted to run on Win8.1 and later - whereas 10.0.xxxx will target Win10 only.

    How can I return to my original Win8.1 status? Does that require another extension I'll need to add?
    "A problem well stated is a problem half solved. - Charles F. Kettering

  8. #8
    2kaud's Avatar
    2kaud is online now Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    6,671

    Re: VS2019 - why doesn't it like vcxproj files any more ?

    Ah I see... so when I was seeing 8.1 that meant my apps would be targeted to run on Win8.1 and later - whereas 10.0.xxxx will target Win10 only.
    Not really. I target 10.x with VS2017/19 and run on Windows 7! All the SDK versioning really means is that you can only use specific APi's that were included up to the specified version. You can't use API's from a later version as the definitions are not present in the header files - so the program won't compile. If you target the latest SDK then your program will compile with usage of the latest APIs - but if you use an API that isn't present on the target computer when the program is run. then you'll get a run-time error.

    Only variations of SDK 10.x are now listed for install using VS installer (10.0.16299.0, 10.0.17134.0, 10.0.17763.0, 10.0.18362.0). If you really want to install an earlier SDK version, you'll need to do this manually. See https://developer.microsoft.com/en-u...ds/sdk-archive
    Last edited by 2kaud; May 13th, 2019 at 07:20 AM.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++17 Compiler: Microsoft VS2019 (16.0.4)

  9. #9
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,509

    Re: VS2019 - why doesn't it like vcxproj files any more ?

    Thanks 2kaud. For the hell of it I might try installing the 8.1 SDK anyway but I'm curious to know what happens (on your machine) if you right-click on a project and then choose Properties->General->Target Platform Version (and then choose the setting <inherit from parent or project defaults>)

    On my machine that stops the 2019 compiler from working (which doesn't seem right somehow...)
    "A problem well stated is a problem half solved. - Charles F. Kettering

  10. #10
    2kaud's Avatar
    2kaud is online now Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    6,671

    Re: VS2019 - why doesn't it like vcxproj files any more ?

    My Target Platform is Windows 10 (and can't be changed on my system - even though I'm using Windows 7!). The SDK version is 10.0 (latest installed version). Changing SDK Version to <inherit from parent or project defaults> again gives me 10.0 (latest installed version) - but I no longer have any SDK version below 10.0.16299.0 installed. We completely ignored Windows 8/8.1 (although at some point we had the 8/8.1 SDK's installed - these have long been deleted) and still mainly use Windows 7 with Windows 10 just for testing. However we will all be moving to Windows 10 approx November as Windows 7 will no longer receive security updates from Jan 2020.

    If you do Control Panel/Programs & Features, what SDK's are reported as being installed?
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++17 Compiler: Microsoft VS2019 (16.0.4)

  11. #11
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,509

    Re: VS2019 - why doesn't it like vcxproj files any more ?

    Quote Originally Posted by 2kaud View Post
    If you do Control Panel/Programs & Features, what SDK's are reported as being installed?
    Interestingly, these seem to be the only two:-

    1) Windows Software Development Kit - ver 10.1.17763.132
    2) Windows SDK AddOn - ver 10.1.0.0

    so I don't know where the 8.1 option's coming from

    [Edit...] Okay, I found this line in a file called Microsoft.Cpp.Common.props :-

    <!-- Fall back to 8.1 if windows 10 SDK is not found or WindowsTargetPlatformVersion is set to "8.1" or is not set at all -->
    So my guess is that WindowsTargetPlatformVersion isn't currently set - i.e. I'll need to figure out where to set it (or just install the 8.1 SDK)
    Last edited by John E; May 13th, 2019 at 09:36 AM.
    "A problem well stated is a problem half solved. - Charles F. Kettering

  12. #12
    2kaud's Avatar
    2kaud is online now Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    6,671

    Re: VS2019 - why doesn't it like vcxproj files any more ?

    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++17 Compiler: Microsoft VS2019 (16.0.4)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)