Royi Namir
Royi Namir

Reputation: 148524

Shared assemblies in one location?

I have a big project with many subprojects. (as mentioned in the drawing)

Both WebSiteA and WebSiteB has referenced to both DLL projects.

however when I change the dll's - I need to update each bin in each webSite.

I Don't want that.

I know I can put them in GAC but I was told not to (don't ask me why please.)

enter image description here

Is there any solution like :

enter image description here

so when I update any dll - I put it only at one place ? (and so the dll's won't be at each site's bin)

Upvotes: 1

Views: 102

Answers (2)

Aristos
Aristos

Reputation: 66641

You can make a trick with the .refresh file reference, but not tested on the live server.

First place your common dll, on a common directory.
Second on each bin, place the *.refresh file together with the dll, that says inside from where to update the dll if a new version is found.

and so you have inside the Bins something like:

mySuperModule.dll
mySuperModule.dll.refresh

and inside the mySuperModule.dll.refresh the location of the module that need to check for update ->

d:\Dlls\mySuperModule.dll

where d:\dlls are the common place for the dlls that search for new updates.

At the end you only update the common directory dlls, and you left the projects make the rest automatic.

Upvotes: 2

Ryan McDonough
Ryan McDonough

Reputation: 10012

The whole point of the GAC is to provide that functionality, if you don't use that then you can't share the DLLs in the way you want. This is due to how sites are secured and separated from each other.

Upvotes: 0

Related Questions