Rick
Rick

Reputation: 1559

Missing namespace and references error in .net application

I downloaded an application from a source control and cloned to my local folder. When I tried to build the application I get to see lot of 'missing reference' errors.

The type or namespace name 'log4net' could not be found (are you missing a using directive or an assembly reference?)

The log4net assembly is already added to the project but I see a warning near the assemble name

The code has a

using Microsoft.Reporting.WebForms

and I get to see

The type or namespace name 'Reporting' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

What I tried:

I want to make sure VS is building the project that's being referenced. So I set the 'Build' under the Configuration to be checked.

I also tried changing the Target Framework from .Net Framework 4.0 to higher version. No luck!

Any help?

Upvotes: 1

Views: 4731

Answers (1)

hdz200
hdz200

Reputation: 355

1- Right click your solution
2- Click "Manage NuGet packages for solution"
3- Search for log4net, if it's installed, uninstall it
4- Install log4net again
5- Rebuild all

Upvotes: 3

Related Questions