System.Web.HttpCompileException:类型“<>”在未引用的程序集中定义
System.Web.HttpCompileException:The type '<>' is defined in an assembly that is not referenced
刚刚将 .NET Framework 升级到 4.7.2 后发现这个错误:
System.Web.HttpCompileException: some.cshtml(95): error CS0012: The
type 'IEnumerable<>' is defined in an assembly that is not referenced.
You must add a reference to assembly 'netstandard, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.'
我应该在哪里添加引用?
发现于 github。将以下内容添加到 web.Config 文件:
<compilation debug="true" targetFramework="4.7.2" >
<assemblies>
<add assembly="netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51"/>
</assemblies>
</compilation>
刚刚将 .NET Framework 升级到 4.7.2 后发现这个错误:
System.Web.HttpCompileException: some.cshtml(95): error CS0012: The type 'IEnumerable<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.'
我应该在哪里添加引用?
发现于 github。将以下内容添加到 web.Config 文件:
<compilation debug="true" targetFramework="4.7.2" >
<assemblies>
<add assembly="netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51"/>
</assemblies>
</compilation>