ошибка MSB3073 при сборке debug-проекта Microsoft Visual studio 2019

При сборке проекта Microsoft Visual studio 2019 проект собирается, но при старте выдает ошибку:

Серьезность Код Описание    Проект  Файл    Строка  Состояние подавления
Ошибка  MSB3073 выход из команды "setlocal
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noprofile -executionpolicy Bypass -file E:/VCMI/vcpkg/scripts/buildsystems/msbuild/applocal.ps1 -targetBinary E:/VCMI/build/bin/Debug/VCMI_client.exe -installedDir E:/VCMI/vcpkg/installed/x64-windows/debug/bin -OutVariable out
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
setlocal
cd E:\VCMI\build\bin\Debug
if %errorlevel% neq 0 goto :cmEnd
E:
if %errorlevel% neq 0 goto :cmEnd
"C:\Program Files\CMake\bin\cmake.exe" -E copy AI/fuzzylite.dll fuzzylite.dll
if %errorlevel% neq 0 goto :cmEnd
"C:\Program Files\CMake\bin\cmake.exe" -E copy AI/tbb.dll tbb.dll
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
:VCEnd" с кодом 1.  VCMI_client C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets 155 

Среда ссылается на данную строчку сценария:

<Target Name="PostBuildEvent" Condition="'$(PostBuildEventUseInBuild)'!='false'">
    <Message Text="%(PostBuildEvent.Message)" Condition="'%(PostBuildEvent.Message)' != '' and '%(PostBuildEvent.Command)' != ''" Importance="High" />
    <Exec Command="%(PostBuildEvent.Command)$(_BuildSuffix)" StdOutEncoding="%(PostBuildEvent.StdOutEncoding)" StdErrEncoding="%(PostBuildEvent.StdErrEncoding)" Condition="'%(PostBuildEvent.Command)' != ''"/>
  </Target>

Если эту строчку закомментировать, то проект запускается, но ломается среда сборки MSbuild. Запуск среды от администратора не помогает. Как решить эту проблему, уже вторую неделю бьюсь?


Ответы (0 шт):