Wrote a small application. I want to introduce it for one of the scientific portals. Compiled the project, the output folder of which was Release. Now the folder structure is: release folder structure

database.txt,options,log.xlsx - files / directory used by the program and spamer.exe - the executable file itself.

Please tell the rest of the files what? Are they vital to the work of the program? How to clean the folder to the maximum? Because the installer will not be made, and the final version of the program should be a folder with filename.exe inside (some kind of portable version)

    2 answers 2

    • foo.application is a manifest for installing ClickOnce applications. If you use it, then leave, actually.
    • foo.exe.config - configuration file containing global settings. It may contain settings of the .NET version, lines for connecting to the database, logging settings, etc. You can often delete without consequences, but not recommended.
    • foo.exe.manifest - manifest containing compatibility with OS and shell versions, required level of rights, etc. The default settings are usually suitable, but not recommended to be deleted.
    • foo.pdb is a file for debugging. When exceptions occur, it provides detailed information about the call stack. You can leave it to make errors from the client easier to analyze.
    • foo.vshost. * - files for cleverly launching an application when debugging in Visual Studio. You can safely delete.

      After compilation, if no further debugging is required, then files with the extension .pdb, .vshost. * Can be deleted.
      Files .config - usually also not needed, if nothing was added to it themselves.

      Of all the files that are created at compile time, basically, only files with the exe and dll extension are required.
      And the most important thing is the files your application works with - you can easily find them after Clean.
      If in Visual Studio in Solution Explorer to become a project and select Clean in the context menu, then everything superfluous is deleted, only your files remain. What is it for? For example, while debugging a program in CurrentDirectory, the program creates some files with very necessary information. In order not to lose them, and not to understand what-is-what, you do Clean - all unnecessary files are deleted, and you can simply copy what is left.

      • If you select "Clear", the * .exe file with unnecessary files is also deleted. During the reverse recompilation, both the * .exe file and unnecessary files appear :) - Dmitry Shulga
      • @DmitryShulga after Clean you can find your files like log.xlsx, etc. - sometimes it is very useful. - Stack
      • Sorry, I did not quite understand - Dmitry Shulga
      • one
        @DmitryShulga while debugging a program happens in CurrentDirectory a program creates some files with very necessary information. and there are a lot of them. so, in order not to lose them, and not understand what-is-what, you do Clean, all unnecessary files are deleted, and you can just copy what is left. - Stack
      • one
        "it is not needed if they didn’t add anything to it themselves" - Do not manually add something to the config so that it suddenly becomes necessary. Different tools change it on their own, and even the change of the .NET version in the project properties is written to this config. - Athari