.net 应用程序中缺少命名空间和引用错误

Missing namespace and references error in .net application

我从源代码管理下载了一个应用程序并克隆到我的本地文件夹。当我尝试构建应用程序时,我看到了很多 'missing reference' 错误。

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

log4net 程序集已添加到项目中,但我在 assemble 名称附近看到警告

代码有一个

using Microsoft.Reporting.WebForms

然后我看到了

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

我尝试了什么:

我想确保 VS 正在构建被引用的项目。所以我把Configuration下的'Build'设置为勾选

我还尝试将 Target Framework 从 .Net Framework 4.0 更改为更高版本。运气不好!

有什么帮助吗?

1- 右键单击​​您的解决方案
2- 单击 "Manage NuGet packages for solution"
3- 搜索 log4net,如果已安装,请将其卸载
4- 再次安装 log4net
5- 全部重建