What are .sln and .vcproj files, and what do they contain?

前端 未结 5 1869
甜味超标
甜味超标 2021-01-30 17:18

I\'m new in the world of Visual Studio. Can somebody please explain what these two files contain? I know that one of them contains info about project, but what about the other o

5条回答
  •  滥情空心
    2021-01-30 17:30

    A .vcproj file contains information about HOW to compile source to a target (mostly, an executable). In many cases, it is crucial to have the project file for successful compilation, so do not delete it. It is compareable to a .dsp file (Visual Studio 6), a .prj file (Borland compilers), or a Makefile (Unix, GNU compilers) and contains paths and compiler/linker command-line options.

    A .sln file is merely a collection of multiple .vcproj files. As Visual Studio can automatically create one if not present, there is no need to keep it for distribution or archiving. It's the successor of a .dsw file (Visual Studio 6). Its name "Solution file" is IMHO misleading.

提交回复
热议问题