33 references to NativeMethodsShared
MSBuildTaskHost (33)
AssemblyInfo.cs (1)
4global using NativeMethodsShared = Microsoft.Build.Framework.NativeMethods;
BuildEnvironmentHelper.cs (12)
138if (!NativeMethodsShared.IsWindows) 170if (NativeMethodsShared.IsWindows && 243if (NativeMethodsShared.IsWindows && 373NativeMethodsShared.ProcessorArchitecture == Framework.NativeMethods.ProcessorArchitectures.X64 ? "amd64" : 374NativeMethodsShared.ProcessorArchitecture == Framework.NativeMethods.ProcessorArchitectures.ARM64 ? "arm64" : string.Empty, 580MSBuildToolsDirectoryRoot = NativeMethodsShared.ProcessorArchitecture switch 582NativeMethodsShared.ProcessorArchitectures.X86 => CurrentMSBuildToolsDirectory, 583NativeMethodsShared.ProcessorArchitectures.X64 or NativeMethodsShared.ProcessorArchitectures.ARM64 585_ => throw new InternalErrorException("Unknown processor architecture " + NativeMethodsShared.ProcessorArchitecture),
Concurrent\ConcurrentDictionary.cs (1)
101int concurrencyLevel = NativeMethodsShared.GetLogicalCoreCount();
FileSystem\MSBuildTaskHostFileSystem.cs (3)
23return NativeMethodsShared.FileOrDirectoryExists(path); 38return NativeMethodsShared.DirectoryExists(path); 80return NativeMethodsShared.FileExists(path);
FileUtilities.cs (10)
173if (NativeMethodsShared.GetLastWriteDirectoryUtcTime(directoryPath, out lastModifiedTime)) 505if (NativeMethodsShared.IsWindows) 507string uncheckedFullPath = NativeMethodsShared.GetFullPath(path); 511string message = ResourceUtilities.FormatString(AssemblyResources.GetString("Shared.PathTooLong"), path, NativeMethodsShared.MaxPath); 530if (!NativeMethodsShared.IsWindows || !path.StartsWith(@"\\", StringComparison.Ordinal)) 791if (NativeMethodsShared.IsWindows && !EndsWithSlash(fullPath)) 1245return path.Length >= NativeMethodsShared.MaxPath; 1250bool hasMaxPath = NativeMethodsShared.HasMaxPath; 1251int maxPath = NativeMethodsShared.MaxPath; 1253return hasMaxPath && !IsRootedNoThrow(path) && NativeMethodsShared.GetCurrentDirectory().Length + path.Length + 1 /* slash */ >= maxPath;
Modifiers.cs (1)
464if (NativeMethodsShared.IsWindows)
NamedPipeUtil.cs (1)
25if (NativeMethodsShared.IsUnixLike)
NativeMethods.cs (2)
1194bool success = NativeMethods.GetFileAttributesEx(path, 0, ref data); 1196if (success && (data.fileAttributes & NativeMethods.FILE_ATTRIBUTE_DIRECTORY) == 0)
OutOfProcTaskHostNode.cs (2)
835NativeMethodsShared.SetCurrentDirectory(BuildEnvironmentHelper.Instance.CurrentMSBuildToolsDirectory); 917NativeMethodsShared.SetCurrentDirectory(taskConfiguration.StartupDirectory);