vscode-remote-release icon indicating copy to clipboard operation
vscode-remote-release copied to clipboard

Getting `last access/last write time` on the `CopyComplete`

Open AaronLayton opened this issue 1 year ago • 4 comments

  • VSCode Version: 1.81.1
  • Local OS Version: Windows 11 Pro 22H2
  • Remote OS Version: mcr.microsoft.com/devcontainers/dotnet:0-6.0
  • Remote Extension/Connection Type: Containers

I am getting an error when trying to build my project within a devcontainer, I keep getting The last access/last write time on file "" cannot be set. Access to the path "" is denied.

  • Logs:
/usr/share/dotnet/sdk/6.0.412/Microsoft.Common.CurrentVersion.targets(4831,5): error MSB3374: The last access/last write time on file "/workspaces/remarkablecommerce-platform/RemarkableCommerce.Application/obj/Debug/net6.0/RemarkableCommerce.Application.csproj.CopyComplete" cannot be set. Access to the path '/workspaces/remarkablecommerce-platform/RemarkableCommerce.Application/obj/Debug/net6.0/RemarkableCommerce.Application.csproj.CopyComplete' is denied. [/workspaces/remarkablecommerce-platform/RemarkableCommerce.Application/RemarkableCommerce.Application.csproj]

Steps to Reproduce:

  1. With the following devcontainer.json
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet
{
    "name": "C# (.NET)",
    // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
    "image": "mcr.microsoft.com/devcontainers/dotnet:0-6.0",
    "features": {
        "ghcr.io/devcontainers/features/node:1.3.0": {}
    },
    "customizations": {
        "vscode": {
            "extensions": [
                // Backend extensions
                "ms-dotnettools.csdevkit",
                "ms-azuretools.vscode-docker",
                "fullstackspider.visual-nuget",
                "fernandoescolar.vscode-solution-explorer",
                // Everyone extensions
                "gruntfuggly.todo-tree",
                "usernamehw.errorlens",
                "github.copilot",
                "rangav.vscode-thunder-client",
                "ms-vscode-remote.vscode-remote-extensionpack",
                "foxundermoon.shell-format",
                // Frontend extensions
                "spmeesseman.vscode-taskexplorer",
                "bradlc.vscode-tailwindcss",
                "esbenp.prettier-vscode",
                "dsznajder.es7-react-js-snippets",
                "wix.vscode-import-cost"
            ]
        }
    },
    // Features to add to the dev container. More info: https://containers.dev/features.
    // "features": {},
    // Use 'forwardPorts' to make a list of ports inside the container available locally.
    "forwardPorts": [
        44357,
        44354
    ],
    "portsAttributes": {
        "44357": {
            "protocol": "https"
        },
        "44354": {
            "protocol": "https"
        }
    },
    // Use 'postCreateCommand' to run commands after the container is created.
    "postCreateCommand": "sh .devcontainer/post-create.sh"
    // Uncomment below to turn on post create command debugging. This can be helpful if the post create script is erroring and you need to troubleshoot.
    // "postCreateCommand": "DEBUG=TRUE sh .devcontainer/post-create.sh"
    // Configure tool-specific properties.
    // "customizations": {},
    // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
    // "remoteUser": "root"
}

Does this issue occur when you try this locally?: No Does this issue occur when you try this locally and all extensions are disabled?: No

AaronLayton avatar Oct 12 '23 11:10 AaronLayton

Iam getting the exact same error using NET7. cannot access .csproj.CopyComplete

lgadola avatar Dec 16 '23 14:12 lgadola

Having same issue here with NET6

LMSSonos avatar Jan 24 '24 13:01 LMSSonos

Having the same problem. Here is a subpar workaround:

dotnet build /P:IntermediateOutputPath=/tmp/$USER/project/obj/

Suggested here: https://github.com/dotnet/sdk/issues/13808#issuecomment-764832007

virzak avatar Feb 16 '24 18:02 virzak

Setting the remote user as root fixed it for me

tonybaloney avatar Aug 15 '24 03:08 tonybaloney