During an Sitecore Upgrade to 9 to 10, one of the things that you may need to do is to make sure you have the latest version of Glass Mapper 5 on your project.
There are some deprecated methods , however it still will work , in most of the cases.
Except, you may find some situations like below , which the solution it was mandatory to upgrade the view to the new standard (removing GlassView).
at system.runtimemethodhandle.invokemethod(object target, object[] arguments, signature sig, boolean constructor)
at system.reflection.runtimemethodinfo.unsafeinvokeinternal(object obj, object[] parameters, object[] arguments)
at system.reflection.runtimemethodinfo.invoke(object obj, bindingflags invokeattr, binder binder, object[] parameters, cultureinfo culture)
at system.reflection.runtimepropertyinfo.getvalue(object obj, object[] index)
at glass.mapper.utilities.getpropertiescollection(object target, boolean lowercasename, boolean underscoreforhyphens) in d:\a\glass.mapper\glass.mapper\source\glass.mapper\utilities.cs:line 234
at glass.mapper.sc.glasshtml.processparameters(object parameters) in d:\a\glass.mapper\glass.mapper\source\glass.mapper.sc\glasshtml.cs:line 693
at glass.mapper.sc.glasshtml.makeeditable[t](expression`1 field, expression`1 standardoutput, t model, object parameters, context context, database database, textwriter writer) in d:\a\glass.mapper\glass.mapper\source\glass.mapper.sc\glasshtml.cs:line 558
OLD VIEWS :
The code below is the standard for V4 , this might fail in some cases, and will force you to upgrade the code to v5
@inherits GlassView<MyViewModel>
@Editable(Model, x => x.PageTitle)
new view
This would be a example of the default code for Glass Mapper V5 , note the differences
@using Glass.Mapper.Sc.Web.Mvc
@model MyViewModel
@Html.Glass().Editable(Model, x => x.Title)
Sources :