Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

log4net preventing web (.aspx, .ascx, .master) intellisense from working

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.

like image 340
SamWM Avatar asked Jan 22 '23 01:01

SamWM


2 Answers

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

like image 177
SamWM Avatar answered Jan 23 '23 14:01

SamWM


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

like image 26
Dai Bok Avatar answered Jan 23 '23 14:01

Dai Bok