IDE Used :: VS.NET 2015, 2017
Version Upgrade :: 4.5 To 4.6.1
The view code is having some HTML helpers like @Html.TextBoxFor and @Html.PasswordFor. It is showing the red lines underneath them and on runtime the page throws the exception.
My asp.net solution contains more than 30 projects inside. I have upgraded the targeted framework to 4.6.1 . I tried to follow the solution offered in the post VS 2015 IntelliSense: Assembly Not Referenced Error. I tried copying the assembly references inside the web.config, but no luck so far. I tried to open the project in the latest VS.NET 2017 also. But again i am getting the same issue.
Please suggest how to fix these errors. This is getting on my nerves now and i wasted lot of time trying to fix it.
The type 'Expression<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
'ModelErrorCollection' does not contain a definition for 'Any' and no extension method 'Any' accepting a first argument of type 'ModelErrorCollection' could be found (are you missing a using directive or an assembly reference?)