33 references to NativeMethodsShared
MSBuildTaskHost (33)
AssemblyInfo.cs (1)
4global using NativeMethodsShared = Microsoft.Build.Framework.NativeMethods;
BuildEnvironmentHelper.cs (12)
139if (!NativeMethodsShared.IsWindows) 171if (NativeMethodsShared.IsWindows && 244if (NativeMethodsShared.IsWindows && 374NativeMethodsShared.ProcessorArchitecture == Framework.NativeMethods.ProcessorArchitectures.X64 ? "amd64" : 375NativeMethodsShared.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)
160if (NativeMethodsShared.GetLastWriteDirectoryUtcTime(directoryPath, out lastModifiedTime)) 484if (NativeMethodsShared.IsWindows) 486string uncheckedFullPath = NativeMethodsShared.GetFullPath(path); 490string message = ResourceUtilities.FormatString(AssemblyResources.GetString("Shared.PathTooLong"), path, NativeMethodsShared.MaxPath); 509if (!NativeMethodsShared.IsWindows || !path.StartsWith(@"\\", StringComparison.Ordinal)) 764if (NativeMethodsShared.IsWindows && !EndsWithSlash(fullPath)) 1205return path.Length >= NativeMethodsShared.MaxPath; 1210bool hasMaxPath = NativeMethodsShared.HasMaxPath; 1211int maxPath = NativeMethodsShared.MaxPath; 1213return 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)
1067bool success = NativeMethods.GetFileAttributesEx(path, 0, ref data); 1069if (success && (data.fileAttributes & NativeMethods.FILE_ATTRIBUTE_DIRECTORY) == 0)
OutOfProcTaskHostNode.cs (2)
825NativeMethodsShared.SetCurrentDirectory(BuildEnvironmentHelper.Instance.CurrentMSBuildToolsDirectory); 907NativeMethodsShared.SetCurrentDirectory(taskConfiguration.StartupDirectory);