templating icon indicating copy to clipboard operation
templating copied to clipboard

Does `dotnet new` have merge/append functionality?

Open JPThorne opened this issue 3 years ago • 2 comments

Let's say I have a template, with a file, and this file has some parametized method.

Now, I can run this template with some set of params against an output folder and the file is written with the params filled in. If I want to run the template again with a different set of params I have to use --force, but of course now my 1st params are overwritten with the new file.

Is there a way to do some sort of 'merge' or 'append' to the generated output rather than a full overwrite? Where could someone request this kind of feature?

JPThorne avatar Mar 07 '22 07:03 JPThorne

Hi @JPThorne, Thank you very much for the issue. Unfortunately, this is currently not possible. We don't have plans to support this kind of functionality for the time being. I will keep this ticket open so that we can gather further feedback from the community.

bekir-ozturk avatar Mar 07 '22 12:03 bekir-ozturk

Hi @bekir-ozturk, thank you for the feedback. I will keep an eye on this issue and repo to see what develops, if anything.

For now I will try to wrap this cli myself and see what "creative" solutions can be used. Maybe I will parse the template variables and append some special marker to make them unique, e.g. PARAM -> PARAM_1, PARAM_2.

JPThorne avatar Mar 07 '22 12:03 JPThorne

Close as not planned.

YuliiaKovalova avatar May 18 '23 11:05 YuliiaKovalova