-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix dotnet new
to suggest @
instead of deprecated ::
separator in update notifications
#51153
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
base: release/10.0.2xx
Are you sure you want to change the base?
Fix dotnet new
to suggest @
instead of deprecated ::
separator in update notifications
#51153
Conversation
Co-authored-by: marcpopMSFT <[email protected]>
dotnet new
to suggest @
instead of deprecated ::
separator in update notifications
@copilot fix the templates tests that are failing because of the switch over from :: to @ |
Fixed in commit 5a2929d. All 4 approval tests now pass:
The changes ensure that all DisplayName usages now show
|
Co-authored-by: marcpopMSFT <[email protected]>
@copilot you added .Replace of the :: in a couple of places. I don't think we should do that but rather should fix the source of that string if it's still a ::. Can you revert those .Replace calls and determine if there are other places in the templating code that are including the :: text? |
I've investigated the DisplayName sources. The The DisplayName formatting with Could you clarify where the source code is that constructs these DisplayName strings? Is TemplateEngine.Edge source maintained in this repo, or should I look for a different architectural approach that doesn't involve string replacement? |
@copilot The DisplayName strings come from the dotnet/templating repo that I also own. Plese revert the .Replace calls as we'll make the changes to the DisplayName in that repo. I've filed this issue to track that work: dotnet/templating#9414 |
Co-authored-by: marcpopMSFT <[email protected]>
Reverted all The changes in this PR now only replace All 4 built-in package tests now pass with the updated approval files that expect |
Fix deprecated :: separator in dotnet new update suggestions
This PR fixes the issue where
dotnet new <sometemplate>
suggests using the deprecatedpackage::version
syntax instead of the correctpackage@version
syntax when advising about available upgrades.Changes Completed:
Files Changed:
Summary:
The fix replaces
::
with@
in places where this repository directly constructs package version strings (e.g.,$"{packageId}@{version}"
).Note: DisplayName properties from the Microsoft.TemplateEngine.Edge package (such as
InstallRequest.DisplayName
andTemplatePackage.DisplayName
) still use::
format and are not modified in this PR. These will be fixed at the source in dotnet/templating#9414.This includes:
@
@
@
::
(to be fixed in dotnet/templating)Example output (before):
Example output (after):
Known Limitations:
Some messages that display template package names will continue to show
::
format until the DisplayName properties are updated in the dotnet/templating repository:Testing:
✅ All 20 DotnetNewUpdateTests integration tests pass
✅ All 4 built-in package approval tests pass:
✅ Manual testing confirms correct output
✅ Build succeeds with no warnings or errors
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.