With my C# project in Visual Studio 2010, I noticed that msbuild compiles to a \obj directory, and then copies the files to the real output directory:
CopyFilesToOutputDirectory:
Copying file from "obj\x86\Debug\Manager.exe" to "bin\Debug\Manager.exe".
There is no custom msbuild script, it's all the visual studio defaults. Is there any way to make it build directly to bin\Debug\Manager.exe; circumventing the "CopyFilesToOutputDirectory" step?
I just wonder why do you want that. There is no easy way since by default obj folder is used when compiling the assemblies (executables and libraries). Only when it is successful the output is copied to bin folder. That is why is visual studio can successfully run the last successful build which is run from bin. So in essential there needs to be obj folder. You can extend the build mechanism, alter and tweak a bit by using this builder and not depending on the default builder by seeing this link
No there isn't, not really anyway. Because the obj folder is holding the temporary (not linked) files during the build.
More reading: What are the obj and bin folders (created by Visual Studio) used for? and here: VisualStudio: How to save the obj folder somewhere else
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With