telerik / ui-for-aspnet-core-examples

A collection of Telerik UI for ASP.NET Core components examples

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when running Grid samples

jmatthiesen opened this issue · comments

I'm trying to run the projects inside of the grid folder and getting the following error:

System.TypeLoadException: Could not load type 'Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResultExtensions' from assembly 'Microsoft.AspNetCore.Mvc.Core, Version=2.1.11.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. at Kendo.Mvc.UI.DataSourceRequestModelBinder.TryGetValue[T](ModelMetadata modelMetadata, IValueProvider valueProvider, String modelName, String key, Action1 action)
at Kendo.Mvc.UI.DataSourceRequestModelBinder.CreateDataSourceRequest(ModelMetadata modelMetadata, IValueProvider valueProvider, String modelName)
at Kendo.Mvc.UI.Grid1.ProcessDataSource() at Kendo.Mvc.UI.Grid1.ProcessSettings()
at Kendo.Mvc.UI.WidgetBase.RenderHtml(TextWriter writer)
at Kendo.Mvc.UI.WidgetBase.ToHtmlString()
at Kendo.Mvc.UI.Fluent.WidgetBuilderBase2.WriteTo(TextWriter writer, HtmlEncoder encoder) at Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ViewBuffer.WriteToAsync(TextWriter writer, HtmlEncoder encoder) at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderLayoutAsync(ViewContext context, ViewBufferTextWriter bodyWriter) at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context) at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable1 statusCode)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeResultAsync(IActionResult result)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResultFilterAsyncTFilter,TFilterAsync
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResultExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeResultFilters()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication1 application)

I believe the issue is that code is calling an ASP.NET Core API that was removed (ValueProviderResultExtensions).

Hi, Jordan.

Thank you for taking the time to report the exception that you have faced. Unfortunately, I was not able to replicate the described behavior with any of the projects within the "grid" folder of the repository.
Is it possible for you to share additional details on what are the packages that are in use and which examples are causing the error? The list of the packages for the project could be retrieved by running the Get-Packages command in the Package Manager Console.

Hi, @CecoMilchev,

I just tried again and I'm still having issues. Some more information - I'm using Visual Studio for Mac to open these projects. Opening the listbox-as-editor example, I'm now seeing these error in the Package Console:

Getting restore information for project /Users/jordanm/Demos/ui-for-aspnet-core-examples/grid/listbox-as-editor/ListBoxAsEditor/ListBoxAsEditor.csproj
Running non-parallel restore.
Reading project file /Users/jordanm/Demos/ui-for-aspnet-core-examples/grid/listbox-as-editor/ListBoxAsEditor/ListBoxAsEditor.csproj.
Persisting no-op dg to /Users/jordanm/Demos/ui-for-aspnet-core-examples/grid/listbox-as-editor/ListBoxAsEditor/obj/ListBoxAsEditor.csproj.nuget.dgspec.json
Restoring packages for /Users/jordanm/Demos/ui-for-aspnet-core-examples/grid/listbox-as-editor/ListBoxAsEditor/ListBoxAsEditor.csproj...
Restoring packages for .NETCoreApp,Version=v2.0...
The local source '/Users/jordanm/Demos/ui-for-aspnet-core-examples/grid/listbox-as-editor/C:/Program Files (x86)/Progress/Telerik UI for ASP.NET Core R2 2018/wrappers/aspnetcore/Binaries/AspNet.Core' doesn't exist.

Perhaps there's actually a bad reference somewhere (e.g. C:/Program Files... being mentioned, on a Mac)?

Hi, @jmatthiesen,

I have tested out the scenario on Visual Studio for Mac and, indeed, I encountered the same issue. It stems from the fact that the NuGet.config file was pointing to a local file. Since this was not a valid path, the package could not have been restored and an exception is thrown.

The NuGet.config is no longer present in the folder. If you pull the latest version of this repository, the issue should not be present. Let me know in case there are other issues with the build of the project.

Also, it would be very helpful if you can point me to other projects which you are unable to run so that I can investigate them further.