• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

.Net dlls - what's going on?

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    .Net dlls - what's going on?

    This is a really basic question and no doubt goes to show what a charlatan I am.

    However...

    Was deploying the noddiest little change to clientCos web app.
    Normally I'd copy the dlls to a backup directory, but today I just made a copy in the same folder (bin) and dropped the new ones in.

    No doubt it's no surprise that the app broke.

    Copied the old files back, and it was still broke. Got hold of the error, and it was moaning about the - Copy version of my dll. Removed the - Copy version and everything fine.

    Anyone got a link to an online resource that explains what it's doing? Why did it ever try and run my - Copy.dll file? I'm sure I used to be able to do this in the old days - perhaps something specific to web apps happening here?

    Ta

    #2
    I think the problem will be that any .dll file that gets dropped into a bin folder is automatically included in the codebase of the application when it recompiles (which happens as soon as IIS detects the new files).

    The problem then will be that you'll have two identical sets of classes/namespaces - one inside your original (old) .dll and one in the new file. These will conflict and the web application won't know which ones to use, hence the error.

    Whenever I deploy like this, I make a backup copy of the entire bin folder, then drop the new files into the live bin and overwrite the existing files. If any problems you can just delete the bin folder and restore the copied bin.

    Comment


      #3
      Cheers. Makes sense. I think when I've done it in the past I've had dlls for separate projects which have been referenced by name, so I suppose that's why it works.

      Lesson learned.

      Comment

      Working...
      X