Skip to content
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

Regex Generators fail to build with WPF #60257

Closed
myblindy opened this issue Mar 18, 2022 · 0 comments · Fixed by dotnet/wpf#6534
Closed

Regex Generators fail to build with WPF #60257

myblindy opened this issue Mar 18, 2022 · 0 comments · Fixed by dotnet/wpf#6534
Assignees

Comments

@myblindy
Copy link

Version Used:

VS 17.2 Preview 2

Steps to Reproduce:

Clone https://github.com/myblindy/RegexGeneratorWpfIssue and try to build.

The error message is:

error CS8795: Partial method 'S.CompactAtaRegex()' must have an implementation part because it has accessibility modifiers.

Notes:

  • I have double checked that the regex generator output is correct, including the class names and namespace names and everything. In fact pressing F12 on the partial function name takes you directly to the sourcegen output.
  • I have tried enabled the IncludePackageReferencesDuringMarkupCompilation flag that was supposed to let source generators bypass WPF, but that didn't fix the issue.
  • Interestingly enough, if you remove the <support:IntNullableHasValue x:Key="IntNullableHasValue"/> line from App.xaml (ie all resource references), the source generator output gets compiled again and the problem disappears.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants