Sqlite package reference missed
Hi. Please, add <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.2"/> to the project file. Otherwise, you'll get error with UseSqlite() in the: services.AddDbContext<MvcMovieContext>(options => options.UseSqlite("Data Source=MvcMovie.db"));
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 3acf0cee-ea0e-b1ca-d239-a8f2bb465f5b
- Version Independent ID: 20f61d94-ae6a-af54-e089-dc6be40182a0
- Content: Add a model to an ASP.NET Core MVC app
- Content Source: aspnetcore/tutorials/first-mvc-app-xplat/adding-model.md
- Product: aspnet-core
- GitHub Login: @Rick-Anderson
- Microsoft Alias: riande
@simutaroman thanks. We hope to get this updated in the next couple of months - hopefully sooner.

This worked for me
Not for me.
C:\Projects\CallForHelp\CallForHelp.csproj : warning NU1604: Project dependency Microsoft.EntityFrameworkCore.Sqlite does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results. C:\Projects\CallForHelp\CallForHelp.csproj : warning NU1701: Package 'SQLite.Native 3.12.2' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.1'. This package may not be fully compatible with your project. C:\Projects\CallForHelp\CallForHelp.csproj : warning NU1604: Project dependency Microsoft.EntityFrameworkCore.Sqlite does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results. C:\Projects\CallForHelp\CallForHelp.csproj : warning NU1701: Package 'SQLite.Native 3.12.2' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.1'. This package may not be fully compatible with your project. Startup.cs(12,37): error CS0234: The type or namespace name 'Sqlite' does not exist in the namespace 'Microsoft.EntityFrameworkCore' (are you missing an assembly reference?) [C:\Projects\CallForHelp\CallForHelp.csproj] Startup.cs(13,37): error CS0234: The type or namespace name 'Sqlite' does not exist in the namespace 'Microsoft.EntityFrameworkCore' (are you missing an assembly reference?) [C:\Projects\CallForHelp\CallForHelp.csproj] 4 Warning(s) 2 Error(s)
@dviljoen why are you targeting the .NET Framework rather than .NET Core? Do you have the lastest .NET Core SDK installed?
Installed it two days ago. It is the latest.
And I’m not targeting DOT NET Framework. That’s what it’s doing on its own.
My .csproj file looks exactly like the one above.
Getting an error during Scaffold the MovieController: dotnet aspnet-codegenerator controller -name MoviesController -m Movie -dc MvcMovieContext --relativeFolderPath Controllers --useDefaultLayout --referenceScriptLibraries
System.ArgumentException: '' is not a valid version string.
at NuGet.Versioning.VersionRange.Parse(String value, Boolean allowFloating)
at NuGet.Versioning.VersionRange.Parse(String value)
at Microsoft.DotNet.Cli.Utils.ProjectToolsCommandResolver.GetToolLockFilePath(SingleProjectInfo toolLibrary, NuGetFramework framework, String nugetPackagesRoot)
at Microsoft.DotNet.Cli.Utils.ProjectToolsCommandResolver.TryGetToolLockFile(SingleProjectInfo toolLibrary, NuGetFrameworkframework, String nugetPackagesRoot, LockFile& lockFile)
at Microsoft.DotNet.Cli.Utils.ProjectToolsCommandResolver.GetToolLockFile(SingleProjectInfo toolLibrary, NuGetFramework framework, IEnumerable1 possibleNugetPackagesRoot) at Microsoft.DotNet.Cli.Utils.ProjectToolsCommandResolver.ResolveCommandSpecFromToolLibrary(SingleProjectInfo toolLibraryRange, String commandName, IEnumerable1 args, IProject project)
at Microsoft.DotNet.Cli.Utils.ProjectToolsCommandResolver.ResolveCommandSpecFromAllToolLibraries(IEnumerable1 toolsLibraries, String commandName, IEnumerable1 args, IProject project)
at Microsoft.DotNet.Cli.Utils.ProjectToolsCommandResolver.ResolveFromProjectTools(CommandResolverArguments commandResolverArguments)
at Microsoft.DotNet.Cli.Utils.ProjectToolsCommandResolver.Resolve(CommandResolverArguments commandResolverArguments)
at Microsoft.DotNet.Cli.Utils.CompositeCommandResolver.Resolve(CommandResolverArguments commandResolverArguments)
at Microsoft.DotNet.Cli.Utils.CommandResolver.TryResolveCommandSpec(ICommandResolverPolicy commandResolverPolicy, String commandName, IEnumerable1 args, NuGetFramework framework, String configuration, String outputPath, String applicationName) at Microsoft.DotNet.Cli.Utils.Command.Create(ICommandResolverPolicy commandResolverPolicy, String commandName, IEnumerable1 args, NuGetFramework framework, String configuration, String outputPath, String applicationName)
at Microsoft.DotNet.Cli.Utils.Command.Create(String commandName, IEnumerable`1 args, NuGetFramework framework, String configuration, String outputPath, String applicationName)
at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, ITelemetry telemetryClient)
at Microsoft.DotNet.Cli.Program.Main(String[] args)
Nevermind I got it
https://github.com/aspnet/Docs/issues/6430
Fixed in unified version