Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion TUnit.Core.SourceGenerator/Helpers/FileNameHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ internal static class FileNameHelper
/// <returns>A deterministic filename like "MyNamespace_MyClass_MyMethod__Int32_String.g.cs"</returns>
// Conservative limit to avoid PathTooLongException on Windows with net472,
// which enforces the legacy 260-character MAX_PATH limit in Roslyn's AddSource.
private const int MaxHintNameLength = 200;
// Roslyn prepends the CWD to the hint name when calling Path.GetFullPathInternal,
// so we must leave ~110 chars of headroom for the working directory path.
private const int MaxHintNameLength = 150;

public static string GetDeterministicFileNameForMethod(INamedTypeSymbol typeSymbol, IMethodSymbol methodSymbol)
{
Expand Down
Loading