debug vs. build vs. publish?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • HaLo2FrEeEk
    Contributor
    • Feb 2007
    • 404

    debug vs. build vs. publish?

    I've been wondering this for a long time. Mainly what is/are the difference(s) between build and publish? I know that when I debug or build a version gets saved to both /bin and /obj, I usually run the one from /bin/build, but what is the difference between the build in /obj and /bin? Is building a good distribution method?

    If I make a program I want other people to be able to use, I build it then upload just the executable created, leaving the manifest and other files generated. Is there a reason those files are generated? And when I publish it seems to make a "installabl e" version of the project, but most times I don't want that.

    And there's compile. I always assumed that building the project compiled it, because it generates an executable that I can run on other computers. Is something else happening, or is building and compiling the same thing?

    I want to do these things right, so the more I know about all this the better.
  • GaryTexmo
    Recognized Expert Top Contributor
    • Jul 2009
    • 1501

    #2
    Well, for the most part, they're just build configs. In Visual Studio you can set up multiple build configs to save different settings, then select whichever from the dropdown list and build that. By default, when you create new projects in VS it makes a debug and release one. The debug config builds with full debugging info and some other settings turned on, whereas the release has different debugging settings. You can check all this by checking the solution/project settings for each config. You can also add/edit/delete configs to suit your purposes.

    Comment

    • HaLo2FrEeEk
      Contributor
      • Feb 2007
      • 404

      #3
      But which is a better option when it comes to distribution? Build, publish, or compile? I can build right within visual studio and give people the file in /bin/release and it works fine (as long as the .net framework is installed on that computer.) Are there advantages to using an actual compiler as opposed to building or publishing?

      And I still want to know the differences between building and publishing, you didn't answer that.

      Comment

      • GaryTexmo
        Recognized Expert Top Contributor
        • Jul 2009
        • 1501

        #4
        I was under the impression that building and compiling were the same, perhaps that's not the case. I don't know what publishing is... maybe it has something to do with web or ClickOnce applications?

        Maybe give google a try. Sorry, I don't know the answer to those ones.

        Comment

        • alexis4
          New Member
          • Dec 2009
          • 113

          #5
          I can say for sure that in low level C programming, you compile a single file to get warnings and errors about this specific file. On the other hand, you build not a single file, but the whole project.
          If for example you have a global variable in fileA and you use this variable in fileB without declaring it as external, then the builder will throw the error. If you compile fileA as standalone you will get no error. If you compile fileB you will get an error. So I always use build. I compile a single file only to check out that this specific file has no errors without further information about the other files of this project.
          This stands for low level C but in VS I haven't seen any "compile" command. Have you?
          Debug on the other hand downloads your program on the CPU and gives you the chance to de-bug your program. Breakpoints, step by step run and everything you need to discover the mistake in your code which caused the bug.
          About publishing I don't know much details. I know that the publish feature is primarily for websites, moving your dll to a server or something like that...

          Comment

          • HaLo2FrEeEk
            Contributor
            • Feb 2007
            • 404

            #6
            So I'm probably just fine sticking with building as a distribution method then. Thanks for the help guys, much appreciated!

            Comment

            Working...