Following this Virtual Academy, and about 37:00 in they go to create a new scaffolded item from the Album model and context they created. Mine fails. I've googled, and tried creating 3 separate projects, targeting .net core 2.0, 1.1, and 1.0 respectively. Visual Studio 2017.
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace WebApplication4.Models
{
public class Album
{
public int AlbumId { get; set; }
public String Title { get; set; }
public decimal Price { get; set; }
}
public class MusicContext : DbContext
{
public DbSet<Album> Albums { get; set; }
}
}
Does anyone know a fix? Point me in the right direction? Did I miss a step? There's only 2 :D
-----Update------
Looking around it seems 'Codegeneration.Tools' is not installed. Trying to install it threw the error
Package 'Microsoft.VisualStudio.Web.CodeGeneration.Tools 2.0.1' has a package type 'DotnetCliTool' that is not supported by project 'WebApplication4'
-----Update 201712111428------
This did work with VS 2015 and EntityFramework 6.1.2. Maybe the problem is with VS 2017.