Fix hashed value on Windows

This commit is contained in:
Tamas Vajk
2024-08-20 14:03:34 +02:00
parent 0037ad406d
commit a0dc20caef

View File

@@ -38,7 +38,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
try
{
var relativePathToCsProj = Path.GetRelativePath(sourceDir, csprojFile);
var name = FileUtils.ComputeHash($"{relativePathToCsProj}{Environment.NewLine}{this.GetType().Name}");
var name = FileUtils.ComputeHash($"{relativePathToCsProj}\n{this.GetType().Name}");
using var tempDir = new TemporaryDirectory(Path.Join(FileUtils.GetTemporaryWorkingDirectory(out _), "source-generator"), "source generator temporary", logger);
var analyzerConfigPath = Path.Combine(tempDir.DirInfo.FullName, $"{name}.txt");
var dllPath = Path.Combine(tempDir.DirInfo.FullName, $"{name}.dll");