代码之家  ›  专栏  ›  技术社区  ›  Xantium

如何分发visual studio项目的源代码

  •  -1
  • Xantium  · 技术社区  · 6 年前

    我想分发我制作的visual studio项目源代码,但我不知道如何做。

    我有一个文件结构如下的项目:

    SimpleProject --
                    |- .vs --
                             |- SimpleProject --
                                                |- v15 --
                                                         |- .suo
                                                         |- Browse.VC.db
                    |- SimpleProject --
                                       |- file.c
                                       |- SimpleProject.vcxproj
                                       |- SimpleProject.vcxproj.filters
                                       |- SimpleProject.vcxproj.user
                    |- SimpleProject.sln
    

    我只写了 file.c . 我至少需要包括什么 C文件 (假设我希望其他人能够在visual studio中使用源代码/编译它,等等)?

    2 回复  |  直到 5 年前
        1
  •  1
  •   Peter Mortensen icecrime    5 年前

    共享以下文件就足够了,这样其他人就可以在没有任何问题的情况下构建您的项目。

    SimpleProject --
                    |- SimpleProject --
                                       |- file.c
                                       |- SimpleProject.vcxproj
                                       |- SimpleProject.vcxproj.filters
                    |- SimpleProject.sln
    

    在提交/检查代码之前,我建议您尝试生成的文件是否是生成和运行应用程序所必需的。如果没有,你不应该包括他们。

        2
  •  1
  •   user9907349    6 年前

    如果您使用的是github或他们建议删除的内容。 看看官方的github's "Collection of useful .gitignore templates" .

    这个 .gitignore 对于Visual Studio,可以在以下位置找到:
    https://github.com/github/gitignore/blob/master/VisualStudio.gitignore