I Just started using Umbraco CMS v.9 and when I try to see the page I just created it shows an error.
Code
@using Umbraco.Cms.Web.Common.PublishedModels;
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<ContentModels.HomePage>
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels;
@{
Layout = null;
}
<!DOCTYPE>
<html>
<head>
@Model.Name
</head>
<body>
<div>
@Model.Check
</div>
<div>
</div>
</body>
<footer>
</footer>
</html>
Error:
The type 'IEnumerable' is defined in an assembly that is not referenced. You
must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'
I've been searching the solution for a while. I came across a lot of other people who have encountered similar (my assumption) problems. I tried to add to web.config something like:
<compilation debug="true" targetFramework="4.5">
<assemblies>
<add assembly="System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e"/>
</assemblies>
</compilation>
but any time I rerun, the file web.config get overwritten with the original code deleting the lines I wrote. (this thing is really upsetting me)
How this thing can be fixed?
Thanks