2026 EAP not recognising source generators?

I have two .NET 10 projects, both of which use source generators. Both projects compile and run without errors. But in one project, R# 2026.1 EAP 6 consistently refuses to recognise the source-generated code, and complains that my partial members do not have an implementation part.

For example:

public static partial class CamelCaseHelper
{
	[GeneratedRegex(@"\B\p{Lu}\p{Ll}")]
	private static partial Regex CamelCase { get; }

	...
}

public static partial class ErrorMessages
{
	[LoggerMessage(500, LogLevel.Critical, "An unhandled exception occurred:")]
	public static partial void UnhandledException(ILogger logger, Exception error);
}

I have tried the “clear caches and restart ReSharper” option. I have tried closing VS and deleting the entire _ReSharper.Caches folder and the .DotSettings files. I have tried rebuilding the solution. But nothing will make the errors go away.

I cannot see any obvious differences between my projects - both use the Microsoft.NET.Sdk.Web SDK, both target net10.0, and both use LangVersion 14.

Is there something obvious I should be looking for, or any logging I can enable to work out why R# isn't recognising the source-generated code?

0
1 comment

Hi Richard,

The described behavior appears to be a bug logged in our system: RSRP-503127 Code Analysis: False "Partial property must have an implementation part" error for source-generated code

You are welcome to subscribe and receive all updates concerning this bug. 

0

Please sign in to leave a comment.