You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[severity:I’m unable to use this version] [regression] [worked-in:17.9]
With the following code:
public class GlobalAuthorizationAttribute : Attribute
{
public List<GlobalUserRightEnum> RequiredRights { get; } = new List<GlobalUserRightEnum>();
public GlobalAuthorizationAttribute(params GlobalUserRightEnum[] requiredRights)
{
RequiredRights = requiredRights.ToList();
}
}
Expected behavior: the whole word GlobalAuthorizationAttribute is highlighted and I can edit the end of the name to something else.
When I move the cursor to GlobalAuthorizationAttribute and click F2 Rename or Ctrl+R depends on your keyboard shortcuts setting, then the renaming is possible only in the first part.
I need to rename GlobalAuthorizationAttribute to GlobalAuthorizationAttributeBase.
This is not possible using the feature.
Why do I need to do that?
Because I want to create this code:
Original Comments
Feedback Bot on 8/11/2024, 06:17 PM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
I understand your situation. This is a by-design scenario because we don’t want the Attributes suffix modified. We definitely want to improve this experience.
As a workaround, I tested locally if you comment out the : Attribute, then rename your class to the right name it should work. Later you can comment back the base class.
Thanks for your feedback.
Best,
Shen
Jan Seris on 10/9/2024, 07:50 AM:
OK you should improve the experience definitely. Maybe instead use analyzer and not block the renaming per se?
As for example for private fields and properties - there is a hint shown in Visual Studio but there is no blocking action to prevent that (and that’s probably expected behavior).
This is a much better solution:
The text was updated successfully, but these errors were encountered:
This issue has been moved from a ticket on Developer Community.
[severity:I’m unable to use this version] [regression] [worked-in:17.9]
With the following code:
Expected behavior: the whole word GlobalAuthorizationAttribute is highlighted and I can edit the end of the name to something else.
When I move the cursor to GlobalAuthorizationAttribute and click F2 Rename or Ctrl+R depends on your keyboard shortcuts setting, then the renaming is possible only in the first part.
I need to rename GlobalAuthorizationAttribute to GlobalAuthorizationAttributeBase.
This is not possible using the feature.
Why do I need to do that?
Because I want to create this code:
Original Comments
Feedback Bot on 8/11/2024, 06:17 PM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Feedback Bot on 8/12/2024, 07:13 AM:
Thank you for sharing your feedback! Our teams prioritize action on product issues with broad customer impact. See details at: https://docs.microsoft.com/en-us/visualstudio/ide/report-a-problem#faq. In case you need answers to common questions or need assisted support, be sure to use https://visualstudio.microsoft.com/vs/support/. We’ll keep you posted on any updates to this feedback.
Shen Chen [MSFT] on 10/8/2024, 04:24 PM:
Hi Jan,
I understand your situation. This is a by-design scenario because we don’t want the Attributes suffix modified. We definitely want to improve this experience.
As a workaround, I tested locally if you comment out the
: Attribute
, then rename your class to the right name it should work. Later you can comment back the base class.Thanks for your feedback.
Best,
Shen
Jan Seris on 10/9/2024, 07:50 AM:
OK you should improve the experience definitely. Maybe instead use analyzer and not block the renaming per se?
As for example for private fields and properties - there is a hint shown in Visual Studio but there is no blocking action to prevent that (and that’s probably expected behavior).
This is a much better solution:
The text was updated successfully, but these errors were encountered: