Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

增加分版本的package引用和framework引用 #113

Merged
merged 60 commits into from
Dec 8, 2021

Conversation

lindexi
Copy link
Member

@lindexi lindexi commented Nov 18, 2021

行为变更:

  • 分多个不同框架分别支持引用 NuGet 包和框架依赖
  • 打出的源代码包加上 DevelopmentDependency 属性,同时设置如下更新逻辑
  <ItemGroup Condition="$(DisableSourcePackageAutoPrivateAssets) != 'true'">
    <!-- 用于修复设置了 DevelopmentDependency 将不自动添加依赖 -->
    <!-- 参阅 https://github.com/dotnet-campus/SourceYard/issues/112 -->
    <PackageReference Update="#(PackageId)">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>all</IncludeAssets>
    </PackageReference>
  </ItemGroup>

代码变更逻辑:

  • 设置 Program.cs 的 MagicTransformMultiTargetingToFirstTarget 不是从第一项获取,而是通过第一个可用框架获取,从而修改命令行
  • 所有的参数都通过读取文件实现,而不是层层传入命令行

Fixes #87

See #111

感谢 @Zhuangkh

因为 #111 在你的仓库里,我没有权限向此分支提交,因此重新开启此 PR 但这是在你的基础上进行更改的

@lindexi
Copy link
Member Author

lindexi commented Nov 18, 2021

See dotnet/msbuild#3787

@lindexi
Copy link
Member Author

lindexi commented Nov 19, 2021

多个框架分别使用不同的 NuGet 包完成

图片

@lindexi lindexi changed the title WIP 增加分版本的package引用和framework引用 增加分版本的package引用和framework引用 Nov 19, 2021
Directory.Build.props Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
docs/zh-cn/Behavior.md Show resolved Hide resolved
docs/zh-cn/Behavior.md Show resolved Hide resolved
sample/App/TheLib/TheLib.csproj Outdated Show resolved Hide resolved
@lindexi lindexi merged commit 49179b1 into master Dec 8, 2021
@lindexi lindexi deleted the t/lindexi_Framework branch December 8, 2021 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

支持在源码包中自动引用 dll
3 participants