Skip to content

BuildAction: Pack #318

Open
Open

Description

@AchimStuy

I would like to trigger build action pack (available for ProjectTypes.DOTNET_CORE. As I don't see any builtin functionality, I would implement it and create PR, but need some help:

I would extend BuildAction enum with Pack. But then in GetBuildFlags() I don't find the right value of VSSOLNBUILDUPDATEFLAGS to return. How is Visual Studio providing the command?
grafik

Activity

  1. reduckted commented on Apr 11, 2022

    @reduckted
    Contributor

    I'm only guessing, but the command is probably provided by an internal extension rather than as part of the core Visual Studio SDK. As you mentioned, "packing" a project can only be done for .NET SDK-style projects, so it's not really a generic type of command that could apply to other types of projects like building and cleaning can.

    If you want to pack a project in your extension, the easiest solution is to just execute the command:

    await VS.Commands.ExecuteAsync("Build.Packselection");
  2. AchimStuy commented on Apr 12, 2022

    @AchimStuy
    ContributorAuthor

    Thank you for the info and the quick help. I will try this out. Maybe this could be added to the help? I might also do this and create a PR, but it might take some time..

    And as I want to learn something? Is this Build.Packselection somewhere documented? Or how could I have known that?

  3. reduckted commented on Apr 13, 2022

    @reduckted
    Contributor

    Is this Build.Packselection somewhere documented? Or how could I have known that?

    Since it's a command, you should be able to assign a shortcut key to it. So I went to Tools -> Options and then went to the Environment/Keyboard page. I searched for "pack".

    image

    To make sure that Build.Packselection was the correct command, I assigned a keyboard shortcut to it, then I checked if the shortcut appeared next to the menu item.

    image

    And it was the correct command. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions