Skip to content

Commit fe1b95c

Browse files
Remove AppendMsBuildPropertyIfSet helpers
1 parent 2755d02 commit fe1b95c

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

  • packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/StartUp

packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/StartUp/GeneratorHandler.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,6 @@ internal static string GetPackageDirectory(string rootDirectory, string package)
304304
process.StartInfo.ArgumentList.Add("Release");
305305
process.StartInfo.ArgumentList.Add($"-p:BaseOutputPath={binDirectory}");
306306
process.StartInfo.ArgumentList.Add($"-p:BaseIntermediateOutputPath={objDirectory}");
307-
AppendMsBuildPropertyIfSet(process.StartInfo.ArgumentList, "RestoreConfigFile", "RestoreConfigFile");
308-
AppendMsBuildPropertyIfSet(process.StartInfo.ArgumentList, "NuGetAudit", "NuGetAudit");
309307

310308
process.Start();
311309
// Read both streams to avoid deadlocks. 'dotnet build' writes build/compiler
@@ -348,18 +346,6 @@ internal static (string StandardOutput, string StandardError) ReadProcessOutput(
348346
return (stdoutTask.Result, stderrTask.Result);
349347
}
350348

351-
private static void AppendMsBuildPropertyIfSet(
352-
System.Collections.ObjectModel.Collection<string> argumentList,
353-
string envVarName,
354-
string propertyName)
355-
{
356-
var value = Environment.GetEnvironmentVariable(envVarName, EnvironmentVariableTarget.Process);
357-
if (!string.IsNullOrWhiteSpace(value))
358-
{
359-
argumentList.Add($"-p:{propertyName}={value}");
360-
}
361-
}
362-
363349
/// <summary>
364350
/// Creates a unique, process-isolated directory to hold a plugin build's 'bin' and 'obj'
365351
/// output. The directory is keyed on the process id and a GUID so that concurrent

0 commit comments

Comments
 (0)