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

solutionFolder does not replace sourceName #4871

Closed
brajac709 opened this issue Jun 20, 2022 · 3 comments
Closed

solutionFolder does not replace sourceName #4871

brajac709 opened this issue Jun 20, 2022 · 3 comments
Labels
feature The issue defines new feature. help-wanted good opportunity for contribution to the repo triaged The issue was evaluated by the triage team, placed on correct area, next action defined.
Milestone

Comments

@brajac709
Copy link

I have a template that adds several projects to a solution.
I would like to add these all under their own solution folder, but I need to be able to rename this folder based on the provided name.

Here is an example snippet of my template.json.

{
  "sourceName": "MySource",
  "postActions": [
    {
      "description": "Add projects to solution",
      "manualInstructions": [ { "text": "Add generated projects to solution manually." } ],
      "args": {
        "solutionFolder": "MySource"
      },
      "actionId": "D396686C-DE0E-4DE6-906D-291CD29FC5DE",
      "continueOnError": true
    }
  ]
}

However, when I run this template, the solution only adds MySource folder regardless of the -n MyName parameter.
Is there someway to replace the name when adding a solution folder using this post action?

@vlada-shubina
Copy link
Member

Related: #1600

@vlada-shubina vlada-shubina added the feature The issue defines new feature. label Jun 21, 2022
@vlada-shubina
Copy link
Member

@brajac709 using parameters (also source names) in post actions are not allowed at the moment.

It might be a nice feature though, but we should allow it not only for solutionFolder but also for other applicable post action arguments (like those specified in #1600).

We are open for contributions to get this implemented earlier, so far not sure when it can be scheduled.

@vlada-shubina vlada-shubina added triaged The issue was evaluated by the triage team, placed on correct area, next action defined. help-wanted good opportunity for contribution to the repo labels Jun 21, 2022
@vlada-shubina vlada-shubina added this to the Backlog milestone Jun 21, 2022
@vlada-shubina
Copy link
Member

vlada-shubina commented May 18, 2023

After #1600 was resolved, it is possible to achieve this behavior with the following configuration:

{
  "sourceName": "MySource",
  "postActions": [
    {
      "description": "Add projects to solution",
      "manualInstructions": [ { "text": "Add generated projects to solution manually." } ],
      "args": {
        "solutionFolder": "MySource"
      },
      "applyFileRenamesToArgs": "solutionFolder",
      "actionId": "D396686C-DE0E-4DE6-906D-291CD29FC5DE",
      "continueOnError": true
    }
  ]
}

See #1600 (comment) for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature The issue defines new feature. help-wanted good opportunity for contribution to the repo triaged The issue was evaluated by the triage team, placed on correct area, next action defined.
Projects
None yet
Development

No branches or pull requests

2 participants