From 03540830c64ffe8a1fb8e4d767c3ef38d8de75d9 Mon Sep 17 00:00:00 2001 From: JoYo <> Date: Fri, 19 Feb 2021 14:30:38 -0500 Subject: [PATCH] msbuild issues --- README.mdown | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.mdown b/README.mdown index a3b05ba..ab79a20 100644 --- a/README.mdown +++ b/README.mdown @@ -94,3 +94,17 @@ They can be ran but should be evaluated as there is no error checking. - [win_build_tools_install.ps1](win_build_tools_install.ps1) - [winxp_build_tools_install.ps1](winxp_build_tools_install.ps1) + +# Troubleshooting + +## error C2471: cannot update program database + +MSBuild has trouble writing files to a mounted directory which occurs even if the out path is set in the project. +It is recommended that you include a script in your project that copies the `C:\source` directory into the container prior to running the build commands. + +```powershell +Copy-Item $source_path -Destination $build_path +Set-Location -Path $build_path +MSBuild project.sln +Copy-Item $build_path -Destination $out_path +```