1

I have a dll being used by a asp.net website. I made some change to the dll and would like to replace the current dll in the bin directory.

Can I just simply drop the new dll in or is there a better way? I don't want to reset the iis for this.

CodingMate
  • 333
  • 4
  • 16
bach dang
  • 185
  • 5
  • 20

2 Answers2

1

Yes you can make that as long as your modifications won't break the project (Change return type, removed function, etc..) I wouldn't highly suggest that, but sometimes we need to place a hot fix on the fly until we full deploy

CodingMate
  • 333
  • 4
  • 16
  • I have done many times before. I cannot remember if the dll is loaded into memory by asp.net worker or cache in anyway. – bach dang Mar 04 '14 at 19:45
  • I've done it before too and I think it loads the new dll whenever a new request is called. as per [MSDN](http://msdn.microsoft.com/en-us/library/t990ks23.aspx) **If you change the .dll and write a new version of it to the Bin folder, ASP.NET detects the update and uses the new version of the .dll for new page requests from then on.** – CodingMate Mar 04 '14 at 19:50
1

Be careful with that. I prefer to have all projects pointing to the DLL project in the same solution.

I would point it to the release folder so that they share the same DLL.

When you rebuild your solution, if something is wrong you will know because it will fail to build.

meda
  • 45,103
  • 14
  • 92
  • 122
  • 1
    That is totally correct, whenever I add a dll only not a reference to a project I either do that, or adding it to the dll folder I make so I don't lose anything. Also that folder helps us when using the TFS :) – CodingMate Mar 04 '14 at 19:52
  • 1
    @bedo no need to take risk, ever heard of [DLL hell](http://stackoverflow.com/a/1379312/1880431) lol – meda Mar 04 '14 at 19:56
  • Yes, unfortunately I do, it happened with me once, and it was a **nightmare** trying to figure what happened. we ended up re-adding the dlls to the solution and re-deploying from the beginning and ofcourse, shutting the service until we would figure that out. It is really tricky situation to redeploy or replace a mere dll, theoretically it should be a piece of cake, but my personal philosophy redeploy and save yourself huge pain – CodingMate Mar 04 '14 at 20:02