Skip to content

Windows sandbox: dotnet build of a multi-project .NET solution #5421

Open

Description

@Swarley97

Describe the bug

When sandbox mode is enabled, there are several problems when the agent want to perform a dotnet build/restore command

  1. MSBuild worker processes can't connect (blocks multi-project builds).

    • dotnet build 'solution' exits with code 1 reporting "Build failed", 0 errors, 0 warnings.
    • With MSBUILDDEBUGCOMM=1 , each worker creates its named pipe ( MSBuild ) and waits, but the main process never connects.
    • With -m:1 flag it works but is far too slow for large solutions.
    • No sandbox denial is reported and no bypass prompt appears.
  2. NuGet Plugins fail to load (specifically Azure Artifacts Credential Provider)

    • environment variable %LOCALAPPDATA% points to the per-session sandbox folder ( ...\Packages\sandbox.{GUID}\AC ), which isn't writable
    • NuGet's plugins-cache and v3-cache both live under it. NuGet fails to start the credential provider, so private feeds return 401 in my case.
    • Allowlisting C:\Users<user>\AppData\Local\NuGet makes no difference
    • there is a workaround by setting NUGET_PLUGINS_CACHE_PATH and  NUGET_HTTP_CACHE_PATH explicitly.
  3. Current users .gitconfig is not readable, so the SDKs builtin SourceLink step fails the build. The workaround is set the p:EnableSourceControlManagerQueries=false flag.

dotnet and nuget are detected as "Dev Tool" when running /sandbox policy:

grafik

Affected version

GitHub Copilot CLI 1.0.109

Steps to reproduce the behavior

  1. Enable sandbox mode with /sandbox enable
  2. Prompting copilot that it should build the solution.

Expected behavior

Agent is able to run a dotnet build command and nuget plugins are working correctly (

Additional context

Environment: Copilot CLI 1.0.105, Windows 11 with the ProcessContainer sandbox, .NET SDK 10.0.404. Private NuGet feeds on Azure DevOps Artifacts, authenticated by the Azure Artifacts Credential Provider.

Activity

  1. added theissue type on Nov 11, 2026
  2. added
    area:permissionsTool approval, security boundaries, sandbox mode, and directory restrictions
    area:platform-windowsWindows-specific: PowerShell, cmd, Git Bash, WSL, Windows Terminal
    and removed on Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:permissionsTool approval, security boundaries, sandbox mode, and directory restrictionsarea:platform-windowsWindows-specific: PowerShell, cmd, Git Bash, WSL, Windows Terminal

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions