I am using VS 2010 web-application project. I want to change the default OutputPath property of the web-application to a directory elsewhere. This does not seem to be entirely working when I have an other project in the solution:
FIRST:
- Create a blank web-application project, WebApplication1
- Change the OutputPath in the project's properties from
bin
toc:\binaries
- Right-click on the project in solution explorer, and build.
Everything works as expected, and WebApplication1.dll
is copied to the c:\binaries
.
THEN:
- Add a class library to the same solution, ClassLibrary1
- Add the class library as project reference to the web application.
- Right-click on the web-application project in solution explorer, and build.
Both ClassLibrary1.dll
and WebApplication1.dll
are copied to c:\binaries
, but now there is a WebApplication1\Bin
directory created which contains only ClassLibarary1.dll
QUESTION:
Has anyone encountered this before? The only reference on the web I found was this, with no answer. Appreciate any way to disable creation of the Bin
folder.
MORE INFO
This only happens when building from inside visual studio. If I use
msbuild WebApplication1.csproj
, this mysteriousBin
directory is not created.I dug through the msbuild logs, but to no avail. I could not find any property pertaining to that path. The capital
B
forBin
is also strange, all paths when used in msbuild are usuallybin
.Last I removed the
WebApplication.targets
file Import from the web application's proj file but it did not make a difference. In fact, looking at the msbuild logs, there do not seem to be any targets from the WebApplication.targets getting executed.