Reputation: 66573
I've set the OutputPath, IntermediateOutputPath, and BaseIntermediateOutputPath tags in all my csproj files. Despite that, Visual Studio creates extra "obj" folders in my source directories. As far as I can tell, it creates the directory obj\Debug\TempPE and then leaves it empty.
I don't mind Visual Studio creating all sorts of crap, but how do I tell it to create it only in places where I want it, not in the source directory?
Upvotes: 5
Views: 4733
Reputation: 1
Actually, also Microsoft suggests you to add command as a post-build action
rd "$(ProjectDir)obj" /s /q
see more at To set the intermediate output directory for a project (.NET projects)
Upvotes: 0
Reputation: 132
Remove obj
folder after build works for me.
There is two way to remove it.
rmdir /s /q obj
Or
.csproj
<PropertyGroup>
<PostBuildEvent>rmdir /s /q obj</PostBuildEvent>
</PropertyGroup>
Upvotes: 0
Reputation: 754763
It's possible that you're running into a bug. If you see the obj folder being created but not containing any data and you see the expected files being created in the path you specified it may be an oversight.
If this is the case can you please file a bug on connect?
Upvotes: 1