Creating a .NET Core 1.1 MVC Web Application from scratch - Part 10 - Adding Scaffolding

preview_player
Показать описание
This video is about making scaffolding work. We import 2 packages (Microsoft.VisualStudio.Web.CodeGeneration.Design and Microsoft.VisualStudio.Web.CodeGeneration.Tools) and modify our .csproj file to support a PackageTargetFallback. Also we add the tools package using a DotNetCliTools reference to enable code generation in Visual Studio.

This allows us to generate controllers & views from our model classes.

"Microsoft.VisualStudio.Web.CodeGenerators.Mvc": {
"version": "1.1.0-preview4-final",
"type": "build"
},
"Microsoft.VisualStudio.Web.CodeGeneration.Tools": {
"version": "1.1.0-preview4-final",
"type": "build"
}

"Microsoft.VisualStudio.Web.CodeGeneration.Tools": {
"version": "1.1.0-preview4-final",
"imports": ["portable-net45+win8"]
}
Рекомендации по теме
Комментарии
Автор

Thank you for adding the dependencies for VS2015(with updates 3) in the description

koenman
Автор

Great set of tutorials. Now, please please publish the next one where we can add profile info when you register (ie add new user) Again, many thanks! Great

krm
Автор

scaffold-dbcontext error ambiguous column name name, how to solve it

vipuldimri
Автор

Hi Arhnuld,
I could not add scaffolding still, I am facing the issue while adding scaffolding that The specified deps.json [path] does not exist.

below are itemgroup
<ItemGroup>
<PackageReference Version="2.0.0" />
<PackageReference Version="1.1.1" />
<PackageReference Version="1.1.1" />
<PackageReference Version="1.1.2" />
<PackageReference Version="1.1.1" />
<PackageReference Version="1.1.1" />
<PackageReference Version="1.1.0" />
<PackageReference Version="1.1.0" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Version="1.0.0" />
</ItemGroup>

shujaatgul
Автор

visual studio 2015 update 3 work at the first time with edit the project.json file, but after restart pc . error happen, i have no idea whats going on... please help. error as "could not load file or assembly microsoft.visualstudio.web.codegeneration.design, culture=neutral, publickeytoken=null. the system cannot find the file specified."...blah blah blah...

Llaaama
Автор

Respected Sir! i have done design module but there is a problem in installing of "TOOLS" module
if u have free time so plz help me in adding scaffolding
Thnx in advance Sir #Arhnuld

amanjutt