Based on the description, source generators should be invoked on document Save. However, this doesn't happen.
Version Used:
Visual Studio 2022 v17.12 Preview 4
Steps to Reproduce:
Paste the snippet to Visual Studio:
using System.Text.RegularExpressions;
var regex = MyTestRegex();
regex.Match("1234");
partial class Program
{
[GeneratedRegex(@"\w+")]
private static partial Regex MyTestRegex();
}
Click Save / Press Ctrl+S.
Expected Behavior:
Method implemenation is generated, and the error is not displayed.
Actual Behavior:
Method implementation is not generated until build.
CS8795 Partial method 'Program.MyTestRegex()' must have an implementation part because it has accessibility modifiers.
Based on the description, source generators should be invoked on document Save. However, this doesn't happen.
Version Used: Visual Studio 2022 v17.12 Preview 4
Steps to Reproduce: Paste the snippet to Visual Studio:
Click Save / Press Ctrl+S.
Expected Behavior: Method implemenation is generated, and the error is not displayed.
Actual Behavior: Method implementation is not generated until build.
Error disappears after build.