0

I have a VS2010 Web Application Project that's compiled to bin\subdir\ via Output Path and without build events.

There's a few other projects that my main project is referencing but for some reason the dll's for the other projects goes into BOTH bin\subdir\ AND bin! It only applies to other projects - if I reference a dll in my main project and set it to Copy Local it will only go to bin\subdir.

I have checked that all my configurations in the main project are pointing to bin\subdir\ and that none of the other projects are pointing to the bin-folder.

How do I tell VS2010 to ONLY compile to bin\subdir\ and never touch bin\?

Edit: Just tried creating a blank web project, changing output path to a directory in the bin-folder, adding a project to the solution, referencing it and then I compiled: dll's for the referenced project wind up in both bin and the directory from output path. Could this be a VS2010 bug?

Quick fix: Put the files from your bin folder in another folder and put this in your post build event:

del /q "$(ProjectDir)bin\*"
copy "$(ProjectDir)..\lib\Sitecore Bin" "$(ProjectDir)bin"
Jan Sommer
  • 3,698
  • 1
  • 21
  • 35
  • Hard to see from here. But take copy local off your references, Clean out all your build folders and see where you are at. – Tony Hopkinson Jun 15 '13 at 10:14
  • It's so weird... Cleaning the solution, setting Local Copy to false on my project references and compiling results in bin\subdir\ with none of the other projects dlls (as expected) but bin\ contains them all! (I deleted them in bin\ before compiling) – Jan Sommer Jun 15 '13 at 10:41
  • Can't see it from here. Are these project references, or are you referencing the dll in bin/subdir? – Tony Hopkinson Jun 15 '13 at 14:41
  • it's project references.. bin\subdir is my output path for dll's – Jan Sommer Jun 15 '13 at 16:31
  • I think you've confused it. What are you trying to achieve with not building to the bin folder. Normally you'd only do that with separate solutions. – Tony Hopkinson Jun 15 '13 at 19:53
  • So if you set output directory to bin\subdir\ you would expect all your project references to go to both bin\subdir\ and bin\? Notice that it's project references - if I reference any kind of dll not in the gac it's only copied to bin\subdir\. No matter what you'd usually want, this doesn't make sense. Also, web.config gives you the possibility to use additional bin folders. Look up web.config probing. – Jan Sommer Jun 16 '13 at 08:33
  • To be honest I wouldn't care if it was building to both as long as it was building to the one I wanted. – Tony Hopkinson Jun 16 '13 at 09:56
  • Have you considered that I asked this question because it solves one of my problems? Whether you care or not really doesn't matter. I also don't care what directory my dll's are in until my project depends on them being in separate directories. So please, if you don't know how to fix this issue, use your time on questions where you can actually provide value. – Jan Sommer Jun 16 '13 at 10:05
  • No problem! Forget I even responded. No really! – Tony Hopkinson Jun 16 '13 at 19:20

1 Answers1

0

It's fixed in Visual Studio 2012.

Jan Sommer
  • 3,698
  • 1
  • 21
  • 35