asp.net-mvc-scaffolding

How do I specify which field should be displayed with MVC Scaffolding

六眼飞鱼酱① 提交于 2019-12-24 12:14:12
问题 I am creating an MVC4 application using EF Code First database. I am working with some foreign key declarations. I wish to use define the field to display in the dropdown in the scaffolding in the model declarations. For instance: My simplified model declaration is as follows: public class Contact { public int ID { get; set; } public string Prefix { get; set; } public string First { get; set; } public string Middle { get; set; } public string Last { get; set; } public string FullName { get {

There was an error running the selected code generator: Could not load file or assembly Microsoft.EntityFrameworkCore, version = 2.0.1.0

强颜欢笑 提交于 2019-12-23 09:15:49
问题 When I was creating a Controller and a View by MVC Controller with views, using Entity Framework I got an error. The Error is: There was an error running the selected code generator: 'Could not load file or assembly Microsoft.EntityFrameworkCore, version = 2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' the located assembly's manifest definition does not match the assembly reference Creating MVC Controller with views, using Entity Framework: How can I solve this problem? I use

NuGet execution policy errors when installing MvcScaffolding package

旧城冷巷雨未停 提交于 2019-12-22 10:24:12
问题 I'm using Visual Web Developer Express 2010, Windows XP, and using ASP.NET MVC4 RC in a project. I have NuGet v2.0.30619.9119 installed. I'm now trying to install the MvcScaffolding package via NuGet Package Manager Console. I get the following errors: PM> Install-Package MvcScaffolding Attempting to resolve dependency 'T4Scaffolding'. Attempting to resolve dependency 'EntityFramework (≥ 4.1.10311.0)'. You are downloading EntityFramework from Microsoft, the license agreement to which is

NuGet execution policy errors when installing MvcScaffolding package

只愿长相守 提交于 2019-12-22 10:18:21
问题 I'm using Visual Web Developer Express 2010, Windows XP, and using ASP.NET MVC4 RC in a project. I have NuGet v2.0.30619.9119 installed. I'm now trying to install the MvcScaffolding package via NuGet Package Manager Console. I get the following errors: PM> Install-Package MvcScaffolding Attempting to resolve dependency 'T4Scaffolding'. Attempting to resolve dependency 'EntityFramework (≥ 4.1.10311.0)'. You are downloading EntityFramework from Microsoft, the license agreement to which is

Visual Studio 2013 Scaffolding Error

大憨熊 提交于 2019-12-20 09:06:09
问题 I'm using VS 2013 RTM Ultimate, and when I try to add a Controller to my MVC 5 project I get the following error: "There was an error running the selected code generator: 'The Parameter searchFolders does not contain any entries. Provide at least one folder to search files.' None of the scaffolders work basically, all giving the same error... Tried rebuidling / clean etc and still get error. Update Oct 28: Looks like it is a problem with having T4Scaffolding installed. Looks like they are

Reinstall Microsoft Visual Studio Asp.net MVC 5 Scaffolding extension

只愿长相守 提交于 2019-12-19 16:33:33
问题 I hade a problem with scaffolding in Asp.Net MVC 5 and Visual studio 2013 I tried to reinstall the extension "Microsoft Visual Studio Asp.net MVC 5 Scaffolding" by first uninstalled it. But I cant find any way to install it again. I tried to repair visual studio. - no luck I tried to uninstall visual studio and install visual studio, but the extension is still missing Do I have to reinstall the PC or is there a quick fix? 回答1: I wanted to add to Chrille's answer. The PendingDeletes can be

Reinstall Microsoft Visual Studio Asp.net MVC 5 Scaffolding extension

走远了吗. 提交于 2019-12-19 16:33:31
问题 I hade a problem with scaffolding in Asp.Net MVC 5 and Visual studio 2013 I tried to reinstall the extension "Microsoft Visual Studio Asp.net MVC 5 Scaffolding" by first uninstalled it. But I cant find any way to install it again. I tried to repair visual studio. - no luck I tried to uninstall visual studio and install visual studio, but the extension is still missing Do I have to reinstall the PC or is there a quick fix? 回答1: I wanted to add to Chrille's answer. The PendingDeletes can be

Custom scaffold templates in ASP.NET Core

廉价感情. 提交于 2019-12-17 15:27:53
问题 Now that I figured out how to enable scaffolding in ASP.NET Core MVC (see View scaffold templates in ASP.NET Core), I'd like to create custom template files for Views. I found one place that said the template files are located here: C:\Users\{user name}\.dnx\packages\Microsoft.Extensions.CodeGenerators.Mvc\1.0.0-rc1-final\Templates\ViewGenerator But I copied an existing file there and that copied file does not appear in the Template dropdown on the Add View dialog. Are they located elsewhere,

Custom scaffold templates in ASP.NET Core

和自甴很熟 提交于 2019-12-17 15:26:03
问题 Now that I figured out how to enable scaffolding in ASP.NET Core MVC (see View scaffold templates in ASP.NET Core), I'd like to create custom template files for Views. I found one place that said the template files are located here: C:\Users\{user name}\.dnx\packages\Microsoft.Extensions.CodeGenerators.Mvc\1.0.0-rc1-final\Templates\ViewGenerator But I copied an existing file there and that copied file does not appear in the Template dropdown on the Add View dialog. Are they located elsewhere,

Application can't scaffold items

隐身守侯 提交于 2019-12-17 07:16:10
问题 I created an MVC 5 application in VS 2013 Professional and then used EF 6.1 code first with an existing DB on SQL Server Express. When I try to create the views I’m using the “New scaffolded item…” then selecting the “MVC 5 controller with views, using Entity Framework.” I select the model and context classes and click OK. Then the following error message appears and no code is created. I’ve uninstalled EF Power Tools with the same error. Error There was an error running the selected code