-
Hi there. I started using this source generator to replace using PostSharp's NotifyPropertyChanged support and I think it works out great. But I do have a few things I wanted to point out. First, it seems that the source generator works fully when compiling but during design-time, it seems to break after the first time of applying it to a field. As in, the first field has the proper Intellisense and the generated source is available to see. But once I apply it on a second field, suddenly Visual Studio thinks that the generated code is gone, Intellisense no longer sees the attribute or the generated property. I don't know if this is a problem because of how this source generator works or some other reason. Second, it seems that the source generator does not transfer the XML documentation from the field to the generated property. Was it intended that the documentation was not transferred or is this something that could be done? I do like using the source generator as I think it is better than having PostSharp try to add all its INotifyPropertyChanged post-compile and also that their support has a few issues here and there. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 20 replies
-
Interesting, I haven't seen anything like that myself. When you say that VS thinks the generated code is gone, are you looking at the generated code under the 'Analysers' node of the Solution Explorer, or are you referring to something else? If it works properly during a full build, I rather suspect that any design-time issues have to be a Visual Studio thing. The source generator itself doesn't know the difference between a full build and design-time -- it just gets called on a Compilation.
I hadn't even considered that. Should be an easy fix, thanks. |
Beta Was this translation helpful? Give feedback.
-
I'll hold off on a new release for now, in case anything needs to be done for your first point. |
Beta Was this translation helpful? Give feedback.
1d40b8f
I'll hold off on a new release for now, in case anything needs to be done for your first point.