dotnet pack使用nuget包进行项目参考

时间:2018-06-01 13:44:13

标签: .net-core nuget nuget-package

说我有一个netstandard项目的以下SDK xml

<Project Sdk="Microsoft.NET.Sdk">

    <PropertyGroup>
      <TargetFramework>netstandard2.0</TargetFramework>
      <CodeAnalysisRuleSet>$(SolutionDir)\..\solution items\stylecop.ruleset</CodeAnalysisRuleSet>
    </PropertyGroup>

    <ItemGroup>
      <AdditionalFiles Include="..\..\solution items\stylecop.json" />
    </ItemGroup>

    <ItemGroup>
      <ProjectReference Include="..\OfficeArchitect.Core\OfficeArchitect.Core.csproj" />
      <ProjectReference Include="..\OfficeArchitect.Validation.CommandHandler\OfficeArchitect.Validation.CommandHandler.csproj" />
    </ItemGroup>

    <ItemGroup>
      <PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta004" />
      <PackageReference Include="System.Reactive.Linq" Version="4.0.0" />
      <PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.0" />
    </ItemGroup>

</Project>

现在OfficeArchitect.Core.csproj正在使用项目引用,但是当我为这个项目创建一个nuget包(nupkg)时,我希望该包改为使用(或引用)nuget包{{1相反。

我该怎么做呢?我是否必须使用OfficeArchitect.Core.csproj文件?

另外为了让它更有趣,可能有一些情况我有两个项目引用,其中一个(例如nuspec)没有nuget包,我想将它复制到lib文件夹代替。我已经有了解决这个问题的方法(将项目引用复制到lib文件夹),使用以下github issue

0 个答案:

没有答案
相关问题