简体   繁体   English

类型或名称空间名称“ SqlServer”在名称空间“ Microsoft.EntityFrameworkCore”中不存在

[英]The type or namespace name 'SqlServer' does not exist in the namespace 'Microsoft.EntityFrameworkCore'

I am trying to configure my .NET Core Entity Framework app to use SQL Server, but I can't seem to access the namespace. 我试图将.NET Core Entity Framework应用程序配置为使用SQL Server,但似乎无法访问名称空间。

Startup.cs (origin of the error) Startup.cs(错误来源)

using Microsoft.EntityFrameworkCore.SqlServer;

Project.json Project.json

"dependencies": {
    "Microsoft.EntityFrameworkCore.SqlServer": "1.1.0"
}

I have run dotnet restore successfully. 我已成功运行dotnet restore

If anyone could point me in the right direction that would be lovely. 如果有人能指出我正确的方向,那就太好了。

That's because there is no namespace "Microsoft.EntityFrameworkCore.SqlServer". 这是因为没有命名空间“ Microsoft.EntityFrameworkCore.SqlServer”。 Everything related to SQL Server is in the "Microsoft.EntityFrameworkCore" namespace. 与SQL Server相关的所有内容都在“ Microsoft.EntityFrameworkCore”命名空间中。 See for yourself: https://github.com/aspnet/EntityFramework/tree/dev/src/Microsoft.EntityFrameworkCore.SqlServer . 自己看看: https : //github.com/aspnet/EntityFramework/tree/dev/src/Microsoft.EntityFrameworkCore.SqlServer

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 类型或名称空间名称“ Relational”在名称空间“ Microsoft.EntityFrameworkCore”中不存在 - The type or namespace name 'Relational' does not exist in the namespace 'Microsoft.EntityFrameworkCore' 命名空间“Microsoft.EntityFrameworkCore”中不存在“迁移” - 'Migrations' does not exist in the namespace 'Microsoft.EntityFrameworkCore' 命名空间“Microsoft”中不存在类型或命名空间名称“EntityFrameworkCore” - The type or namespace name 'EntityFrameworkCore' does not exist in the namespace 'Microsoft Blazor:命名空间“Microsoft.AspNetCore.Mvc.ApplicationParts”中不存在类型或命名空间名称“ApplicationPartAttributeAttribute” - Blazor: The type or namespace name 'ApplicationPartAttributeAttribute' does not exist in the namespace 'Microsoft.AspNetCore.Mvc.ApplicationParts' 错误 CS0234:命名空间“Microsoft”中不存在类型或命名空间名称“AspNetCore”(您是否缺少程序集引用?) - Error CS0234: The type or namespace name 'AspNetCore' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) 命名空间“Microsoft.AspNetCore.Mvc.Razor”中不存在类型或命名空间名称“RuntimeCompilation” - the type or namespace name 'RuntimeCompilation' does not exist in the namespace 'Microsoft.AspNetCore.Mvc.Razor' 命名空间“Microsoft.AspNetCore.Razor”中不存在类型或命名空间名称“Hosting” - The type or namespace name 'Hosting' does not exist in the namespace 'Microsoft.AspNetCore.Razor' 命名空间“Microsoft”中不存在类型或命名空间名称“AspNetCore”(您是否缺少程序集引用?) - The type or namespace name 'AspNetCore' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) 命名空间“Microsoft.AspNetCore”中不存在类型或命名空间“OData” - The type or namespace 'OData' does not exist in the namespace 'Microsoft.AspNetCore' 类型或命名空间名称Web在命名空间系统中不存在 - Type or Namespace name Web does not exist in the namespace system
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM