5
votes

Found this error just after upgrading the .NET framework to 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'.'

Where should I add the reference?

1

1 Answers

7
votes

Found at at github. Add the following to the web.Config file:

<compilation debug="true" targetFramework="4.7.2" >
  <assemblies>
    <add assembly="netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51"/>
  </assemblies>
</compilation>