我有一个 .NET core 1.1.2 应用程序,它打包了对其他两个 .NET core 1.1.2 应用程序的引用。这是我的csproj:
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<PackageReference Include="../DataAccess/DapperORM/DapperORM.csproj" />
<PackageReference Include="../Models/Models.csproj" />
</ItemGroup>
<PropertyGroup>
<TargetFramework>netcoreapp1.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore" Version="1.1.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="1.1.2" />
<PackageReference Include="System.Data.SqlClient" Version="4.4.2" />
</ItemGroup>
</Project>
它可以恢复靠近底部的三个包,但不能恢复靠近顶部的两个本地包。我不知道为什么。
我得到的确切错误是:
Error NU1101 Unable to find package
../DataAccess/DapperORM/DapperORM.csproj. No packages exist with this id in
source(s): C:\Program Files\dotnet\sdk\NuGetFallbackFolder, Microsoft Visual
Studio Offline Packages, nuget.org
Models.csproj 也会出现该错误。我在 Windows 10 中使用 Visual Studio Community 2017。在 VS Installer 下ASP.NET and web development,我同时.NET Core 2.0 development tools安装了两者.NET Core 1.0 - 1.1 development tools for Web。.NET Core cross-platform development类别也是如此。
有什么想法吗?谢谢!