Hack Forums
[.NET] Visual Studio creating a lot of junk files in Release folder? - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] Visual Studio creating a lot of junk files in Release folder? (/showthread.php?tid=5759267)



Visual Studio creating a lot of junk files in Release folder? - Kyle17 - Nov 27, 2017

Hello all.

I'm creating a game I'm hoping to eventually have on Steam, but I want to keep the total filesize as low as possible.
Long story short: I'm not sure how to lessen overall filesize other than cleaning the directory of some files, but which ones can I get rid of and have my program still work properly? I don't know if there's a plugin or a certain technique I'm missing in Visual Studio Community 2017 that helps me with this issue... Right now it's totaling to over 169 MB (and it's really simple atm, just a few things in place, should be nowhere near that... maybe around 60-70 MB would what I'd expect)
Any and all help is appreciated  🤝 

(Files with a bracket next to them i'm mostly sure with what to do to them).
(List of files - Expand me) (Click to View)


RE: Visual Studio creating a lot of junk files in Release folder? - Ninja - Nov 28, 2017

Usually PDB and XML files are not needed. I am pretty sure you only need the DLL files, but that can different per library you use. And you can pack the DLL files in the executable itself.


RE: Visual Studio creating a lot of junk files in Release folder? - He B TeMy - Nov 28, 2017

Have you tried to rebuild the project? (clicking rebuild next to build)


RE: Visual Studio creating a lot of junk files in Release folder? - Washi - Nov 28, 2017

First of all things you could try is to build the solution using the Release configuration instead of the Debug configuration.
Spoiler (Click to View)

The PDB and XML files are not necessary to run the application in the first place. You can safely remove them. If you want to really minimize your build output, make sure you have unchecked the XML documentation file that you can find in the Build tab of the Project Properties, as well as set the creation of any debugging information to "none" in the advanced options that can be found in the dialog that pops up upon clicking the "Advanced" button in the same tab.

Keep in mind, though, that PDB files are quite useful nonetheless, even in Release configuration. They provide you with just a bit extra information in the stack trace when errors occur, such as file names and line numbers. See more here: https://stackoverflow.com/questions/5457095/release-generating-pdb-files-why

You could try to find out which of the files the app is really using. Are you actually using all of the libraries and files that you can find in your output folder? Other than that, I don't really see how much more you can shrink the output down. You could use a packer, but you have to check the licenses for these files to see if they actually allow you to embed the dlls and files into your application. This is really important legal stuff especially if you are going to release it to the public. And then again, a packer only gets you so far in compressing the libraries. And sometimes they also introduce some interesting bugs that you might not have expected in the first place.

The final question remains though, is it worth all the effort in shrinking down the size in the first place? If you are planning on releasing it on steam, then I don't think the few extra megabytes would matter much. Much of the audience on steam have a pretty good computer with enough space on their harddrives anyway, so I doubt that's going to be an issue.


RE: Visual Studio creating a lot of junk files in Release folder? - Kyle17 - Nov 29, 2017

(Nov 28, 2017 04:13 PM)Washi Wrote:  build the solution using the Release configuration instead of the Debug configuration.
Building using the Releases settings still create so many useless files, and even some "debug" files... So that's rather confusing.

Quote:The final question remains though, is it worth all the effort in shrinking down the size in the first place? If you are planning on releasing it on steam, then I don't think the few extra megabytes would matter much. Much of the audience on steam have a pretty good computer with enough space on their harddrives anyway, so I doubt that's going to be an issue.


No, and yes. I know those downloading on Steam wouldn't mind a 150 MB download, but for what it actually is, it's monstrously large and shouldn't be anywhere near that for what it is. There are only a few images, an embedded HTML page with a few Javascript animations shown by the Awesomium framework and that's as advanced as it gets. The game has a server, but that's a separate EXE I packed into Resources for later extraction...

Thanks for the input though.