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

Dev > Main #3

Merged
merged 53 commits into from
Sep 29, 2020
Merged

Dev > Main #3

merged 53 commits into from
Sep 29, 2020

Commits on Sep 23, 2020

  1. The big rename. NuGet.Build.Packaging > NuGetizer

    Old name no more.
    kzu committed Sep 23, 2020
    Configuration menu
    Copy the full SHA
    766a689 View commit details
    Browse the repository at this point in the history
  2. Minor missing renaming

    kzu committed Sep 23, 2020
    Configuration menu
    Copy the full SHA
    83c07f2 View commit details
    Browse the repository at this point in the history
  3. Don't use ILRepack, it's unnecessary

    Since we don't use SDK Pack at all and we want to target NS2.
    kzu committed Sep 23, 2020
    Configuration menu
    Copy the full SHA
    c689512 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    cf6e407 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    72e59ac View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2020

  1. Add multi-targeting pack support

    Previously, we were only partially supporting multi-targeting via GetPackageContents mostly and not much more. This refactors the common targets that should apply in both multi and single targeting pack into NuGetizer.Common.targets so it can be shared by both.
    
    A test now ensures that things works as expected, as well as avoiding duplicate metadata content item. As part of this improved metadata support, we also introduce the GetPackageMetadata target so we separate and centralize the package metadata from the package target path as well as the pacakge file item created from it (all slightly different but sharing most metadata values).
    kzu committed Sep 24, 2020
    Configuration menu
    Copy the full SHA
    69084a4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    887e818 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ace11cb View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0f4579d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    546c05f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c85f0fb View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    43429b7 View commit details
    Browse the repository at this point in the history
  8. Add tests for package metadata customization scenario

    The traditional way of extending package metadata was to simply hardcode an ever-growing number of properties. In order to have a more flexible and extensible mechanism, we now use those properties to feed into a single @(PackageMetadata) item per packagable project, which contains those properites much like before.
    
    Having a separate item type for the metadata (rather than just creating a PackageTargetPath and a _PackageFile with Metadata kind, allows extending the metadata for that item also via an ItemDefinitionGroup.
    
    In addition, if the project itself already includes an item PackageMetadata, we simply use that instead and avoid creating a second one or overriding the explicitly created values.
    kzu committed Sep 24, 2020
    Configuration menu
    Copy the full SHA
    e347400 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    3a6504d View commit details
    Browse the repository at this point in the history
  10. Fix metadata by item definition test

    Showcase adding metadata, since built-in values will still pick up the supported properties, which should be the mechanism to extend them.
    kzu committed Sep 24, 2020
    Configuration menu
    Copy the full SHA
    de7eb84 View commit details
    Browse the repository at this point in the history
  11. Rename PrimaryOutput* to BuildOutput*, remove old workarounds

    Makes more sense since we don't have any "secondary" outputs. This renames both PrimaryOutputKind > BuildOutputKind and PrimaryOutputFrameworkSpecific > BuildOutputFrameworkSpecific.
    
    We also remove old workarounds for PRs that have since shipped for a while in MSBuild.
    kzu committed Sep 24, 2020
    Configuration menu
    Copy the full SHA
    d44d5e4 View commit details
    Browse the repository at this point in the history
  12. Add package icon

    kzu committed Sep 24, 2020
    Configuration menu
    Copy the full SHA
    d0112a4 View commit details
    Browse the repository at this point in the history
  13. Add support for icon in addition to iconurl

    And add new icon too :)
    kzu committed Sep 24, 2020
    Configuration menu
    Copy the full SHA
    fe41b5e View commit details
    Browse the repository at this point in the history
  14. Explicit PackagePath in Content/None equals Pack=true

    This makes it more intuitive and aligns with SDK Pack.
    Also, since de-duplication is performed in the CreatePackage task, the targets were being overzealous with that and preventing the valid scenario (like we have ourselves!) of using the same source file and place it in different package paths (we do so for various multi-targeting ones.
    kzu committed Sep 24, 2020
    Configuration menu
    Copy the full SHA
    34eba1d View commit details
    Browse the repository at this point in the history
  15. Add Pack step to CI

    kzu committed Sep 24, 2020
    Configuration menu
    Copy the full SHA
    111d1c4 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    47c20c4 View commit details
    Browse the repository at this point in the history
  17. Test cleanup, migration and improvements

    The tests dealt with a lot of legacy cases where projects were not SDK-style and other weird setups for faking frameworks and the like.
    
    By unifying all test scenario projects on SDK-style and leveraging the SDK built-in support for turning off standard framework resolution via DisableStandardFrameworkResolution (see dotnet/sdk@bba2f8087), we could significantly simply the targets that simulate a full package reference to NuGetizer scenario.
    kzu committed Sep 24, 2020
    Configuration menu
    Copy the full SHA
    c5fe4dc View commit details
    Browse the repository at this point in the history
  18. Deduplicate inferred project output

    It's quite common for BuiltProjectOutputGroupOutput and BuiltProjectOutputGroupKeyOutput to include the same output, so we deduplicate.
    kzu committed Sep 24, 2020
    Configuration menu
    Copy the full SHA
    d50646c View commit details
    Browse the repository at this point in the history
  19. Collect and publish build logs when System.Debug=true

    This allows collecting diagnostic logs from CI in
    DevOps when things fail unexpectedly.
    kzu committed Sep 24, 2020
    Configuration menu
    Copy the full SHA
    7b9fd10 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    567b3b8 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    1984de3 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    05364e8 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    8c48e87 View commit details
    Browse the repository at this point in the history
  24. Allow packing from the IDE, and cleanup package contents

    When running Pack from the IDE, the output tasks assembly will be locked, so it requires killing MSBuild.exe afterwards, but it can be a convenient way to peek at the output.
    
    Alternatively, you can set MSBUILDDISABLENODEREUSE=1 via envvar (i.e. before launching VS) and that would allow a more iterative approach.
    kzu committed Sep 24, 2020
    Configuration menu
    Copy the full SHA
    850a0d7 View commit details
    Browse the repository at this point in the history
  25. When packing, return the actually built output item

    It contains all the original manifest metadata in addition to the actual target path created in the CreatePackageTask. It seems more appropriate, in case we add more info in the task, for example, that might be missing in the `PackageTargetPath` item.
    kzu committed Sep 24, 2020
    Configuration menu
    Copy the full SHA
    2dece24 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    1ab2dcd View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    a4bf83c View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    732ae67 View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2020

  1. Configuration menu
    Copy the full SHA
    4060c22 View commit details
    Browse the repository at this point in the history
  2. Use version prefix/suffix combination for more flexibility

    This allows the 42.42.42 in the .props to be replaceable via a -p:versionprefix= MSBuild argument, which could still preserve the branch+height suffix.
    kzu committed Sep 25, 2020
    Configuration menu
    Copy the full SHA
    1c6ed6b View commit details
    Browse the repository at this point in the history
  3. Fix push nuget credentials

    kzu committed Sep 25, 2020
    Configuration menu
    Copy the full SHA
    ae25cb8 View commit details
    Browse the repository at this point in the history
  4. Make sure dynamic package metadata is updated

    The previous approach was relying on the item definition group alone to set the repository properties. This was insufficient to catch the values updated by a source control provider. So we now support a mix of both properties and item metadata, as follows:
    
    * Basic tweaking: expected to be done like in SDK Pack, using properties. These can also be modified via targets and things will just work i.e. updating a Description from a target running before GetPackageMetadata, for example.
    * Advanced tweaking: for advanced metadata manipulation, we'll support preserving an already created PackageMetadata item for the project's PackageId, and will just update the repository and version info in the GetPackageMetadata target. The user can still run before/after this target and modify the resulting PackageMetadata item as needed, of course.
    
    This combination offers the maximum flexibility and future proofing in terms of package metadata.
    kzu committed Sep 25, 2020
    Configuration menu
    Copy the full SHA
    ebe0005 View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2020

  1. Push CI packages to sleet feed instead of GH packages

    Since the GH packages feeds are authenticated, they aren't of
    much use for an oss project, so stick to sleet+Azure for now.
    
    Adding .NETCore 2.1 install since sleet requires that.
    kzu committed Sep 26, 2020
    Configuration menu
    Copy the full SHA
    0803de6 View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2020

  1. Add ability to selectively emit nuspec and nupkg

    This allows invoking Pack to get either (i.e. for testing or exploring what the output package would look like).
    
    Also took the chance to avoid emitting nuspec properties when the relevant item metadata is missing entirely (instead of emitting empty nuspec properties).
    kzu committed Sep 27, 2020
    Configuration menu
    Copy the full SHA
    bec5eac View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2020

  1. Configuration menu
    Copy the full SHA
    0ca8ddd View commit details
    Browse the repository at this point in the history
  2. Add nugetize dotnet global tool that helps discover NuGetizer

    The tool renders in the output window the structure that a project would generate if it were to produce a nuget package. It's key that it doesn't actually require the files referenced in the project to even exist. In fact, the project doesn't even have to build, since it's built as if it were a design-time build and the compiler invocation is skipped.
    
    This allows a very nice exploration of nugetizer capabilities without actually having to produce a bunch of empty files to explore what metadata causes which items to end up in which folders.
    kzu committed Sep 28, 2020
    Configuration menu
    Copy the full SHA
    73538e2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3118834 View commit details
    Browse the repository at this point in the history
  4. Don't build again during pack

    Both the test and dotnet tool had a build dependency (but not a project reference) to the tasks project, but were getting an implicit project reference that caused a build during pack too.
    
    See https://www.cazzulino.com/project-dependencies-as-project-references.html for more information.
    kzu committed Sep 28, 2020
    Configuration menu
    Copy the full SHA
    b4771cb View commit details
    Browse the repository at this point in the history
  5. Move adding nupkg to a target

    This delays the inclusion some more.
    kzu committed Sep 28, 2020
    Configuration menu
    Copy the full SHA
    7f0c021 View commit details
    Browse the repository at this point in the history
  6. Always unconditionally set the package output path

    So we can have predictable builds and outputs always.
    kzu committed Sep 28, 2020
    Configuration menu
    Copy the full SHA
    211e9f4 View commit details
    Browse the repository at this point in the history
  7. Delete local MSBuild spike

    kzu committed Sep 28, 2020
    Configuration menu
    Copy the full SHA
    f79ee54 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    25c6f73 View commit details
    Browse the repository at this point in the history
  9. Improve package property docs

    kzu committed Sep 28, 2020
    Configuration menu
    Copy the full SHA
    be06b9e View commit details
    Browse the repository at this point in the history
  10. Allow excluding framework references with Pack=false

    This adds consistency with the other item types.
    kzu committed Sep 28, 2020
    Configuration menu
    Copy the full SHA
    0106acd View commit details
    Browse the repository at this point in the history
  11. Rename to make it more clear

    kzu committed Sep 28, 2020
    Configuration menu
    Copy the full SHA
    f8371a7 View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2020

  1. Add build-in support in NuGetizer for dotnet-nugetize

    Instead of doing so many brittle hacks, just assume the project will already be packable and have the right metadata in place. So it's mostly a tool for quickly inspecting changes to a project.
    
    Simplify also the way the multitargeting targets are copied and used, so that there's minimal stuff in the buildMultitargeting folder. Rename NuGetizer.Common.targets to NuGetizer.Shared.targets instead, which also makes it clearer that they are shared targets across single and multi-targeting.
    kzu committed Sep 29, 2020
    Configuration menu
    Copy the full SHA
    ff1c848 View commit details
    Browse the repository at this point in the history
  2. Add screenshots, readme

    kzu committed Sep 29, 2020
    Configuration menu
    Copy the full SHA
    d5f0a27 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    db268db View commit details
    Browse the repository at this point in the history