I have a web application project. I have DLLs that I reference in the project stored in my bin/ folder. Well, whenever I do a rebuild or clean from Visual Studio, it will delete everything in that folder. How do I prevent this from happening?
I'll stay away from asking the 'why' question and just state the how. Mark the files as read only and VS shouldn't delete them.
Do not put anything into bin yourself. bin is the target folder for binaries - it is not a source folder for binaries.
Create yourself a lib
folder or something like that to put your third-party binaries into. You might even name it "Third Party Binaries", since not everyone knows that "lib" means the same thing. Make your references to the binaries in this folder, and Visual Studio will copy them into bin
when necessary (including on a rebuild).
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