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

Improve compatibility with SDK Pack for tools #188

Merged
merged 1 commit into from
May 31, 2022
Merged

Improve compatibility with SDK Pack for tools #188

merged 1 commit into from
May 31, 2022

Commits on May 31, 2022

  1. Improve compatibility with SDK Pack for tools

    This brings nugetizer pretty much to parity with SDK Pack for CLI tools too :).
    
    We leverage the SDK tool packing targets to determine the files to pack, but otherwise preserve nugetizer's inference and packing behavior. Best of both worlds!
    
    The new `InferToolContents` target is the one that transforms the `PackTool` target's `TfmSpecificPackageFile` into our own `None` items for packing. It can also be extended to trim the tool's contents via a custom target that removes items, such as::
    
    ```xml
      <Target Name="TrimRuntimes" AfterTargets="InferToolContents">
        <ItemGroup>
          <None Remove="@(None)" Condition="$([MSBuild]::ValueOrDefault('%(None.PackagePath)', '').Contains('/runtimes/'))" />
        </ItemGroup>
      </Target>
    ```
    
    (this target would remove all runtimes from the tool package, but otherwise preserve the package contents).
    
    Fixes #134
    kzu committed May 31, 2022
    Configuration menu
    Copy the full SHA
    84bd742 View commit details
    Browse the repository at this point in the history