Skip to content

Fix template warnings during build #5578

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

Closed
wants to merge 6 commits into from
Closed

Conversation

sebastienros
Copy link
Member

@sebastienros sebastienros commented Sep 7, 2024

Fixes #2893

Checking the JSON schema and the templates doc these properties seem to be required in the files.

Microsoft Reviewers: Open in CodeFlow

@ghost ghost added the area-templates label Sep 7, 2024
@DamianEdwards
Copy link
Member

I don't know anything about the warnings this fixes I'm sorry. @phenning @sayedihashimi can you review this change please?

@davidfowl davidfowl requested a review from phenning September 9, 2024 00:43
@davidfowl
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@radical
Copy link
Member

radical commented Sep 10, 2024

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@phenning
Copy link
Contributor

I don't know anything about the warnings this fixes I'm sorry. @phenning @sayedihashimi can you review this change please?

I'm not sure about the warnings either, what was getting warnings? The lack of entries in the localization files? @joeloff I'm not sure how the loc infrastructure works here, is it necessary to seed all the non-enu files, or should only the en-us be modified with the text from the template.json?

@joeloff
Copy link
Member

joeloff commented Sep 11, 2024

I don't know anything about the warnings this fixes I'm sorry. @phenning @sayedihashimi can you review this change please?

I'm not sure about the warnings either, what was getting warnings? The lack of entries in the localization files? @joeloff I'm not sure how the loc infrastructure works here, is it necessary to seed all the non-enu files, or should only the en-us be modified with the text from the template.json?

Don't think it needs to have it, but the localization infrastructure often copies new ENU values for all the locales and then vendors would eventually pick those up for translation

@radical
Copy link
Member

radical commented Sep 11, 2024

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@sebastienros
Copy link
Member Author

Added documentation on how localization works (there is a bot) so we just need to provide the english entries as the source.

@phenning the warnings are as such

.../Microsoft.TemplateEngine.Authoring.Tasks.targets(17,5): Template configuration message MV008: Missing 'generatorVersions'. [/Users/ankj/dev/aspire/src/Aspire.ProjectTemplates/Aspire.ProjectTemplates.csproj]
.../Microsoft.TemplateEngine.Authoring.Tasks.targets(17,5): Template configuration message MV011: One or more postActions have a malformed or missing manualInstructions value. [/Users/ankj/dev/aspire/src/Aspire.ProjectTemplates/Aspire.ProjectTemplates.csproj]

### Localization bot

When updating or adding a new property in a `template.json` it is
required to update or add the English text of the entry of each of the localization files. The text will be kept in English, and a localization bot will create a PR to change it with the correct translation. See [this PR](https://github.com/dotnet/aspire/pull/3144) for an example of one created by the localization bot.
Copy link
Member

Choose a reason for hiding this comment

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

Do you need to automatically add the entry on each of the loc files? I thought that this happens automatically if you update the template.json file and then you build the template project

Copy link
Member

@joperezr joperezr left a comment

Choose a reason for hiding this comment

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

Changes LGTM

@davidfowl
Copy link
Member

Stale

@@ -227,6 +228,11 @@
"id": "set-startup-project",
"description": "Sets the startup project in the solution",
"actionId": "5BECCC32-4D5A-4476-A0F9-BD2E81AF0689",
"manualInstructions": [
{
"text": "Set the startup project in the solution"
Copy link
Member

Choose a reason for hiding this comment

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

Did you verify that this isn't shown in VS? When I tried to set this recently to suppress this warning, VS would always show this message 😞

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't recall. Can it be an empty string?

Copy link
Member

Choose a reason for hiding this comment

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

Not sure. It may just be a mistake in the schema definition.

@danmoseley danmoseley added the needs-author-action An issue or pull request that requires more info or actions from the author. label Feb 2, 2025
Copy link

This submission has been automatically marked as stale because it has been marked as requiring author action but has not had any activity for 14 days.
It will be closed if no further activity occurs within 7 days of this comment.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2025
@RussKie RussKie deleted the sebros/templates branch March 30, 2025 23:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-templates needs-author-action An issue or pull request that requires more info or actions from the author. no-recent-activity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Template configuration message MV008: Missing 'generatorVersions' message for Aspire.ProjectTemplates.csproj
8 participants