-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building from NFS: The last access/last write time on file cannot be set #13808
Comments
Also running into this on an NFS mounted drive: dotnet_install\dotnetcore\3.1.403\sdk\3.1.403\Microsoft.Common.CurrentVersion.targets(4385,5): error MSB3374: The last access/last write time on file "project.csproj.CopyComplete" cannot be set. The parameter is incorrect. : 'project\obj\x64\Debug\netstandard2.0\project.csproj.CopyComplete' [.csproj] this is causing my builds to fail and I cannot migrate my library to .net core. $> dotnet --version running this inside a cygwin shell on an NFS mounted drive. |
Please note that my project is hosted in a clearcase VOB mounted on Windows. In case it helps this is how the drive shows up using 'mount' command from cygwin. I'm running dotnet under cygwin shell as most of our build scripts are cross platform we use cygwin on windows.
|
Running with -v diag shows this:
|
Running into the same problem using a clear case vob. Did you make some progress? |
Our solution was to set the IntermediateOutputPath property in the top level PropertyGroup section of each of our .csproj files. Something like this, and we ensure that TMPDIR and USER environment variables are setup in our build environments. Its a workaround, but not a solution.
|
Thanks for the workaround. I can confirm that it works when you move the IntermediateOutputPath to a local path. The strange thing is that the solution builds from inside vs studio 2019 (with IntermediateOutputPath on clearcase). |
Yup. same. doesn't fail when built in visual studio. only from command line. |
Does this still repro with current SDKs? CC @vitek-karas @elinor-fung |
I can reproduce with dotnet SDK 8.0.100 on a NFS share
However a |
Can someone confirm that SetLastWriteTime in 8.0 fails against NFS? If so please ensure there is an issue open in dotnet/runtime to make it work, or at least fail with a better message. |
mount NFS
source codeConsole.WriteLine("Hello, dotnet " + Environment.Version);
var t = DateTime.Now.Subtract(TimeSpan.FromDays(1));
System.IO.File.SetLastWriteTime(@"T:\thefile.txt", t); output
|
This also happens when trying to build in podman in rootless mode. The |
we ended up creating a Directory.build.props file in the dir above the projects so we dont have to edit all the .csproj files. it contains just this setting and one other. |
Doing the same thing now: <PropertyGroup Condition="'$(container)' == 'podman'">
<IntermediateOutputPath>/tmp/$(USER)/project/obj/</IntermediateOutputPath>
</PropertyGroup> |
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:
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?
The text was updated successfully, but these errors were encountered: