microsoft / vscode-remote-release

Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
https://aka.ms/vscode-remote
Other
3.61k stars 275 forks source link

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

Open AaronLayton opened 11 months ago

AaronLayton commented 11 months ago

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.

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

lgadola commented 9 months ago

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

LMSSonos commented 7 months ago

Having same issue here with NET6

virzak commented 7 months ago

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

tonybaloney commented 1 month ago

Setting the remote user as root fixed it for me