我尝试从现有数据库中反向工程化我的模型,但命令:
我不知道为什么它不起作用。(dotnet ef命令可以运行) 我确定这是一个小问题,但我找不到解决方法。请帮帮我。
我的.csproj文件:
Scaffold-DbContext "Server=(db);Database=xxxx;Trusted_connection=true;" Microsoft.EntityFrameWorkCore.SqlServer -OutputDir Models
无法运行。我收到了与标题中类似的错误消息。我已安装Nuget软件包:Microsoft.EntityFrameworkCore.SqlServer
Microsoft.EntityFrameworkCore.Tools
Microsoft.EntityFrameworkCore.SqlServer.Design
我不知道为什么它不起作用。(dotnet ef命令可以运行) 我确定这是一个小问题,但我找不到解决方法。请帮帮我。
我的.csproj文件:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp1.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="IdentityServer4">
<Version>1.5.0</Version>
</PackageReference>
<PackageReference Include="IdentityServer4.AccessTokenValidation">
<Version>1.2.0</Version>
</PackageReference>
<PackageReference Include="IdentityServer4.AspNetIdentity">
<Version>1.0.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore" Version="1.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Identity">
<Version>1.1.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore">
<Version>1.1.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore">
<Version>1.1.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer">
<Version>1.1.2</Version>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer.Design">
<Version>1.1.2</Version>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools">
<Version>1.1.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.1" />
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="1.1.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="1.0.1" />
</ItemGroup>
</Project>