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

feat: dotnet new templates checkups and solution #134

Merged
merged 5 commits into from
Jun 21, 2023

Conversation

MartinZikmund
Copy link
Member

@MartinZikmund MartinZikmund commented Mar 3, 2023

Checks for the latest version of Uno and Extensions templates and installs them if available.

@MartinZikmund MartinZikmund self-assigned this Mar 3, 2023
Comment on lines 56 to 58
// Running 'dotnet new uninstall' without any package ID will list all installed
// dotnet new templates along with their versions.
var processInfo = new ProcessStartInfo("dotnet", "new uninstall");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A more robust approach would be using Microsoft.TemplateEngine.Edge NuGet package. I haven't used it before, but I believe this is what the .NET CLI uses underneath the hoods.

That way we don't have to worry about .NET CLI changing the format of the produced output.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried to use the library, but I wasn't able to get it work and there is not many useful samples for it. So for now, keeping the original approach, but if you have some resources, I would look into it further 👍

@jeromelaban
Copy link
Member

We need to adjust this for the new nuget package template name which is not available yet.

@MartinZikmund
Copy link
Member Author

MartinZikmund commented May 1, 2023

TODO: Add uninstall dotnet new uninstall Uno.ProjectTemplates.Dotnet

DONE

@MartinZikmund MartinZikmund force-pushed the dev/mazi/update-templates branch from 66c8309 to d5b9702 Compare June 21, 2023 07:49
@MartinZikmund MartinZikmund enabled auto-merge June 21, 2023 08:50
@MartinZikmund MartinZikmund merged commit 073621b into main Jun 21, 2023
@MartinZikmund MartinZikmund deleted the dev/mazi/update-templates branch June 21, 2023 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants