开发者

Visual Studio 2008 - Build overwriting bin referenced dlls

I'm trying to figure out if what I'm experiencing in 2008 is new or something wrong with my installation.

We have multiple web application projects and multiple class libraries. Both the web projects and class library reference the same third party dll, but each from their own bin. The third party dll in each of the web projects may be newer than the version in the class library and we just us assembly redirects in the config so the class library will use the newer version when used in the web project. We do this to allow us to not have to upgrade all web projects since they may have different release cycles. Granted this only works well when functionality that is used in the class library is not removed or greatly changed from the newer version of dll that resides in the web project.

The issue is with VS2008. The bin referenced third party dlls are stored in source control and hence are set to read only in explorer. For some reason when you build the web projects in 2008 the read only attribute is removed and the dll is replaced with the older version of the dll from the class library. This never occured with VS2005. You would see in the output of 2005 that access was denied to the dll file since it was write protected, but 2008 just goes ahead and overwrites the dll. Was this something that was changed or is there a setting that I'm overlooking? Another issue is Studio wants to check out the project file on build and add the compiled dll of the class library to the project. The class library is setup as a project reference of the web projects wit开发者_如何学编程hin Studio. Everything worked fine in 2005, but not 2008.

Any help would be appreciated.

thanks


Instead of adding your bin directory to source control (which just seems wrong), why don't you put the dll in a folder called 'Third Parties' within your project and reference it from there? When you build, this dll will be copied to your bin directory.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜