dotnet / dotnet/msbuild

C++ debug build fails in mounted volume in Docker container

Open
#3,360 8 comments 4 reactions 0 assignees View on GitHub
triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 13h
Merged PRs (30d)
133

Description

### Steps to reproduce
- Create a Windows Server Core Docker image with VS Build Tools 15.7 (lower should have the same issue).
- Start a container with a folder from the host mounted as a volume inside the container.
- Put a VS solution with C++ projects inside the volume, it should have PDB format (not C7 compatible).
- Build the solution.

### Expected behavior

Build succeeds

### Actual behavior
Build fails with "cannot open program database".
You can now see that mspdbsrv still has a lock on PDB file(s).
When the solution is copied to inside the container (so it's not in a mounted volume anymore) and then built the same way it works correctly.

### Environment data
`msbuild /15.7` output:
```
c:\externalvolume\component-vshaper\vshaperlib\stdafx.cpp(9): error C2471: cann
ot update program database 'C:\externalvolume\component-vshaper\VShaperLib\Debu
g\VShaperLib.idb' [C:\externalvolume\component-vshaper\VShaperLib\VShaperLib.vc
xproj]
```

Handle output
```
../handle64.exe C:\externalvolume\component-vshaper\VShaperLib\Debug\VShaperLib.idb
Nthandle v4.11 - Handle viewer
Copyright (C) 1997-2017 Mark Russinovich
Sysinternals - www.sysinternals.com

mspdbsrv.exe pid: 1284 type: File 12C: C:\externalvolume\component-vshaper\VShaperLib\Debug\VShaperLib.idb
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.