33 references to NativeMethodsShared
MSBuildTaskHost (33)
AssemblyInfo.cs (1)
4
global using NativeMethodsShared = Microsoft.Build.Framework.
NativeMethods
;
BuildEnvironmentHelper.cs (12)
139
if (!
NativeMethodsShared
.IsWindows)
171
if (
NativeMethodsShared
.IsWindows &&
244
if (
NativeMethodsShared
.IsWindows &&
374
NativeMethodsShared
.ProcessorArchitecture == Framework.
NativeMethods
.ProcessorArchitectures.X64 ? "amd64" :
375
NativeMethodsShared
.ProcessorArchitecture == Framework.
NativeMethods
.ProcessorArchitectures.ARM64 ? "arm64" : string.Empty,
580
MSBuildToolsDirectoryRoot =
NativeMethodsShared
.ProcessorArchitecture switch
582
NativeMethodsShared
.ProcessorArchitectures.X86 => CurrentMSBuildToolsDirectory,
583
NativeMethodsShared
.ProcessorArchitectures.X64 or
NativeMethodsShared
.ProcessorArchitectures.ARM64
585
_ => throw new InternalErrorException("Unknown processor architecture " +
NativeMethodsShared
.ProcessorArchitecture),
Concurrent\ConcurrentDictionary.cs (1)
101
int concurrencyLevel =
NativeMethodsShared
.GetLogicalCoreCount();
FileSystem\MSBuildTaskHostFileSystem.cs (3)
23
return
NativeMethodsShared
.FileOrDirectoryExists(path);
38
return
NativeMethodsShared
.DirectoryExists(path);
80
return
NativeMethodsShared
.FileExists(path);
FileUtilities.cs (10)
160
if (
NativeMethodsShared
.GetLastWriteDirectoryUtcTime(directoryPath, out lastModifiedTime))
484
if (
NativeMethodsShared
.IsWindows)
486
string uncheckedFullPath =
NativeMethodsShared
.GetFullPath(path);
490
string message = ResourceUtilities.FormatString(AssemblyResources.GetString("Shared.PathTooLong"), path,
NativeMethodsShared
.MaxPath);
509
if (!
NativeMethodsShared
.IsWindows || !path.StartsWith(@"\\", StringComparison.Ordinal))
764
if (
NativeMethodsShared
.IsWindows && !EndsWithSlash(fullPath))
1212
return path.Length >=
NativeMethodsShared
.MaxPath;
1217
bool hasMaxPath =
NativeMethodsShared
.HasMaxPath;
1218
int maxPath =
NativeMethodsShared
.MaxPath;
1220
return hasMaxPath && !IsRootedNoThrow(path) &&
NativeMethodsShared
.GetCurrentDirectory().Length + path.Length + 1 /* slash */ >= maxPath;
Modifiers.cs (1)
464
if (
NativeMethodsShared
.IsWindows)
NamedPipeUtil.cs (1)
25
if (
NativeMethodsShared
.IsUnixLike)
NativeMethods.cs (2)
1195
bool success =
NativeMethods
.GetFileAttributesEx(path, 0, ref data);
1197
if (success && (data.fileAttributes &
NativeMethods
.FILE_ATTRIBUTE_DIRECTORY) == 0)
OutOfProcTaskHostNode.cs (2)
825
NativeMethodsShared
.SetCurrentDirectory(BuildEnvironmentHelper.Instance.CurrentMSBuildToolsDirectory);
907
NativeMethodsShared
.SetCurrentDirectory(taskConfiguration.StartupDirectory);