razor
razor copied to clipboard
Rename doesn't properly work for component's parameters
Version used: VS 17.4 Preview 2.1
To reproduce:
- Create blazor server app
- Create component
Component.razor
with this code:
@code {
[Parameter]
public string Parameter { get; set; }
}
- Use this component in another component with parameter
Parameter
set via tag, e.g.<Component Parameter="whatever" />
- In original component rename
Parameter
->AnotherParameter
Expected behavior: Name changed in all usages, including those made via tag in markup
Actual behavior: Name doesn't changes in usages in markup
Demo:
I'm also here because of this issue and I'm trying to find another IDE because of it. It is so annoying. It seems to not be supported as of yet, and it has been on the backlog for a year: https://github.com/dotnet/razor-tooling/issues/4444
PLEASE fix this.
I've been following this issue, are you not gonna fix this? :/ Feelsbadman. Its so weird to not be able to use something as simple as a refactor. Will for sure gun for our company to switch away from visual studio as it is a buggy mess that misses so many simple things. We even have an vs-icon in our chat to describe when a feature is riddled of bugs
This is definitely not on the "not gonna fix this" list, we just didn't get to it this sprint, so have moved it to the next. Sadly I can't promise it won't get moved to the one after that either - we are a very small team with lots of shifting priorities. Unfortunately due to various technical considerations, this issue is probably not as simple as it seems, and could require work from razor tooling, razor compiler, and roslyn, to coordinate things.
We even have an vs-icon in our chat to describe when a feature is riddled of bugs
If you can be bothered, we'd love for you to create issues for those bugs, or report them through VS "Report a Problem". We really do want you to have the best Razor editing experience possible, though I understand the frustration. We feel it too from our side.
I understand, I apologize for sounding a bit annoyed. I've sent in a report and will try to do it more often when something weird occurs.
@davidwengier should we close https://github.com/dotnet/razor/issues/4444 as a dupe of this?
Strictly speaking they're different, as this one is a rename originating from us, and the other is originating from Roslyn, but I should have a PR up today to fix both anyway :)