Repository: vscode
Issue: VSCode is probing files in a way that causes "fatal error C1056: cannot update the time date stamp field in 'file.obj'" errors
Labels: triage-needed


Type: <b>Bug</b>

This only happens randomly. Something in VSCode is probing files within the source tree. I build using CMake+ninja and the CMake tools and C/C++ tools extensions on Windows. On occasion, the build just fails because VSCode is holding a handle to the generated file which prevents the operation.

Retrying the build typically succeeds (the issue is pretty random).

Building on a command-line window outside of VSCode still reproduces the problem. You don't have to use the extensions to build in order to reproduce the issue.

I suspect that if I were to move the "build" output directory outside of the source root this issue would disappear. This really seems to stem from some file-change monitoring system running within VSCode.

This started happening at some point in a recent update, say within the past 2-3 months. I've used VSCode with CMake like this for 4 years now, and it was never an issue in the past.

VS Code version: Code 1.96.4 (cd4ee3b1c348a13bafd8f9ad8060705f6d4b9cba, 2025-01-16T00:16:19.038Z)
OS version: Windows_NT x64 10.0.26100
Modes:

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|AMD Ryzen 9 7950X 16-Core Processor             (32 x 4491)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: enabled_on<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>skia_graphite: disabled_off<br>video_decode: enabled<br>video_encode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: enabled<br>webnn: disabled_off|
|Load (avg)|undefined|
|Memory (System)|127.14GB (66.93GB free)|
|Process Argv|--crash-reporter-id 51152fc6-57cf-45c0-ba26-7ec617922cec|
|Screen Reader|no|
|VM|0%|
</details><details><summary>Extensions (36)</summary>

Extension|Author (truncated)|Version
---|---|---
vscode-research|dev|1.2025.16001
xml|Dot|2.5.1
vscode-wasm|dts|1.4.1
gitlens|eam|16.2.1
x8664assembly|fre|0.1.0
copilot|Git|1.259.0
copilot-chat|Git|0.23.2
vscode-pull-request-github|Git|0.102.0
todo-tree|Gru|0.0.226
vscode-graphviz|joa|0.0.6
devinsights|Mic|2022.6.23-2
razzle-sources|Mic|0.0.1
tdpcode|Mic|10.2304.707
vscode-azdo-codereview|Mic|1.2023.331002
wavework|Mic|1.2024.124001
azure-pipelines|ms-|1.249.0
vscode-azureresourcegroups|ms-|0.10.3
csharp|ms-|2.61.28
vscode-dotnet-runtime|ms-|2.2.5
sarif-viewer|MS-|3.4.4
remote-ssh|ms-|0.116.1
remote-ssh-edit|ms-|0.87.0
remote-wsl|ms-|0.88.5
azure-account|ms-|0.13.0
cmake-tools|ms-|1.19.52
cpptools|ms-|1.23.4
remote-explorer|ms-|0.4.3
remote-server|ms-|1.5.2
vsliveshare|ms-|1.0.5948
llvm-ir|rev|1.0.5
windbg-debug|rez|0.3.4
rust-analyzer|rus|0.3.2282
llvmir|sun|0.1.31
cmake|twx|0.0.17
errorlens|use|3.22.0
markdown-all-in-one|yzh|3.6.2


</details><details>
<summary>A/B Experiments</summary>

```
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
vscaat:30438848
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
pythonnoceb:30805159
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
dvdeprecation:31068756
dwnewjupytercf:31046870
nativerepl2:31139839
pythonrstrctxt:31112756
nativeloc1:31192215
cf971741:31144450
iacca1:31171482
notype1:31157159
5fd0e150:31155592
dwcopilot:31170013
stablechunks:31184530
6074i472:31201624
dwoutputs:31217127
9064b325:31222308
copilot_t_ci:31222730

```

</details>

<!-- generated by issue reporter -->