views:

383

answers:

2

In my Visual Studio 2008 web vbproj, I have included only certain files in the bin folder. I am using browserhawk and it needs to have some browser definition files (maindefs.bdd, etc...). I now always have them when I deploy the web app.

When I compile my application, VS automatically adds the newly compiled .dlls to the project. I have tried to use "Exclude from Project" on the files that were added, but after I clean the solution, it re-adds them again.

How can I disable this action?

+2  A: 

You won't be able to if your bin folder is included in your project. Instead, you can put your browser definition files in your project under a separate folder, or just under the project, and change the Build Action to Content (or None) and Copy to Output Directory to Copy Always (or Copy if Newer) in the properties for each file you want to go to your bin folder. That way the files are part of the project and get added to the bin folder automatically.

Richard Hein
A: 

Use a Post Build Event to copy the files. Be sure the browser hawk files build action is set to "do not copy". Then goto your project properties, select the "Build Events" tab and add the following to the Post-build event command line:

copy "$(ProjectDir)\common\browserhawk*.*" "$(TargetDir)"

Be sure to include the quotes if your project path has spaces in it.

Bill A.