0

I get this kind of error sometimes in gitlab ci-cd worker log.

How can I fix it and set up parallel builds for MSVC projects?

**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.8.4
** Copyright (c) 2020 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
The process cannot access the file because it is being used by another process.
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
buridan
  • 11
  • 2

1 Answers1

0

I am curious how you invoke msbuild.exe, and maybe you have invoke multiple mbsuild.exe processes to correspond to the one-to-one construction projects.

If you simply receive external programs that interfere with msbuild.exe, before you faced this, you should open Task Manager to shut down any process with uses msbuild.exe.

If you just start multiple msbuild.exe processes under gitlab ci-cd and then face the issue(you already checked that there is no other programs using msbuild.exe under Task Manager), you have changed to use another function:

Create a file called test.proj file and then use my method to add any project files(csproj file) or solution files(sln file) which you want to parallel built into test.proj file. So that you only need to input one proj file into ci-cd.

Use C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe xxx\test.proj -t:ParelBuild under gitlab ci-cd.

Sara Liu - MSFT
  • 6,007
  • 1
  • 21
  • 27