c# - 错误 "The type or namespace name ' DotNetOpenAuth' could not be found"in VS2013 but not not VS2012

标签 c# asp.net visual-studio-2012 visual-studio-2013

我有一个 ASP.NET MVC 3 项目,它使用通过 NuGet 检索的 DotNetOpenAuth。包恢复已启用。该项目使用 .NET 4(完整配置文件,而非客户端)。

在 Visual Studio 2012 中,项目可以正常编译和运行。

在 Visual Studio 2013 中,出现以下错误:

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

DLL成功还原到packages文件夹,也正确复制到网站项目的bin文件夹。添加了所有适当的 using。每次我测试一个干净的工作目录的变化。解决方案中的所有其他项目都可以正常编译。 Website.csproj 文件中的程序集引用如下所示:

<Reference Include="DotNetOpenAuth.Core, Version=4.3.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246, processorArchitecture=MSIL">
  <HintPath>..\..\packages\DotNetOpenAuth.Core.4.3.1.13153\lib\net40-full\DotNetOpenAuth.Core.dll</HintPath>
</Reference>

我该如何解决这个问题?

最佳答案

要为 ASP.NET(网页)安装 DotNetOpenAuth 扩展,请在程序包管理器控制台中运行以下命令

PM> 安装包 DotNetOpenAuth.AspNet

关于c# - 错误 "The type or namespace name ' DotNetOpenAuth' could not be found"in VS2013 but not not VS2012,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19572893/

相关文章:

asp.net - URL 片段为空

asp.net - 在vb.net中根据特定条件清除gridview

c# - Entity Framework 迁移错误

visual-studio-2012 - 在 Visual Studio 2012 的 Web 项目中排除目录加载

C# 正则表达式仅在标签外部替换字符串

c# - WPF 中的数独 - 我应该为表格使用什么基本元素?

c# - 返回c#中数组中取n个连续字符串组成的第一个最长的字符串

c# - 具有丰富类型的 C# 中的 Const 正确性

visual-studio - Visual Studio不安装.vsix文件

c++ - 使用 VS2012 未为 Qt 加载引用