Log4net prevents the use of web (.aspx, .ascx, .master) intellisense

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. Invalid parameter. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

Any idea what is the reason for this? The project builds great, and I can debug and deploy it.

+4
source share
2 answers

I managed to solve the problem at the end by removing the temporary folder with asp.net files, %SystemRoot%\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files

+7
source

I had the same problem! I found that you need to remove different places for win7 / x86 / x64

Remove the temporary frame files for your project in:

C: \ WINDOWS \ Microsoft.NET \ Framework \ v2.0.50727 \ Temporary ASP.NET Files \

For Windows 7, the way:

C: \ Users [username] \ AppData \ Local \ Temp \ Temporary ASP.NET Files \

For 64-bit systems with "Framework", the full path is in the path:

C: \ WINDOWS \ Microsoft.NET \ Framework64 \ v2.0.50727 \ Temporary ASP.NET Files \

Found solution here

+2
source

All Articles