Search code examples
visual-studioopen-sourceprojectsoftware-distribution

How to distribute the source of a Visual Studio project


I want to distribute the Visual Studio project source I have made, but I am not sure how to do it.

I have a project with a file structure as follows:

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

All I have written is the file.c. What at a minimum do I need to include with file.c (assuming I want others to be able to use the source/compile it, etc. in Visual Studio)?


Solution

  • It should be enough to share the following files, so others can build your project without any problems.

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

    Before submitting/checking the code, I recommend you try if generated files are required to build and run the application. If not, you should not include them.