public NetSdkMsiInstallerClient(InstallElevationContextBase elevationContext, ISetupLogger logger, IWorkloadResolver workloadResolver, SdkFeatureBand sdkFeatureBand, INuGetPackageDownloader nugetPackageDownloader = null, VerbosityOptions verbosity = VerbosityOptions.normal, PackageSourceLocation packageSourceLocation = null, IReporter reporter = null) : base(elevationContext, logger, reporter) { _packageSourceLocation = packageSourceLocation; _nugetPackageDownloader = nugetPackageDownloader; _sdkFeatureBand = sdkFeatureBand; _workloadResolver = workloadResolver; _dependent = $"{DependentPrefix},{sdkFeatureBand},{HostArchitecture}"; Log?.LogMessage($"Executing: {CurrentProcess.GetCommandLine()}, PID: {CurrentProcess.Id}, PPID: {ParentProcess.Id}"); Log?.LogMessage($"{nameof(IsElevated)}: {IsElevated}"); Log?.LogMessage($"{nameof(Is64BitProcess)}: {Is64BitProcess}"); Log?.LogMessage($"{nameof(RebootPending)}: {RebootPending}"); Log?.LogMessage($"{nameof(ProcessorArchitecture)}: {ProcessorArchitecture}"); Log?.LogMessage($"{nameof(HostArchitecture)}: {HostArchitecture}"); Log?.LogMessage($"{nameof(SdkDirectory)}: {SdkDirectory}"); Log?.LogMessage($"SDK feature band: {_sdkFeatureBand}"); if (IsElevated) { // Turn off automatic updates. We don't want MU to potentially patch the SDK // and it also reduces the risk of hitting ERROR_INSTALL_ALREADY_RUNNING. UpdateAgent.Stop(); } }
private void WriteNotes(IConfiguration configuration, PathTable pathTable, StreamWriter writer, Func <AbsolutePath, string> mapPath) { var layout = configuration.Layout; // Write the notes file which contains some useful info about the repro // TODO: We need to add support for RSP files to be precise WriteHeader(writer, "Command Line"); writer.WriteLine(CurrentProcess.GetCommandLine()); WriteHeader(writer, "Root Configuration File"); writer.WriteLine(mapPath(configuration.Layout.PrimaryConfigFile)); WriteHeader(writer, "Layout"); writer.WriteLine("SourceDirectory = {0}", layout.SourceDirectory.ToString(pathTable)); writer.WriteLine("ObjectDirectory = {0}", layout.ObjectDirectory.ToString(pathTable)); writer.WriteLine("CacheDirectory = {0}", layout.CacheDirectory.ToString(pathTable)); writer.WriteLine("FileContentTableFile = {0}", layout.FileContentTableFile.ToString(pathTable)); writer.WriteLine("MaxRelativeOutputDirectoryLength = {0}", configuration.Engine.MaxRelativeOutputDirectoryLength); WriteHeader(writer, "Effective Environment Variables"); foreach (var envVar in m_environmentVariables) { writer.WriteLine("{0}={1}", envVar.Key, envVar.Value ?? " <THIS VARIABLE WAS NOT SET, BUT WAS USED>"); } WriteHeader(writer, "Mounts"); foreach (var mount in m_mounts) { writer.WriteLine(mount.Name.ToString(pathTable.StringTable)); writer.WriteLine("\tPath: {0}", mount.Path.ToString(pathTable)); writer.WriteLine("\tIsReadable: {0}", mount.IsReadable); writer.WriteLine("\tIsWritable: {0}", mount.IsWritable); writer.WriteLine("\tAllowCreateDirectory: {0}", mount.AllowCreateDirectory); writer.WriteLine("\tTrackSourceFileChanges: {0}", mount.TrackSourceFileChanges); } }