Best way to eliminate all intermediate files from Visual Studio project folders?

I am one of those people who don't like this when random non-source files are deleted by the IDE in the source directory. Especially if they are generated as part of an assembly.

I found that by overriding both the <IntermediateOutputPath> and <BaseIntermediateOutputPath> parameters, I can share the clutter left behind into several empty directories that I suppose I can tolerate.

However, using "<BaseIntermediateOutputPath>" forces Visual Studio to ask if I really want to open the project, because it considers this to be a "dangerous" add-on.

Does anyone know how to disable this security check, or perhaps a way to get rid of all intermediate files without using "<BaseIntermediateOutputPath>" ??

+3
source share
1 answer

You tried to write a macro in a post-build event for your project. You have to fulfill

DEL -S -Q MyProject/bin/*.*
DEL -S -Q MyProject/obj/*.*

Hope this helps,

Bill

+1
source

Source: https://habr.com/ru/post/1708116/


All Articles