Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Tuesday, May 9, 2017 4:06 PM
I am migration a project from VS 2010 to the new VS community 2017. I could not read the projectfile directly, so I started with a small project. Then I wanted to insert the sources from the old project to the new one with the solution explorer. The source files in the project are in different folders. With the explorer I can make folders. But I can import files to those folders. When I import the files they come in the root of the project. I then can move the files to a folder with the solution explorer, but the path in the property of the files does not change. I try to cut and paste with the same result.
How do I move files to folders in the solution explorer?
All replies (3)
Tuesday, May 9, 2017 5:00 PM | 1 vote
In C++ projects the things that look like folders actually represent Filters. You can create new ones in Solution Explorer using right-click menu. Then right-click the filter, “Add”, “Existing Items…”, and select the .cpp and .h files.
If the files are already placed in some subfolders of your project, then try this: go to Solution Explorer and click the “Show all files” toolbar button. You should see your folders and files. Right-click a file or group of selected files, then select “Include In Project”. Then unselect “Show all files”. The .cpp will go to “Source files” filter, .h files — to “Header Files”, if any. The files can be then moved to other filters using drag-and-drop. The files are not moved on disk after these operations in Solution Explorer.
Wednesday, May 10, 2017 7:18 AM
Thank you for the quick answer.
It seems that I used the wrong view. I tried to work with the view that shows when clicking the selection solution and folders; not with the view “Show all files”. Now I see the option "Include In Project”, which I was missing in my view. Even with your explanation it took me some time to find that out.
Thursday, May 11, 2017 7:26 AM
Hi,
Please have a look at here: https://msdn.microsoft.com/ro-ro/library/dn986839.aspx
This topic provides a guide for upgrading Visual C++ code. This includes getting the code to compile and run correctly on a newer release of the tools, as well as taking advantage of new language and Visual Studio features. This topic also includes information about migrating legacy apps to more modern platforms.
Best regards,
Joyce
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected].