When I include log4net in an ASP.NET MVC project, intellisense stops working for master pages, user controls and pages. The first line of the file has a red underline, with the following message:
ASP.NET runtime error: Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
Any idea what the cause of this is? The project builds fine and I can debug and deploy it.
Managed to solve it in the end, had the clear the temporary asp.net files folder, %SystemRoot%\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
I had the same problem! I found that you need to delete different locations for win7/x86/x64
Clear out the temporary framework files for your project in:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\
For Windows 7, the path is:
C:\Users[username]\AppData\Local\Temp\Temporary ASP.NET Files\
For 64 bit systems with 'Framework' in the path the full path is:
C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\
Found the solution here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With