diff --git a/lib/compilers/dotnet.ts b/lib/compilers/dotnet.ts
index 0b5e1ace867cd8c9397ea6d9d050c39dfd91b69a..90f410402dcf3a9db3d801395c0ef14e66c9eb3f 100644
--- a/lib/compilers/dotnet.ts
+++ b/lib/compilers/dotnet.ts
@@ -149,9 +149,6 @@ class DotNetCompiler extends BaseCompiler {
         const programOutputPath = path.join(programDir, 'bin', this.buildConfig, this.targetFramework);
         const programDllPath = path.join(programOutputPath, 'CompilerExplorer.dll');
 
-        const sdkBaseDir = path.join(path.dirname(compiler), 'sdk');
-        const sdkVersions = await fs.readdir(sdkBaseDir);
-
         const nugetConfigFileContent = `<?xml version="1.0" encoding="utf-8"?>
         <configuration>
             <packageSources>