Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The type or namespace name could not be found in AssemblyInfo.cs

Tags:

c#

I got the compile error 'The type or namespace name 'log4net' could not be found in AssemblyInfo.cs'

What does this error mean and how do I start going about solving it?

This is the offending line in the AssemblyInfo.cs file

[assembly: log4net.Config.XmlConfigurator(ConfigFile = "Log4Net.config", Watch = true)]

I just download a new project and ran into this error on the compile. How does an entry like this even get added to this file?

like image 942
Walter Avatar asked Sep 17 '25 22:09

Walter


1 Answers

Right click on your project in the solution explorer and click Add Reference

A window will pop up and you should be able to click on a browse tab.

navigate to wherever your log4net.dll file is, and select that as the reference.

If you don't have a log4net.dll, you can download log4net from This page

like image 179
Sam I am says Reinstate Monica Avatar answered Sep 19 '25 13:09

Sam I am says Reinstate Monica