'Visual Studio does not recognize a referenced assembly?
Opened an old project from years ago. Build fails because Visual Studio (2019) does not recognize an assembly that is clearly there - specifically, Autofac.
You can see it in project references (not marked as missing)
You can see it in the Object Browser, listing all the types referenced in the code
- But in code, none of the types show up, gone AWOL.
What is going on here? Intellisense doesn't even pick up types (Tried cleaning, rebuilding, re-importing packages)
Solution 1:[1]
Okay, this is what worked. I had to remove the reference to the Autofac dll, and then add it back. Note - I added it back from the same exact location, the same exact version. But after this, Visual Studio 'magically' recognized it. If you come across a similar problem, and nothing else works, give it a try. I don't know the reason, I can only assume this is some sort of a bug in Visual Studio.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |