In ASP.NET Core MVC the solution is to add a using
in _ViewImports.cshtml, instead of putting it web.config in the View folder when working with ASP.NET MVC 5.
_ViewImports.cshtml
@using mySolution
@using mySolution.ViewModels // <-- Add this, and place your ViewModel (e.g. LoginViewModel) in here.
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
View
@model LoginViewModel // Add to _ViewImports to make this line work
<div>This is the View for the login screen.</div>