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

Cannot add MVC5 view

5 Answers 473 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Iron
Iron
Mike asked on 11 Feb 2021, 06:10 PM

I'm new in the ASP.NET MVC development.

After I add the dataset under the model folder.

I create an empty Controller and want to add view inside Index() method.

I choose Template as Create, and error message come up

"There was an error running the selected code generator:

'an error occurred while retrieving package metadata for

'EntityFramework.6.1.3' from source 'nuget.telerik.com''"

Could you tell me how to add a view, if need more details, plz let me know!!

 

5 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 15 Feb 2021, 11:31 AM

Hi Mike,

The most common reason for the respective error is networking issues or using wrong credentials.

To check if this is a networking issue, open the following URL in your browser and enter your telerik.com credentials:

https://nuget.telerik.com/nuget/Search()?$filter=IsAbsoluteLatestVersion&searchTerm=%27Telerik.UI.for.AspNet.Mvc5%27&includePrerelease=true&$skip=0&$top=100&semVerLevel=2.0.0

You should see an XML result with the list of packages you can access and you should see the Telerik.UI.for.AspNet.Mvc5 package.

If you can access the feed in the browser, but you do not see the packages in Visual Studio, the most likely problem is wrong credentials that are not associated with a license. Are you able to browse the Telerik private NuGet feed through Visual Studio - does searching for Telerik.UI.for.AspNet.Mvc5 package return the respective package, when the source is set to the Telerik NuGet feed?
Our NuGet install article provides reference how to setup the feed. If you can access the feed in the browser, but you do not see the packages in Visual Studio, the most likely problem is wrong credentials that are not associated with a license.

Make sure that your credentials are correct and that there isn't a nuget.config file in the project that is bringing in invalid credentials - project-level config files override the global settings.

Here is a sample process of removing stored credentials from Windows so you can re-add the correct ones:

  1. Remove saved credentials in Windows Credential Manager. They will appear as nuget.telerik.com and/or VSCredentials_nuget.telerik.com entries.
  2. Remove the Telerik Nuget package source from Visual Studio.
  3. If you have added the Telerik package source by nuget CLI, then try to remove it from the CLI:
  4. Check if there are any credentials stored in %AppData%\NuGet\Nuget.Config and if so you have to remove them.
  5. Try to reset Visual Studio user data. You can read how to do that here.
  6. Restart Visual Studio.
  7. Enter the Telerik nuget package source again through Visual Studio or CLI.

About adding a view I would suggest you to review the following Microsoft tutorial. I hope this is helpful.

Regards,
Dimitar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Mike
Top achievements
Rank 1
Iron
Iron
answered on 18 Feb 2021, 05:51 PM

Hi Dimitar,

Thanks for the reply,

I believe I remove some Telerik or Nuget credentials from Credentials manager. So when adding view, I cannot connect to Data context class.

Do you know which windows credential should be add here?

 

Thank you,

Mike

0
Mike
Top achievements
Rank 1
Iron
Iron
answered on 18 Feb 2021, 10:38 PM
I can add Kendo UI Scaffolder. But it said "Kendo cannot be found" (Screenshot is attached)
0
Mike
Top achievements
Rank 1
Iron
Iron
answered on 19 Feb 2021, 11:19 PM

The error message said

"The type or namespace name 'Kendo' could not be found"

Also DataSourceRequest and ToDataSourceResult cannot be found.

 

0
Neli
Telerik team
answered on 22 Feb 2021, 11:41 AM

Hello Mike,

When configuring the Telerik Nuget your Telerik credentials are needed. From the provided errors it seems that the  Kendo.Mvc.dll is not referenced in the project or it could not be found. Could you please double-check if the Kendo.Mvc.dll is referenced correctly? Could you please try to add the reference to Kendo.Mvc.dll manually and test the result? You could find the assembly in 'C:\Program Files (x86)\Progress\Telerik UI for ASP.NET MVC<version>\wrappers\aspnetmvc\Binaries\MVC5'

I would suggest you also try to add the Telerik Nuget Feed through the Progress Control Panel. Below you could find the article where the needed steps are described:

- https://docs.telerik.com/aspnet-mvc/getting-started/first-steps#add-the-telerik-nuget-feed-for-users-with-commercial-license

I hope the provided information will be helpful. 

Regards,
Neli
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
Mike
Top achievements
Rank 1
Iron
Iron
Answers by
Dimitar
Telerik team
Mike
Top achievements
Rank 1
Iron
Iron
Neli
Telerik team
Share this question
or