0

我想将我的应用程序从 Linux 移植到 Windows。我正在尝试使用 Visual Studio 配置项目来构建 Window 应用程序。对我来说,问题是我只需要我的 Windows 目录中的一部分文件。但我想保持目录的完整性,这样我就不需要将文件的子集签出到 Windows。Visual Studio 是否需要将整个目录作为窗口文件?对Window应用开发比较了解的朋友,能不能帮我理解一下:

  1. 我可以将 Visual Studio 配置为使用目录中的文件子集构建项目吗?

  2. 如果是,如何配置项目文件?任何指向教程的链接都会非常有帮助。

4

1 回答 1

2

Below are couple of quick suggestions using Visual Studio

Include/ Exclude : If the number of file are minimum, then you could include or exclude files to a project manually.

  1. You could add a directory to a project by copying the files to a folder under the .vcxproj(ur .<>proj) file.
  2. Then select the project in the solution explorer and on the tool bar you would get an option Show All Files
  3. Right click on the Folder or File and hit Include In Project. This will include the file/folder into your project.
  4. You could Exclude any file that is already included in your project by, clicking the file and hit Exclude From Project.

Remove From Compilation Only:

  1. Select the file in Solution Explorer and right click Properties
  2. Under Configuration Properties -> General -> Excluded From Build set it to Yes/No
于 2013-05-01T03:50:40.413 回答