如何解决MicrosoftEntityFrameworkCore

时间:2019-04-04 03:52:02

标签: c# .net asp.net-core entity-framework-core

我使用'dotnet new'命令在.NET CORE中创建WEB API。我想使用Entity Framework Core进行配置,但是我不能。我在VS2017中通过“ Manage Nugets Pakages”安装了此文件,VS给了我一个错误。

我尝试还原软件包,但错误仍然存​​在。

我的csproj文件:

 <PropertyGroup>
  <TargetFramework>netcoreapp2.1</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <Folder Include="wwwroot\" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.App" />
    <PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\CORE\CORE.csproj" />
    <ProjectReference Include="..\DAL\DAL.csproj" />
    <ProjectReference Include="..\DOORACCESS\DOORACCESS.csproj" />
    <ProjectReference Include="..\DPFINGER\DPFINGER.csproj" />
    <ProjectReference Include="..\LOGIC\LOGIC.csproj" />
    <ProjectReference Include="..\utest\utest.csproj" />
  </ItemGroup>

</Project>

如您所见,请下载软件包,但不要将其添加到csproj中。我尝试手动进行操作,但是当我将其放进去时,我是一一询问它的依赖性。

0 个答案:

没有答案