2016.2.504 Error Kendo.Mvc.resources not found Adding Kendo.MVC to ASP.net core web application

2 posts, 0 answers
  1. Oli
    Oli avatar
    1 posts
    Member since:
    May 2016

    Posted 10 May Link to this post

    I'm getting a file not found (stack trace below) for Kendo.Mvc.resources while trying to add 2016.2.504 to an MVC6 project.

    I installed the Kendo.MVC nuget package from the private feed 

         -- https://nuget.telerik.com/nuget

    I also installed the bower package from 

        -- "kendo-ui": "https://bower.telerik.com/bower-kendo-ui.git#~2016.2.504"

     

    I also added all the manual steps from http://docs.telerik.com/kendo-ui/aspnet-mvc/mvc-6/getting-started

     

    Microsoft.AspNet.Server.Kestrel: Error: An unhandled exception was thrown by the application.
    System.IO.FileNotFoundException: Could not find file 'Kendo.Mvc.resources'.
       at System.Reflection.RuntimeAssembly.InternalGetSatelliteAssembly(String name, CultureInfo culture, Version version, Boolean throwOnFileNotFound, StackCrawlMark& stackMark)
       at System.Resources.ManifestBasedResourceGroveler.GetSatelliteAssembly(CultureInfo lookForCulture, StackCrawlMark& stackMark)
       at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark)
       at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark)
       at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
       at System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
       at Kendo.Mvc.Resources.Exceptions.get_Rtl()
       at Kendo.Mvc.UI.WidgetBase.VerifySettings()
       at Kendo.Mvc.UI.DatePicker.VerifySettings()
       at Kendo.Mvc.UI.WidgetBase.WriteHtml(TextWriter writer)
       at Kendo.Mvc.UI.DatePicker.WriteHtml(TextWriter writer)
       at Kendo.Mvc.UI.WidgetBase.RenderHtml(TextWriter writer)
       at Kendo.Mvc.UI.WidgetBase.ToHtmlString()
       at Kendo.Mvc.UI.Fluent.DeferredWidgetBuilder`1.ToHtmlString()
       at Kendo.Mvc.UI.Fluent.DeferredWidgetBuilder`1.WriteTo(TextWriter writer, IHtmlEncoder encoder)
       at Microsoft.AspNet.Mvc.ViewFeatures.StringCollectionTextWriter.StringCollectionTextWriterContent.WriteTo(TextWriter writer, IHtmlEncoder encoder)
       at Microsoft.AspNet.Mvc.ViewFeatures.StringCollectionTextWriter.CopyTo(TextWriter writer, IHtmlEncoder encoder)
       at Microsoft.AspNet.Mvc.ViewFeatures.StringCollectionTextWriter.CopyToAsync(TextWriter writer, IHtmlEncoder encoder)
       at Microsoft.AspNet.Mvc.Razor.RazorTextWriter.CopyToAsync(TextWriter writer)
       at Microsoft.AspNet.Mvc.Razor.HelperResult.WriteTo(TextWriter writer, IHtmlEncoder encoder)
       at Microsoft.AspNet.Mvc.ViewFeatures.StringCollectionTextWriter.StringCollectionTextWriterContent.WriteTo(TextWriter writer, IHtmlEncoder encoder)
       at Microsoft.AspNet.Mvc.ViewFeatures.StringCollectionTextWriter.CopyTo(TextWriter writer, IHtmlEncoder encoder)
       at Microsoft.AspNet.Mvc.ViewFeatures.StringCollectionTextWriter.CopyToAsync(TextWriter writer, IHtmlEncoder encoder)
       at Microsoft.AspNet.Mvc.Razor.RazorTextWriter.CopyToAsync(TextWriter writer)
       at Microsoft.AspNet.Mvc.Razor.RazorView.<RenderLayoutAsync>d__20.MoveNext()

  2. T. Tsonev
    Admin
    T. Tsonev avatar
    2770 posts

    Posted 12 May Link to this post

    Hello,

    Thanks for the detailed bug report.

    From the stack trace I can see that the DatePicker widget is trying to read the exception message for an "Rtl" exception and fails.
    We'll investigate why the exception message is not available in the resource file.

    This is the message that should be displayed:
        The "{0}" class is no longer supported. To enable RTL support you must include telerik.rtl.css and apply the "t-rtl" class to a parent HTML element or the <body>.

    And this is the code throwing it:
            public virtual void VerifySettings()
            {
                if (!Name.Contains("<#=") && Name.IndexOf(" ") != -1)
                {
                    throw new InvalidOperationException(Resources.Exceptions.NameCannotContainSpaces);
                }

                ((IHtmlAttributesContainer) this).ThrowIfClassIsPresent("k-" + GetType().Name.ToLowerInvariant() + "-rtl", Resources.Exceptions.Rtl);
            }


    Try removing the k-datepicker-rtl class, if it is set via HtmlAttributes.

    I hope this helps.

    Regards,
    T. Tsonev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
Back to Top