3

I'm one of those people who rather dislike it when random non-source files are dropped by the IDE into my source directory. Especially if these are generated as part of the build.

I've found that by overriding both "<IntermediateOutputPath>" and "<BaseIntermediateOutputPath>" I can strip down the mess left behind to just a couple of empty directories, which I suppose I can tolerate.

However using "<BaseIntermediateOutputPath>" causes Visual Studio to ask whether I really want to open the project because it thinks this is an "unsafe" addition.

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

2
  • You might get more answers if you specified what files you mean, as I have no idea what you're talking about. Commented May 12, 2009 at 13:56
  • I mean all the files under MyProject/bin/* and MyProject/obj/* Commented May 12, 2009 at 14:05

1 Answer 1

1

Have you tried writing a macro in the post-build event for your project. You should be able to execute

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

Hope this helps,

Bill

Sign up to request clarification or add additional context in comments.

1 Comment

This is unfortunately only a half-fix - for some reason VS now decided that it needs to create an empty "bin" directory at various nesting levels in the folder hierarchy. Sigh.... What I ended up doing is just write a python script that wipes all bin & obj directories starting at current directory. Not a fix for everyone, but works for me.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.