Why does ASP.NET web site reference assembly from GAC, when adding local reference?

Posted by Konstantin on Stack Overflow See other posts from Stack Overflow or by Konstantin
Published on 2010-01-07T16:55:07Z Indexed on 2010/04/29 18:37 UTC
Read the original article Hit count: 326

Filed under:
|
|

When you use ASP.NET web site (instead of web application model) and add reference to an assembly from local folder, Visual Studio, it seems, understands that this local assembly is also in GAC and so does NOT copy this assembly to bin folder (as it does with non-GAC assemblies), but simply adds new record in web.config file.

Why such a behaviour? Is it possible to force copy to bin folder (I need this since .dll is not on target environment)? I can add assembly to bin folder as file and it will work, but in this case bin folder contents will be in source control, which is not good.

© Stack Overflow or respective owner

Related posts about visual-studio

Related posts about clr