Skip to content

Commit fb71d31

Browse files
committed
reverted registry code for windows for now
1 parent d879cba commit fb71d31

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

src/Dotnet.Script.Core/Scaffolder.cs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -119,23 +119,6 @@ private void CreateLaunchConfiguration(string currentWorkingDirectory)
119119
Directory.CreateDirectory(vsCodeDirectory);
120120
}
121121

122-
// on windows we use this as opportunity to make the file association for .csx -> dotnet-script
123-
// (If/when dotnet install command provides us an install time hook this code should move there)
124-
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
125-
{
126-
// check to see if .csx is mapped to dotnet-script
127-
if (_commandRunner.Execute("reg", @"query HKCU\Software\classes\.csx") != 0)
128-
{
129-
// register dotnet-script as the tool to process .csx files
130-
_commandRunner.Execute("reg", @"add HKCU\Software\classes\.csx /f /ve /t REG_SZ -d dotnetscript");
131-
}
132-
133-
if (_commandRunner.Execute("reg", @"query HKCU\Software\classes\dotnetscript") != 0)
134-
{
135-
_commandRunner.Execute("reg", $@"add HKCU\Software\Classes\dotnetscript\Shell\Open\Command /f /ve /t REG_EXPAND_SZ /d ""\""%ProgramFiles%\dotnet\dotnet.exe\"" exec \""{Path.Combine(_scriptEnvironment.InstallLocation, "dotnet-script.dll")}\"" \""%1\"" -- %*""");
136-
}
137-
}
138-
139122
_scriptConsole.WriteNormal("Creating VS Code launch configuration file");
140123
string pathToLaunchFile = Path.Combine(vsCodeDirectory, "launch.json");
141124
string installLocation = _scriptEnvironment.InstallLocation;

0 commit comments

Comments
 (0)