I've created a new Visual Studio C++ project and I'd like to import copies of a number of C and header files into the project. That is, the files are currently in a folder on my desktop and I'd like to import them such that copies are placed in the newly created project folder.
How would I do this? I've tried using File | New | Project from Existing Code but that just keeps the files in their existing location. I've even tried a simple Ctrl-C and Ctrl-V and again that imported the files but they stayed in the same place on disk.
First, select DevTools > Settings > Experiments > Open source files in Visual Studio Code, and then re-start DevTools.
On the File menu, select New > Project From Existing Code. Specify your project location, the directory for your source files, and the kinds of files the wizard imports into the new project. Choose Next to continue. Specifies the directory path of the new project.
Click the arrow button to the right of the file and select Move or Copy file from the dropdown menu. When you choose Copy this file from the move or copy dropdown, you will then be able to select which project to copy it to. You can make a copy of the file in the existing project or in another project.
Copy the files to the new location in Windows Explorer, then start Visual Studio and add them as existing items to the project.
I think the better solution would be to create a new (empty) project and add your h and cpp files per "Add -> Existing item" in the context menu of "Headers" and "Sources"
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