Skip to content

Commit b70622a

Browse files
Create .dotnet-link file for UnityRoslynUpdater detection
1 parent 7c8d4bd commit b70622a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

sources/UnityRoslynUpdater/UpdateOperations/UpdateSdkOperation.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ void ProcessBuiltInSdkDirectory(string path)
4040

4141
Directory.CreateSymbolicLink(Path.Combine(context.EditorDataPath, "NetCoreRuntime"), DotNetRoot.GetLocation());
4242
Directory.CreateSymbolicLink(Path.Combine(context.EditorDataPath, "DotNetSdkRoslyn"), Path.Combine(sdk.Location, "Roslyn", "bincore"));
43+
44+
// Leave behind a file denoting which SDK we are currently linked to.
45+
File.WriteAllText(Path.Combine(context.EditorDataPath, ".dotnet-link"), sdk.Location);
46+
4347
Console.WriteLine($"Linked to .NET SDK at {sdk.Location}");
4448
return Task.CompletedTask;
4549
}

0 commit comments

Comments
 (0)