Upgrading my asp.net mvc project to .NET 4.7.1, but now this error occurs in cshtml pages, when I use IEnumerable property in my Model:
Error CS0012 The type 'ValueType' 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'.
I found the solution!
The big problem for lack of netstandard reference in web.config.
Error:

Solution:
Add reference for netstandard in web.config
<system.web>
<compilation debug="true" targetFramework="4.7.1" >
<assemblies>
<add assembly="netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51"/>
</assemblies>
</compilation>
<httpRuntime targetFramework="4.7.1" />

Result:

Thank you for this. This help me with a problem I've been fighting for the last few hours... ugh.
Now I just wish I new why I need to do this...
Closing as resolved
Most helpful comment
I found the solution!
The big problem for lack of netstandard reference in web.config.
Error:
Solution:
Add reference for netstandard in web.config
<system.web> <compilation debug="true" targetFramework="4.7.1" > <assemblies> <add assembly="netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51"/> </assemblies> </compilation> <httpRuntime targetFramework="4.7.1" />Result: