Skip to content

Building from NFS: The last access/last write time on file cannot be set #13808

Open
@emmenlau

Description

@emmenlau

I'm working with sources on an NFS mapped drive on Windows 10 2004. The drive is mapped with the Microsoft Windows NFSv3 client. User and group IDs are mapped to the correct Linux server user/group IDs. I can read and write from the drive without problems.

But when I try to build a .NET Core 3.1 project with dotnet 3.1.402, the build fails very early with error:

C:\Program Files\dotnet\sdk\3.1.402\Microsoft.Common.CurrentVersion.targets(4385,5): error MSB3374: The last access/last write time on file "U:\Source\thrift\lib\netstd\Tests\Thrift.PublicInterfaces.Compile.Tests\obj\cygwin\Debug\netcoreapp3.1\Thrift.PublicInterfaces.Compile.Tests.csproj.CopyComplete" cannot be set. The parameter is incorrect. : 'U:\Source\thrift\lib\netstd\Tests\Thrift.PublicInterfaces.Compile.Tests\obj\cygwin\Debug\netcoreapp3.1\Thrift.PublicInterfaces.Compile.Tests.csproj.CopyComplete' [U:\Source\thrift\lib\netstd\Tests\Thrift.PublicInterfaces.Compile.Tests\Thrift.PublicInterfaces.Compile.Tests.csproj]
C:\Program Files\dotnet\sdk\3.1.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(424,5): error MSB4018: The "CreateAppHost" task failed unexpectedly. [U:\Source\thrift\lib\netstd\Tests\Thrift.IntegrationTests\Thrift.IntegrationTests.csproj]
C:\Program Files\dotnet\sdk\3.1.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(424,5): error MSB4018: System.IO.IOException: The parameter is incorrect. : 'U:\Source\thrift\lib\netstd\Tests\Thrift.IntegrationTests\obj\cygwin\Debug\netcoreapp3.1\Thrift.IntegrationTests.exe' [U:\Source\thrift\lib\netstd\Tests\Thrift.IntegrationTests\Thrift.IntegrationTests.csproj]
C:\Program Files\dotnet\sdk\3.1.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(424,5): error MSB4018:    at System.IO.FileSystem.SetLastWriteTime(String fullPath, DateTimeOffset time, Boolean asDirectory) [U:\Source\thrift\lib\netstd\Tests\Thrift.IntegrationTests\Thrift.IntegrationTests.csproj]
C:\Program Files\dotnet\sdk\3.1.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(424,5): error MSB4018:    at System.IO.File.SetLastWriteTimeUtc(String path, DateTime lastWriteTimeUtc) [U:\Source\thrift\lib\netstd\Tests\Thrift.IntegrationTests\Thrift.IntegrationTests.csproj]
C:\Program Files\dotnet\sdk\3.1.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(424,5): error MSB4018:    at Microsoft.NET.HostModel.RetryUtil.RetryOnIOError(Action func) [U:\Source\thrift\lib\netstd\Tests\Thrift.IntegrationTests\Thrift.IntegrationTests.csproj]
C:\Program Files\dotnet\sdk\3.1.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(424,5): error MSB4018:    at Microsoft.NET.HostModel.AppHost.HostWriter.CreateAppHost(String appHostSourceFilePath, String appHostDestinationFilePath, String
C:\Program Files\dotnet\sdk\3.1.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(424,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [U:\Source\thrift\lib\netstd\Tests\Thrift.IntegrationTests\Thrift.IntegrationTests.csproj]
C:\Program Files\dotnet\sdk\3.1.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(424,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [U:\Source\thrift\lib\netstd\Tests\Thrift.IntegrationTests\Thrift.IntegrationTests.csproj]
C:\Program Files\dotnet\sdk\3.1.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(424,5): error MSB4018: The "CreateAppHost" task failed unexpectedly. [U:\Source\thrift\lib\netstd\Benchmarks\Thrift.Benchmarks\Thrift.Benchmarks.csproj]
C:\Program Files\dotnet\sdk\3.1.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(424,5): error MSB4018: System.IO.IOException: The parameter is incorrect. : 'U:\Source\thrift\lib\netstd\Benchmarks\Thrift.Benchmarks\obj\cygwin\Debug\netcoreapp3.1\Thrift.Benchmarks.exe' [U:\Source\thrift\lib\netstd\Benchmarks\Thrift.Benchmarks\Thrift.Benchmarks.csproj]
C:\Program Files\dotnet\sdk\3.1.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(424,5): error MSB4018:    at System.IO.FileSystem.SetLastWriteTime(String fullPath, DateTimeOffset time, Boolean asDirectory) [U:\Source\thrift\lib\netstd\Benchmarks\Thrift.Benchmarks\Thrift.Benchmarks.csproj]
C:\Program Files\dotnet\sdk\3.1.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(424,5): error MSB4018:    at System.IO.File.SetLastWriteTimeUtc(String path, DateTime lastWriteTimeUtc) [U:\Source\thrift\lib\netstd\Benchmarks\Thrift.Benchmarks\Thrift.Benchmarks.csproj]
C:\Program Files\dotnet\sdk\3.1.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(424,5): error MSB4018:    at Microsoft.NET.HostModel.RetryUtil.RetryOnIOError(Action func) [U:\Source\thrift\lib\netstd\Benchmarks\Thrift.Benchmarks\Thrift.Benchmarks.csproj]
C:\Program Files\dotnet\sdk\3.1.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(424,5): error MSB4018:    at Microsoft.NET.HostModel.AppHost.HostWriter.CreateAppHost(String appHostSourceFilePath, String appHostDestinationFilePath, String appBinaryFilePath, Boolean windowsGraphicalUserInterface, String assemblyToCopyResorcesFrom) [U:\Source\thrift\lib\netstd\Benchmarks\Thrift.Benchmarks\Thrift.Benchmarks.csproj]
C:\Program Files\dotnet\sdk\3.1.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(424,5): error MSB4018:    at Microsoft.NET.Build.Tasks.CreateAppHost.ExecuteCore() [U:\Source\thrift\lib\netstd\Benchmarks\Thrift.Benchmarks\Thrift.Benchmarks.csproj]
C:\Program Files\dotnet\sdk\3.1.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(424,5): error MSB4018:    at Microsoft.NET.Build.Tasks.TaskBase.Execute() [U:\Source\thrift\lib\netstd\Benchmarks\Thrift.Benchmarks\Thrift.Benchmarks.csproj]
C:\Program Files\dotnet\sdk\3.1.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(424,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [U:\Source\thrift\lib\netstd\Benchmarks\Thrift.Benchmarks\Thrift.Benchmarks.csproj]
C:\Program Files\dotnet\sdk\3.1.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(424,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [U:\Source\thrift\lib\netstd\Benchmarks\Thrift.Benchmarks\Thrift.Benchmarks.csproj]

I can understand from the error that .NET tries to update a time stamp, and this seems to fail. But I assume that time stamp updates are possible on NFS mapped drives because I can see correct file creation time stamps. Or is there something fundamental broken?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions