This is a migrated thread and some comments may be shown as answers.

Kendo UI Scaffolding failed

23 Answers 520 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jos�
Top achievements
Rank 1
Jos� asked on 07 Sep 2015, 03:36 PM

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.

23 Answers, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 08 Sep 2015, 08:46 AM

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
0
Shawn
Top achievements
Rank 2
answered on 06 Oct 2015, 05:52 PM

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.

0
Dimiter Madjarov
Telerik team
answered on 07 Oct 2015, 08:37 AM

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
0
Chris
Top achievements
Rank 1
Veteran
Iron
Iron
answered on 30 Nov 2015, 08:40 AM
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
0
Dimiter Madjarov
Telerik team
answered on 30 Nov 2015, 09:37 AM

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
0
Mike
Top achievements
Rank 1
answered on 02 Dec 2015, 04:51 PM

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.

0
Dimiter Madjarov
Telerik team
answered on 03 Dec 2015, 09:26 AM

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
0
Chris
Top achievements
Rank 1
Veteran
Iron
Iron
answered on 04 Dec 2015, 01:44 AM

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

 

 

0
Vassili King
Top achievements
Rank 1
answered on 12 Dec 2015, 08:57 PM
Link?
0
Dimiter Madjarov
Telerik team
answered on 14 Dec 2015, 08:42 AM

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
0
Alex
Top achievements
Rank 1
answered on 26 Dec 2015, 03:26 PM

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

0
Dimiter Madjarov
Telerik team
answered on 28 Dec 2015, 12:23 AM

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
0
Alex
Top achievements
Rank 1
answered on 28 Dec 2015, 12:58 AM

Hello Dimiter,

 

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

 

Best,

Alex

0
Kiril Nikolov
Telerik team
answered on 28 Dec 2015, 08:33 AM
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
0
Olesya
Top achievements
Rank 1
answered on 23 Mar 2016, 11:23 AM

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?

0
Dimiter Madjarov
Telerik team
answered on 23 Mar 2016, 12:50 PM

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
0
Olesya
Top achievements
Rank 1
answered on 31 Mar 2016, 05:08 AM

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?

 

0
Dimiter Madjarov
Telerik team
answered on 01 Apr 2016, 08:09 AM

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
0
Stéphan Parrot
Top achievements
Rank 1
answered on 01 Jun 2016, 05:28 PM

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.

0
Kiril Nikolov
Telerik team
answered on 02 Jun 2016, 07:00 AM
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
0
Gx-Vision
Top achievements
Rank 1
answered on 18 Nov 2016, 12:20 PM

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

0
Kiril Nikolov
Telerik team
answered on 18 Nov 2016, 04:35 PM
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.
0
Llorenç
Top achievements
Rank 2
answered on 17 Dec 2018, 10:04 AM
Thank you Chris, you saved my day!
Tags
General Discussions
Asked by
Jos�
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Shawn
Top achievements
Rank 2
Chris
Top achievements
Rank 1
Veteran
Iron
Iron
Mike
Top achievements
Rank 1
Vassili King
Top achievements
Rank 1
Alex
Top achievements
Rank 1
Kiril Nikolov
Telerik team
Olesya
Top achievements
Rank 1
Stéphan Parrot
Top achievements
Rank 1
Gx-Vision
Top achievements
Rank 1
Llorenç
Top achievements
Rank 2
Share this question
or