views:

16

answers:

1

Hello,

I recently faced an issue with a third-party DLL we use in one of our ASP.NET websites.

When I need to update it, I download a newer version from vendor's website and just replace the binary in the "bin" folder in the website folder. Immediately Visual Studio loses this library's namespace (says the method is not accessible due to protection level). And recently we started getting random "Unable to compile" exceptions from the site, we connect it with the library.

But if I delete the old library from the solution explorer, and then Add Reference to the newer version, everything works perfectly.

Is it a bug of Visual Studio, the library we use or our site? Has anyone ever faced same issue and knows how to fix it?

We use VS 2010, .NET 4.0 on Win7 Pro x64, TFS'10. The project is a VB.NET website (not web application).

Appreciate any help,

Tim

A: 

This is possible with strongly named assemblies - the previous version would have different name than the newer one. Once you replace the file, old referenced assembly is simply not available, so refreshing the reference in VS does the trick.

VinayC
Thanks for the reply.Is there any way to avoid it?
Tim