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

Loss of functionality in postActions Restore between version 2.1.604 and 2.2.204. #1896

Closed
swiato opened this issue May 21, 2019 · 1 comment
Labels
size:3.0 triaged The issue was evaluated by the triage team, placed on correct area, next action defined.

Comments

@swiato
Copy link

swiato commented May 21, 2019

In dotnet version 2.1.604 it was possible to use following construction:

"sources": [
    {
      "include": [
        "TemplateProject.csproj" 
      ],
      "rename": { "TemplateProject": "TemplateProject.UI" }
    },
    {
      "include": [
        "TemplateProject.csproj" 
      ],
      "rename": {
        "TemplateProject": "TemplateProject.Tests" 
      }
    }
  ]

And after that using renamed filenames in primaryOutputs:

"primaryOutputs": [
	{ "path": "TemplateProject.UI.csproj" },
	{ "path": "TemplateProject.Tests.csproj" }
]

Then after using restore postAction everything behaved as expected, restore was performed for both generated projects.

In dotnet version 2.2.204 it does not work anymore, all we get is "MSBUILD : error MSB1009". Attached is simple example of this behaviour:

TemplateProjectRestore.zip

I believe there could be many use cases for such functionality. In our case it is using custom SDK, that can recognize project name (suffix) and e.g add necessary references to that project just by knowing its name. All in the spirit of "convention over configuration".

@donJoseLuis donJoseLuis added needsprioritization triaged The issue was evaluated by the triage team, placed on correct area, next action defined. size:5.0 and removed needs-prioritization labels Mar 20, 2020
@vlada-shubina vlada-shubina self-assigned this Sep 23, 2020
@vlada-shubina vlada-shubina added the need-pm-discussion Need agreement from PM that the issue aligns to targeted stories for any of the next 2 releases label Sep 24, 2020
@vlada-shubina
Copy link
Member

@swiato
I have analyzed the configuration attached - there is an issue with this configuration: primaryOutputs should include the source filenames, and not the names after the rename, therefore the config file doesn't work. Unfortunately, for same reason it is not possible to use same file as the source for 2 target files in case these files are meant to be primary outputs.
I'm attaching the configuration that should work for your case.
TemplateProjectRestore - corrected.zip

It's correct that this configuration worked in 2.1, however we don't plan to fix it for later versions.
Please do not hesitate to reopen the issue in case of follow-up questions.

@vlada-shubina vlada-shubina removed their assignment Oct 9, 2020
@vlada-shubina vlada-shubina removed the need-pm-discussion Need agreement from PM that the issue aligns to targeted stories for any of the next 2 releases label Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:3.0 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

3 participants