locked
VS 2012 to VS 2017 migration RRS feed

  • Question

  • My project was developed on VS 2012. I am able to migrate to VS 2017 on my system with Windows 10 OS. BTW I used SDK 8.1 and VS 2015 v140 toolkit. But I am unable to migrate to another with VS 2017 with Windows 7 ( SP1). VS never tried to update the project from v110 to v140 in the later case. In another unrelated case, VS 2017 seems to acts strangely under Win7 , another console application in UNICODE settings could not build ( shows ATL related errors), but the same built cleanly on VS2017-win10. Need advice please.
    Saturday, February 10, 2018 2:19 AM

Answers

  • I have to agree that VS 2017 works equally well on Windows 7.  There were some external resource files linked with these projects and they are reflected in the  .vcxproj file which was causing these errors. By disabling these resources ( however I didn't disable the resources  in the .rc file) , and reloading the project fix the issue. Now I am able to load the solution in the VS 2017. Hope this will help someone with similar issue as mine.

    • Marked as answer by seccpur Monday, February 12, 2018 2:00 PM
    • Edited by seccpur Monday, February 12, 2018 2:00 PM
    Monday, February 12, 2018 1:57 PM

All replies

  • "In another unrelated case, VS 2017 seems to acts strangely under Win7 , another console application in UNICODE settings could not build ( shows ATL related errors), but the same built cleanly on VS2017-win10."

    The Visual Studio 2017 installer is more fine grained, so are you sure that you installed the ATL headers on the one that is failing?

    If you go to the Visual Studio Installer, when this loads select modify to modify the Visual Studio installation and verify that Visual C++ ATL support is selected.

    This should be selected by default and it adds all of the ATL headers to a Visual C++ install. If you notice some MFC headers missing, then you can try adding the MFC and ATL support feature in that list. It will include the MFC headers too.

    If you have verified that you have installed the correct thing, then just try to do a repair install. Sometimes the download of the components can fail and this causes Visual Studio Installer to just go a bit weird.

    "VS never tried to update the project from v110 to v140 in the later case."

    Even if it doesn't do it automatically, you can always do it yourself. This is a setting in the project configuration that you can modify.

    The Platform Toolset will tell Visual Studio which compiler toolset to use. There is an easy way to change all of them at once. If you right click on the solution in Solution Explorer then you can use the Retarget solution option to bring everything to the latest version. If you don't want the latest version then you can select multiple projects in solution explorer by holding ctrl and left clicking on them. You can then bring up the properties and it will change the settings in all selected projects.

    Anyway, is there any reason why you aren't using the Visual Studio 2017 (v141) platform toolset with the Windows 10 SDK? They are fully backwards compatible with Windows 7 and the VS2017 compiler has better standards support.


    This is a signature. Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.

    • Proposed as answer by Baron Bi Monday, February 12, 2018 1:51 AM
    Saturday, February 10, 2018 11:17 AM
  • @Darran: Thanks for the elaborate feedback. Indeed I included ATL & MFC during installation and even tried 'Retarget solution'. It is unable to load the v110 solution citing that some of the resources (bitmaps and other stuffs in the ItemGroup) mentioned in the .vcxproj file could not be loaded correctly. I have checked and even provided full file path to these resources, but the problem prevails. But both mentioned cases worked like charm under Win10.

    Anyway, is there any reason why you aren't using the Visual Studio 2017 (v141) platform toolset with the Windows 10 SDK? I am using a server application where the dependencies are in v140 , service support to clients (using our software ) working in win7 are still required.

     
    Saturday, February 10, 2018 3:59 PM
  • Well, Visual Studio 2017 is fully supported on Windows 7. It is even in the system requirements. So the reason why it isn't working isn't simply because you are using it on Windows 7. There are still a lot of people using Visual Studio 2017 on Windows 7, and you don't see a lot of reports of problems on Windows 7.

    As for solution loads failing, this is always tough because there are several ways that things could go wrong here. If they are in the same solution as the project, then there shouldn't be any issues because it will be kept in the same layout if you just copy the entire solution directory. However, if these items are outside of the solution directory, you will have to place the items in the exact same place as they were on other systems. If you end up getting into the situation where you just can't get the solution to load, you can either make a backup of the solution, remove these items from the project on a system which will load it, copy that to the system that can't load it and then re-add the items. If you are feeling adventurous, you could always try to manually edit the .vcxproj file in notepad to remove the items that are causing the load to fail.

    Finally, the v141 tools are binary compatible with the VS2015 runtime, so while you will have to update the runtime on those systems to the VS2017 runtime, this still uses vcruntime140.dll which anything built with VS2015 is able to use. This was explained in this blog post. Also, binaries built with Visual Studio 2017 and using the Windows 10 SDK do run on Windows 7, so there is no reason to stick with Visual Studio 2015 if that is your only reason.


    This is a signature. Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.

    • Proposed as answer by Baron Bi Monday, February 12, 2018 1:51 AM
    Saturday, February 10, 2018 9:21 PM
  • I have to agree that VS 2017 works equally well on Windows 7.  There were some external resource files linked with these projects and they are reflected in the  .vcxproj file which was causing these errors. By disabling these resources ( however I didn't disable the resources  in the .rc file) , and reloading the project fix the issue. Now I am able to load the solution in the VS 2017. Hope this will help someone with similar issue as mine.

    • Marked as answer by seccpur Monday, February 12, 2018 2:00 PM
    • Edited by seccpur Monday, February 12, 2018 2:00 PM
    Monday, February 12, 2018 1:57 PM