Kendo UI Scaffolding failed

23 posts, 0 answers
  1. Jos�
    Jos� avatar
    1 posts
    Member since:
    Sep 2015

    Posted 07 Sep 2015 Link to this post

    I have a VS2013 telerik mvc project and I have added a Class Library Project which has my DB models. I have already add the reference to my telerik mvc project but when I select the Kendo UI Scaffolding and select one of muy models inside de Class Library Project it always says: 

    'There was an error running the selected code generator 'Invalid Model Configuration'

    but I don't know what I'm missing. I'm using entity framework 5.0.0 with as the model generator.

     If someone has any idea I'll appreciate it.

  2. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2153 posts

    Posted 08 Sep 2015 Link to this post

    Hello,

    Currently the Kendo UI Scaffolder only supports entities from the current project, in which the scaffolding is performed. We will consider improving this functionality in future releases.

    Regards,
    Dimiter Madjarov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Shawn
    Shawn avatar
    49 posts
    Member since:
    Jul 2011

    Posted 06 Oct 2015 in reply to Dimiter Madjarov Link to this post

    You guys really need to add more info to the error message.  I'm generating against a model class that is in the Web project.  Yet I'm getting the error.  It's very frustrating.  It must say what exactly is invalid in the model configuration.

  5. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2153 posts

    Posted 07 Oct 2015 Link to this post

    Hello Shawn,

    Thank you for the feedback. We will take into consideration and provide additional information to the user when initiating a scaffolding in future releases.

    Regards,
    Dimiter Madjarov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  6. Chris
    Chris avatar
    33 posts
    Member since:
    Oct 2015

    Posted 30 Nov 2015 in reply to Jos� Link to this post

    HI

    I have found a solution - Add Project Reference.

    Example : 

    ClassLibrary : ClassLibrary1
    Web Application : WebApp1

    *ClassLibrary1 and WebApp1 must exists in the same soluton.

    WebApp1 - Add Reference, In Reference Manager expand Projects then select/check ClassLibrary1, OK.

    After project reference added, the DbContext/Model could be listed by any Scaffolder :

    。MVC 5 Controller with read/write actions
    。MVC 5 Controller with view, usint Entity Framework
    。Kendo UI Scaffolder
    。And more

    Notice :

    。The old reference of ClassLibrary should be removed first.

    。The EntitySetName must defined in the DbContext :

      public class DbContext1 : DbContext
      {
        public DbSet<Model1> Models { get; set; }

        public DbContext1() : base("name=Connection1")
        {

      Else exception will occur :

      "object reference not set to an instance of an object"

    。If DbContext(name) was used then the name must be defined in WebApp1's Web.config


      <connectionStrings>
        <add name="Connection1" ...

      Else exception will occur :

      "Unable to retrieve metadata for '...'. No connection string named '...' could be found in the application config file."

    Best regards

    Chris
  7. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2153 posts

    Posted 30 Nov 2015 Link to this post

    Hello Chris,

    This is correct. Thank you for sharing the information with the community.

    Have a great day!

    Regards,
    Dimiter Madjarov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  8. Mike
    Mike avatar
    1 posts
    Member since:
    Sep 2011

    Posted 02 Dec 2015 Link to this post

    I'm receiving this same error.  I have an MVC app with everything contained within the app, ie models, views etc.  When try and add a new scaffolded view, I get the error 'There was an error running the selected code generator: 'Invalid model configuration'.

     Again, the model is contained within the project and IS currently in the Context that I selected in the wizard.

  9. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2153 posts

    Posted 03 Dec 2015 Link to this post

    Hello Mike,

    I covered the question in the support thread on the same topic. Let me know if you have further inquiries regarding the case there.

    Regards,
    Dimiter Madjarov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  10. Chris
    Chris avatar
    33 posts
    Member since:
    Oct 2015

    Posted 03 Dec 2015 in reply to Mike Link to this post

    HI Mike

     

    I have met the error 'Invalid model configuration' before.

    It's mean that the model class you defined not met the some conditions for scaffolder,

    In this error, you should add the [Key] attribute to the model you defined  then retry :

     

    public class Model1

    {

      [Key]

      public string ProductID { get; set; }

       ...

     

    Best regards

     

    Chris

     

     

  11. Vassili King
    Vassili King avatar
    60 posts
    Member since:
    May 2010

    Posted 12 Dec 2015 in reply to Dimiter Madjarov Link to this post

    Link?
  12. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2153 posts

    Posted 14 Dec 2015 Link to this post

    Hello Vassili King,

    Are you experiencing an issue with the Kendo UI Scaffolder? If that is the case, could you provide further details about it?

    Regards,
    Dimiter Madjarov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  13. Alex
    Alex avatar
    11 posts
    Member since:
    Nov 2015

    Posted 26 Dec 2015 Link to this post

    Hello everyone,

    I'm getting the same message on ASP.NET 5 (MVC 6, EF7) project. I never had this message before. Is this because of Telerik not supporting MVC 6, or there is another reason for that?

     

    Please advice,

    Alex

  14. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2153 posts

    Posted 27 Dec 2015 Link to this post

    Hello Alexandros,

    Yes, currently the Kendo UI Scaffolder does not support MVC 6 environment.

    Regards,
    Dimiter Madjarov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  15. Alex
    Alex avatar
    11 posts
    Member since:
    Nov 2015

    Posted 27 Dec 2015 in reply to Dimiter Madjarov Link to this post

    Hello Dimiter,

     

    Thanks for your reply. May I know if this feature is going to be available during RC or RTM?

     

    Best,

    Alex

  16. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 28 Dec 2015 Link to this post

    Hello Alexandros,

    We do not have it planned for the MVC 6 official release, but as soon as more information is available, we will make sure to get it posted.

    Regards,
    Kiril Nikolov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  17. Olesya
    Olesya avatar
    2 posts
    Member since:
    Dec 2015

    Posted 23 Mar in reply to Dimiter Madjarov Link to this post

    Hello,

    Currently I have latest version of Kendo UI Scaffolder v.2016.1.226, in which the scaffolding throwing this exception. Can you help, what should I do?

  18. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2153 posts

    Posted 23 Mar Link to this post

    Hello Olesya,

    Please make sure that the selected model is a valid entity from the current Data Context. If that is the case and the issue is still reproducing you could send us an isolated project (here or in a support ticket) in which the issue is reproducing, so we could take a look locally.

    Regards,
    Dimiter Madjarov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  19. Olesya
    Olesya avatar
    2 posts
    Member since:
    Dec 2015

    Posted 31 Mar in reply to Dimiter Madjarov Link to this post

    Good morning.

    Our entites are in the Swis.Core project, and we are perfoming scaffolding in another project WebUI. EF DbContext is in project Swis.Data. Does it functionality works in latest version? If not how can we scaffold our entities for admin module?

     

  20. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2153 posts

    Posted 01 Apr Link to this post

    Hello Olesya,

    The scenario is currently not supported by the Kendo UI Scaffolder. We have it considered for improvement in future releases.

    Regards,
    Dimiter Madjarov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  21. Stéphan Parrot
    Stéphan Parrot avatar
    70 posts
    Member since:
    Apr 2010

    Posted 01 Jun in reply to Dimiter Madjarov Link to this post

    In a real-world scenario, this Scaffolding thing is useless. We try to coach programmers SOC properly and when they use tools like these, they get it all wrong and are directed to tightly couple the solutions they are putting in place.

    You really need to step that one up, I think. 

    Thanks.

  22. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 02 Jun Link to this post

    Hi,

    We remain open for any suggestion, bug reports and general feedback. So please send us an email with the problems that you faced and we will be happy to take a look.


    Regards,
    Kiril Nikolov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  23. Hellmich
    Hellmich avatar
    1 posts
    Member since:
    Jun 2015

    Posted 18 Nov Link to this post

    Hello,
    I`m new in web development and telerik. I try to build the team efficiency app from your tutorial as a starting point:
    http://docs.telerik.com/aspnet-mvc/tutorials/quickstart/team-efficiency
    Getting the "Invalid Model Configuration" when using the scaffolder wizard. The solution from your documentary is to use a "valid model", but this doesn`t help me cause i don`t know what i have to do exactly... I have followed all the steps in your tutorial, don`t understand if i missed something or did something wrong...

    Fresh VS2015 install. All ASP.net extensions installed with update manager. Telerik plugins updated 15 min ago.

    Thx in advance

  24. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 18 Nov Link to this post

    Hi Matthias,

    Thanks for reaching out.

    Please open a separate support request with more information about your model and setup and we will be happy to investigate.

    Thanks!

    Regards,
    Kiril Nikolov
    Telerik by Progress
    Telerik UI for ASP.NET MVC is ready for Visual Studio 2017 RC! Learn more.
Back to Top
UI for ASP.NET MVC is VS 2017 Ready