MFC 1.3 · Шаг 7. Ошибки и их решение
Что будет сделано на этой странице. Здесь собраны ошибки, которые встречаются при
установке среды, сборке и проверке MFC-версии TMC Suite 1.3, с точным текстом сообщения и
порядком действий. Ищите своё сообщение по коду (MSB…, LNK…, C…) поиском по странице
(Ctrl+F в браузере).
Пометка «воспроизведено» означает, что сообщение получено на реальной сборке копии исходников с GitHub, и текст приведён дословно (русская версия MSBuild 18.11). Пометка «типичный текст» — сообщение специально не воспроизводилось (например, нельзя было удалить MFC с проверочного компьютера); текст дан по-английски, в русской Visual Studio он переведён, но код ошибки тот же.
Общее правило: при любой ошибке читайте первую ошибку в списке, а не последнюю — остальные часто являются её следствием. Для этого удобно собрать с записью журнала (шаг 4, пункт 4.4) и открыть журнал в Блокноте.
7.1 Проекты не загружаются, или Visual Studio предлагает «перенацелить» решение
Признаки:
- в Обозревателе решений у проектов написано «(не загружено)» / «(несовместимо)»;
- при открытии появляется окно «Пересмотреть действия решения» / «Перенацелить проекты» (Review Solution Actions / Retarget Projects) с предложением сменить набор инструментов;
-
при сборке — ошибка MSB8020 (воспроизведено на примере другого набора инструментов):
error MSB8020: Не удается найти средства сборки для Visual Studio 2019 (набор инструментов платформы = "v142"). Чтобы выполнить сборку с использованием средств сборки v142 установите средства сборки Visual Studio 2019.Для TMC Suite в этом сообщении будет
v145.
Причина. Все 12 проектов требуют набор инструментов v145, который есть только в Visual Studio 2026. Вы открыли решение в Visual Studio 2022 или более старой, либо в Visual Studio 2026 не установлены средства сборки C++.
Что делать:
- Установите Visual Studio Community 2026 с нагрузкой «Разработка классических приложений на C++» (шаг 1).
- Откройте
src\tamic.slnxименно в Visual Studio 2026 (в меню «Пуск» — Visual Studio 2026; версия видна в меню Справка → О программе Microsoft Visual Studio (Help → About Microsoft Visual Studio), она должна начинаться с 18). - В окне «Перенацелить проекты» нажмите «Отмена» (Cancel): перенацеливание изменит
файлы
.vcxproj, а сборка на другом наборе инструментов для 1.3 не проверялась.
Если файл tamic.slnx вообще не открывается (Visual Studio не знает такого формата) — это
старая версия Visual Studio: формат решений .slnx появился недавно. Решение то же —
Visual Studio 2026.
7.2 Не установлен компонент MFC
Признаки (типичный текст):
error MSB8041: MFC libraries are required for this project. Install them from the Visual Studio installer (Individual Components tab) for any toolsets and architectures being used.
или
fatal error C1083: Cannot open include file: 'afxwin.h': No such file or directory
(в русской версии — «Не удается открыть файл включение: afxwin.h: No such file or directory»).
Причина. При установке Visual Studio не отмечен компонент «MFC-библиотека C++ для x64/x86 (последняя версия MSVC)» — он не ставится по умолчанию вместе с нагрузкой C++.
Что делать:
- Закройте Visual Studio.
- Запустите Visual Studio Installer → у Visual Studio Community 2026 нажмите «Изменить» (Modify).
- Поставьте галочку «MFC-библиотека C++ для x64/x86 (последняя версия MSVC)» (шаг 1, пункт 1.2) → «Изменить».
- Проверка: команда
& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -requires Microsoft.VisualStudio.Component.VC.ATLMFC -property installationPathдолжна напечатать путь к Visual Studio. - Пересоберите решение.
Компонент один на обе платформы: он ставит MFC и для x64, и для Win32.
7.3 «msbuild» не распознано как имя командлета
Признак (воспроизведено в обычном окне Windows PowerShell; в английской версии Windows):
The term 'msbuild' is not recognized as the name of a cmdlet, function, script file, or operable program.
В русской версии Windows: msbuild : Имя "msbuild" не распознано как имя командлета, функции,
файла сценария или выполняемой программы. В cmd: "msbuild" не является внутренней или
внешней командой, исполняемой программой или пакетным файлом.
Причина. Команда набрана в обычном окне, где пути к инструментам Visual Studio не прописаны.
Что делать: откройте Developer PowerShell for VS из меню «Пуск» или превратите текущее окно в окно разработчика тремя командами из шага 4, пункт 4.1.
7.4 MSB1009 «файл проекта не существует» / MSB1003 «укажите проект»
Признаки (воспроизведено):
MSBUILD : error MSB1009: файл проекта не существует.
Ключ: tamic.slnx
MSBUILD : error MSB1003: укажите проект или файл решения. Текущий рабочий каталог не содержит проект или файл решения.
Причина. Команда запущена не из корня проекта, или путь к решению указан неверно
(например, tamic.slnx вместо src\tamic.slnx), или в команде не указан файл решения.
Что делать:
- Выполните
cd C:\src\TMC_Suite(свой корень проекта). - Проверьте:
Test-Path .\src\tamic.slnxдолжно ответитьTrue. ЕслиFalse— исходники распакованы с лишней вложенностью (C:\src\TMC_Suite\TMC_Suite-main\…), см. шаг 2, пункт 2.2. - Повторите команду, указывая именно
src\tamic.slnx.
7.5 MSB4126 «указанная конфигурация решения "Release|x86" недопустима»
Признак (воспроизведено):
src\tamic.slnx.metaproj : error MSB4126: указанная конфигурация решения "Release|x86" недопустима. Укажите допустимую конфигурацию решения с помощью свойств Configuration и Platform …
Причина. В решении есть только платформы x64 и Win32 и конфигурации Release и
Debug. Имени x86 (а также AnyCPU, ARM64) нет; опечатка в Release/Debug даёт ту же
ошибку.
Что делать: для 32 бит пишите /p:Platform=Win32, для 64 бит — /p:Platform=x64;
конфигурация — /p:Configuration=Release или /p:Configuration=Debug.
7.6 LNK1181: не удается открыть входной файл "sfile95.lib"
Признак (воспроизведено):
LINK : fatal error LNK1181: не удается открыть входной файл "sfile95.lib" [C:\src\TMC_Suite\src\viewers\Tmcgrout\TMCGROUT.vcxproj]
Вместо sfile95.lib может быть complex.lib, exprint.lib, prepr.lib, TMCIndan.lib,
TMCLibError.lib.
Причина. Программа собирается раньше библиотек, от которых зависит. Так бывает, если
собирать отдельный .vcxproj напрямую (msbuild src\viewers\Tmcgrout\TMCGROUT.vcxproj …) или
открыть в Visual Studio отдельный проект вместо решения: порядок сборки задан в решении
src\tamic.slnx, а не в проектах. Ещё одна причина — библиотеки собраны для другой
платформы или конфигурации (например, библиотеки Win32 есть, а программа собирается для x64):
у каждого сочетания своя папка dist\<платформа>[\debug]\lib.
Что делать: собирайте через решение — в Visual Studio откройте src\tamic.slnx
(шаг 3), в командной строке указывайте src\tamic.slnx; для одного проекта
используйте msbuild src\tamic.slnx /t:TMCGROUT … (шаг 4, пункт 4.7) —
тогда нужные библиотеки соберутся автоматически.
7.7 MSB8036: пакет SDK Windows не найден
Признак (воспроизведено принудительным указанием отсутствующей версии SDK):
error MSB8036: пакет SDK Windows версии 10.0.19041.0 не найден. Установите необходимую версию пакета SDK Windows либо измените версию пакета SDK, перейдя на страницы свойств проекта либо щелкнув решение правой кнопкой мыши и выбрав команду "Перенацелить решение".
Причина. Не установлен ни один Windows 10/11 SDK (проекты TMC Suite номер SDK не задают и
берут новейший установленный), либо номер SDK кто-то задал вручную в свойствах проекта или
ключом /p:WindowsTargetPlatformVersion=….
Что делать:
- Visual Studio Installer → «Изменить» → в панели «Сведения об установке» отметьте Windows 11 SDK (10.0.26100.…) (или любой другой Windows 10/11 SDK из списка) → «Изменить».
- Не задавайте
WindowsTargetPlatformVersionв командной строке. Если меняли свойства проекта — верните исходные файлы.vcxproj(git:git checkout -- src; ZIP: распакуйте заново).
7.8 LNK1104: не удается открыть файл "…\tmc_rth.exe"
Признак (типичный текст):
LINK : fatal error LNK1104: cannot open file 'C:\src\TMC_Suite\dist\win64\bin\tmc_rth.exe'
(вместо tmc_rth.exe — любая из шести программ).
Причина. Программа в этот момент запущена (или её держит антивирус), и компоновщик не может перезаписать файл.
Что делать: закройте все окна TMC Suite (проверьте Диспетчер задач → вкладка
«Процессы»: tmc_rth.exe, tmc_rtx.exe, TMCGROUT.exe, TMCROS.exe, TMC_DN.exe,
FieldView.exe), подождите несколько секунд и соберите снова. Если файл держит антивирус —
добавьте папку C:\src\TMC_Suite в его исключения или повторите сборку.
7.9 Сценарий Launch-VsDevShell.ps1 не запускается: «выполнение сценариев отключено»
Признак (воспроизведено; английский текст):
File C:\Program Files\Microsoft Visual Studio\18\Community\Common7\Tools\Launch-VsDevShell.ps1 cannot be loaded because running scripts is disabled on this system.
В русской Windows: Невозможно загрузить файл …\Launch-VsDevShell.ps1, так как выполнение
сценариев отключено в этой системе.
Причина. Политика выполнения PowerShell по умолчанию запрещает запуск файлов .ps1.
Что делать: выполните в этом же окне
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass -Force и повторите. Разрешение
действует только до закрытия окна. Или пользуйтесь ярлыком Developer PowerShell for VS —
ему это не нужно.
7.10 «"vswhere.exe" не является внутренней или внешней командой…» при входе в Developer PowerShell
Признак (воспроизведено):
"vswhere.exe" не является внутренней или внешней
командой, исполняемой программой или пакетным файлом.
сразу после Launch-VsDevShell.ps1 (или Enter-VsDevShell).
Причина. Один из служебных сценариев Visual Studio ищет vswhere.exe по PATH.
Что делать: ничего. Сообщение не мешает: после него msbuild находится и сборка проходит
(проверено). Если хотите убедиться — msbuild -version должен напечатать 18.….
7.11 «verbosity=minimal» не распознано как имя командлета
Признак (воспроизведено; английский текст):
verbosity=minimal : The term 'verbosity=minimal' is not recognized as the name of a cmdlet, function, script file, or operable program.
Причина. В PowerShell ключ /flp:logfile=…;verbosity=minimal написан без кавычек: точка с
запятой разделила его на две команды. MSBuild при этом выполнился, но параметры журнала не
применились.
Что делать: берите ключ в двойные кавычки целиком:
/fl "/flp:logfile=build.log;verbosity=minimal" (шаг 4, пункт 4.4).
7.12 Сборка «зависла» и не заканчивается
Признаки. Вывод перестал меняться, процессы cl.exe или MSBuild.exe висят в Диспетчере
задач, но процессор не загружен.
Частая причина. Вывод MSBuild передаётся по конвейеру команде, которая читает только начало
(| Select-Object -First N, | head, | more). Когда она перестаёт читать, компилятор
блокируется на записи.
Что делать: прервите сборку (Ctrl+C; если не помогло — завершите MSBuild.exe и
cl.exe в Диспетчере задач), запускайте msbuild без конвейера, а для чтения используйте
журнал в файле (/fl "/flp:logfile=…;verbosity=minimal"). Затем выполните /t:Rebuild, чтобы
не осталось недописанных файлов.
7.13 Сообщения, которые выглядят как ошибки, но ими не являются
| Сообщение | Что это |
|---|---|
_WIN32_WINNT not defined. Defaulting to _WIN32_WINNT_MAXVER (see WinSDKVer.h) |
справочное сообщение заголовков MFC; не предупреждение и не ошибка (в сборке 1.3: 0 предупреждений) |
Создание кода... (Generating Code...) |
оптимизация программы на этапе компоновки |
You are in 'detached HEAD' state (git) |
нормально при git clone --branch v1.3 |
| Красные подчёркивания в редакторе, ошибки с пометкой IntelliSense в «Списке ошибок» | подсказки редактора, а не компилятора. Если сборка прошла (0 failed), их можно не учитывать. Чтобы видеть только ошибки сборки, в «Списке ошибок» в выпадающем списке выберите «Только сборка» (Build Only) |
7.14 Собрал Debug, а в dist\win64\bin ничего нового нет
Причина. Это не ошибка: Debug-сборка кладёт файлы в отдельную папку
dist\<платформа>\debug\bin (и …\debug\lib), чтобы не затирать выпуск — так задано в
build\Common.props.
Что делать: смотрите C:\src\TMC_Suite\dist\win64\debug\bin (или dist\win32\debug\bin).
Таблица папок — в шаге 3, пункт 3.4.
7.15 Испортились русские буквы в программах после правки исходников
Признаки. После того как исходный файл открыли и сохранили в редакторе, в окнах программы
вместо русских надписей — «кракозябры», или компилятор ресурсов (rc.exe) сообщает об ошибке в
файле .rc.
Причина. Исходники и ресурсы хранятся в кодировке Windows-1251; файл пересохранили в UTF-8 или другой кодировке.
Что делать: верните исходный файл (git: git checkout -- <путь к файлу>; ZIP: возьмите файл
из архива заново). При правке исходников в Visual Studio не меняйте кодировку
(Файл → Сохранить как… → стрелка у кнопки «Сохранить» → «Сохранить с кодировкой…»
(File → Save As… → Save with Encoding…) не используйте).
7.16 Ошибки при сборке установщика Inno Setup
| Сообщение (воспроизведено) | Причина | Решение |
|---|---|---|
Error on line 97 … No files found matching "…\docs\user-manual\sphinx\_build\html\*" |
в репозитории нет HTML-руководства | положить index.html в эту папку (шаг 6, пункт 6.4) |
Error on line 99 … No files found matching "…\samples\SAMPLE_R\*" |
в репозитории нет образцов заданий | положить хотя бы один .tpl в samples\SAMPLE_R (там же) |
Error on line 95 … No files found matching "…\dist\win32\bin\*" (или line 93 … dist\win64\bin\*) |
не собрана Release-версия одной из разрядностей | собрать Release x64 и Release Win32 (шаг 6, пункт 6.3) |
Если ISCC.exe «не найден» — проверьте оба возможных пути установки Inno Setup
(шаг 1, пункт 1.5).
7.17 Пробный расчёт: код возврата 1 или нет файлов результатов
Признаки. В шаге 5 ядро вернуло 1
(RESULT 1: ERROR in .tpl file - calculation is not done) или файлы test1.* не появились.
Причины и решения:
- Файл задания сохранён как
test1.tpl.txt. Включите в Проводнике показ расширений (Вид → Показать → Расширения имён файлов) и переименуйте вtest1.tpl. - Текст скопирован не целиком: первая строка должна быть
#TMC_RT_H, последняя —#EOF. - Команда запущена не из папки с заданием: перед запуском выполните
cd C:\tmc_test. - Папка задания недоступна для записи (например, задание лежит в
C:\Program Files\…): перенесите задание вC:\tmc_test.
Если ядро запущено без /Arb (обычный запуск), причину ошибки задания показывает строка
состояния внизу окна ядра.
Если ничего не помогло
Соберите с журналом (/fl "/flp:logfile=build.log;verbosity=detailed"), найдите в нём первую
строку с error и создайте сообщение об ошибке в разделе
Issues репозитория, приложив эту строку,
версию Visual Studio (vswhere … -property catalog_productDisplayVersion) и команду, которой
собирали.
MFC 1.3 · Step 7. Errors and their solutions
What this page covers. This page collects the errors that occur when
installing the environment, building and checking the MFC version of TMC Suite 1.3, with the exact text of the message and
the steps to take. Look for your message by its code (MSB…, LNK…, C…) with the page search
(Ctrl+F in the browser).
The mark “reproduced” means that the message was obtained on a real build of a copy of the sources from GitHub (Russian version of MSBuild 18.11); here it is given in the wording of the English version of MSBuild. The mark “typical text” means that the message was not specifically reproduced (for example, MFC could not be removed from the test computer); the text is given in English; in the Russian Visual Studio it is translated, but the error code is the same.
General rule: for any error, read the first error in the list, not the last — the others are often its consequence. For this it is convenient to build with a log (step 4, section 4.4) and open the log in Notepad.
7.1 Projects do not load, or Visual Studio offers to “retarget” the solution
Symptoms:
- in Solution Explorer the projects are marked “(unloaded)” / “(incompatible)”;
- on opening, the window Review Solution Actions / Retarget Projects appears with an offer to change the toolset;
-
during the build — error MSB8020 (reproduced with another toolset as an example):
error MSB8020: The build tools for Visual Studio 2019 (Platform Toolset = 'v142') cannot be found. To build using the v142 build tools, please install Visual Studio 2019 build tools.For TMC Suite this message will contain
v145.
Cause. All 12 projects require the v145 toolset, which exists only in Visual Studio 2026. You opened the solution in Visual Studio 2022 or older, or the C++ build tools are not installed in Visual Studio 2026.
What to do:
- Install Visual Studio Community 2026 with the “Desktop development with C++” workload (step 1).
- Open
src\tamic.slnxexactly in Visual Studio 2026 (in the Start menu — Visual Studio 2026; the version is shown in the menu Help → About Microsoft Visual Studio; it must start with 18). - In the Retarget Projects window, click Cancel: retargeting changes
the
.vcxprojfiles, and building with another toolset has not been tested for 1.3.
If the tamic.slnx file does not open at all (Visual Studio does not know this format), this is an
old version of Visual Studio: the .slnx solution format appeared recently. The solution is the same —
Visual Studio 2026.
7.2 The MFC component is not installed
Symptoms (typical text):
error MSB8041: MFC libraries are required for this project. Install them from the Visual Studio installer (Individual Components tab) for any toolsets and architectures being used.
or
fatal error C1083: Cannot open include file: 'afxwin.h': No such file or directory
(in the Russian version: “Не удается открыть файл включение: afxwin.h: No such file or directory”).
Cause. During the Visual Studio installation the component C++ MFC for x64/x86 (Latest MSVC) was not checked — it is not installed by default together with the C++ workload.
What to do:
- Close Visual Studio.
- Start Visual Studio Installer → for Visual Studio Community 2026, click Modify.
- Check C++ MFC for x64/x86 (Latest MSVC) (step 1, section 1.2) → Modify.
- Check: the command
& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -requires Microsoft.VisualStudio.Component.VC.ATLMFC -property installationPathmust print the path to Visual Studio. - Rebuild the solution.
There is one component for both platforms: it installs MFC for both x64 and Win32.
7.3 “msbuild” is not recognized as the name of a cmdlet
Symptom (reproduced in a regular Windows PowerShell window; in the English version of Windows):
The term 'msbuild' is not recognized as the name of a cmdlet, function, script file, or operable program.
In the Russian version of Windows: msbuild : Имя "msbuild" не распознано как имя командлета, функции,
файла сценария или выполняемой программы. In cmd: 'msbuild' is not recognized as an internal or
external command, operable program or batch file.
Cause. The command was typed in a regular window, where the paths to the Visual Studio tools are not set.
What to do: open Developer PowerShell for VS from the Start menu or turn the current window into a developer window with the three commands from step 4, section 4.1.
7.4 MSB1009 “Project file does not exist” / MSB1003 “Specify a project”
Symptoms (reproduced):
MSBUILD : error MSB1009: Project file does not exist.
Switch: tamic.slnx
MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.
Cause. The command was not run from the project root, or the path to the solution is wrong
(for example, tamic.slnx instead of src\tamic.slnx), or the solution file is not specified in the command.
What to do:
- Run
cd C:\src\TMC_Suite(your project root). - Check:
Test-Path .\src\tamic.slnxmust answerTrue. If it isFalse, the sources were unpacked with an extra nesting level (C:\src\TMC_Suite\TMC_Suite-main\…), see step 2, section 2.2. - Repeat the command, specifying exactly
src\tamic.slnx.
7.5 MSB4126 “The specified solution configuration "Release|x86" is invalid”
Symptom (reproduced):
src\tamic.slnx.metaproj : error MSB4126: The specified solution configuration "Release|x86" is invalid. Please specify a valid solution configuration using the Configuration and Platform properties …
Cause. The solution has only the platforms x64 and Win32 and the configurations Release and
Debug. There is no x86 name (nor AnyCPU, ARM64); a typo in Release/Debug gives the same
error.
What to do: for 32-bit, write /p:Platform=Win32; for 64-bit, /p:Platform=x64;
the configuration is /p:Configuration=Release or /p:Configuration=Debug.
7.6 LNK1181: cannot open input file "sfile95.lib"
Symptom (reproduced):
LINK : fatal error LNK1181: cannot open input file 'sfile95.lib' [C:\src\TMC_Suite\src\viewers\Tmcgrout\TMCGROUT.vcxproj]
Instead of sfile95.lib it may be complex.lib, exprint.lib, prepr.lib, TMCIndan.lib,
TMCLibError.lib.
Cause. The program is built before the libraries it depends on. This happens if you
build a separate .vcxproj directly (msbuild src\viewers\Tmcgrout\TMCGROUT.vcxproj …) or
open a separate project in Visual Studio instead of the solution: the build order is set in the solution
src\tamic.slnx, not in the projects. Another cause is that the libraries were built for another
platform or configuration (for example, the Win32 libraries exist, but the program is built for x64):
each combination has its own folder dist\<platform>[\debug]\lib.
What to do: build through the solution — in Visual Studio open src\tamic.slnx
(step 3), on the command line specify src\tamic.slnx; for one project
use msbuild src\tamic.slnx /t:TMCGROUT … (step 4, section 4.7) —
then the required libraries are built automatically.
7.7 MSB8036: The Windows SDK was not found
Symptom (reproduced by forcing a missing SDK version):
error MSB8036: The Windows SDK version 10.0.19041.0 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution".
Cause. No Windows 10/11 SDK is installed (the TMC Suite projects do not set the SDK number and
use the newest installed one), or someone set the SDK number manually in the project properties or
with the /p:WindowsTargetPlatformVersion=… switch.
What to do:
- Visual Studio Installer → Modify → in the Installation details panel, check Windows 11 SDK (10.0.26100.…) (or any other Windows 10/11 SDK from the list) → Modify.
- Do not set
WindowsTargetPlatformVersionon the command line. If you changed the project properties, restore the original.vcxprojfiles (git:git checkout -- src; ZIP: unpack again).
7.8 LNK1104: cannot open file "…\tmc_rth.exe"
Symptom (typical text):
LINK : fatal error LNK1104: cannot open file 'C:\src\TMC_Suite\dist\win64\bin\tmc_rth.exe'
(instead of tmc_rth.exe — any of the six programs).
Cause. The program is running at that moment (or the antivirus is holding it), and the linker cannot overwrite the file.
What to do: close all TMC Suite windows (check Task Manager → the
Processes tab: tmc_rth.exe, tmc_rtx.exe, TMCGROUT.exe, TMCROS.exe, TMC_DN.exe,
FieldView.exe), wait a few seconds and build again. If the antivirus is holding the file,
add the folder C:\src\TMC_Suite to its exclusions or repeat the build.
7.9 The Launch-VsDevShell.ps1 script does not run: “running scripts is disabled”
Symptom (reproduced; English text):
File C:\Program Files\Microsoft Visual Studio\18\Community\Common7\Tools\Launch-VsDevShell.ps1 cannot be loaded because running scripts is disabled on this system.
In Russian Windows: Невозможно загрузить файл …\Launch-VsDevShell.ps1, так как выполнение
сценариев отключено в этой системе.
Cause. The default PowerShell execution policy forbids running .ps1 files.
What to do: run in the same window
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass -Force and repeat. The permission
is valid only until the window is closed. Or use the Developer PowerShell for VS shortcut —
it does not need this.
7.10 “'vswhere.exe' is not recognized as an internal or external command…” when entering Developer PowerShell
Symptom (reproduced):
'vswhere.exe' is not recognized as an internal or external command,
operable program or batch file.
right after Launch-VsDevShell.ps1 (or Enter-VsDevShell).
Cause. One of the Visual Studio service scripts looks for vswhere.exe on the PATH.
What to do: nothing. The message does no harm: after it msbuild is found and the build succeeds
(verified). If you want to make sure, msbuild -version must print 18.….
7.11 “verbosity=minimal” is not recognized as the name of a cmdlet
Symptom (reproduced; English text):
verbosity=minimal : The term 'verbosity=minimal' is not recognized as the name of a cmdlet, function, script file, or operable program.
Cause. In PowerShell the switch /flp:logfile=…;verbosity=minimal was written without quotes: the
semicolon split it into two commands. MSBuild did run, but the log parameters were not
applied.
What to do: put the whole switch in double quotes:
/fl "/flp:logfile=build.log;verbosity=minimal" (step 4, section 4.4).
7.12 The build “hangs” and does not finish
Symptoms. The output has stopped changing, the cl.exe or MSBuild.exe processes hang in Task
Manager, but the processor is not loaded.
Frequent cause. The MSBuild output is piped to a command that reads only the beginning
(| Select-Object -First N, | head, | more). When it stops reading, the compiler
blocks on writing.
What to do: interrupt the build (Ctrl+C; if that does not help, end MSBuild.exe and
cl.exe in Task Manager), run msbuild without a pipeline, and to read the output use
the log file (/fl "/flp:logfile=…;verbosity=minimal"). Then run /t:Rebuild so that
no partially written files remain.
7.13 Messages that look like errors but are not
| Message | What it is |
|---|---|
_WIN32_WINNT not defined. Defaulting to _WIN32_WINNT_MAXVER (see WinSDKVer.h) |
an informational message of the MFC headers; neither a warning nor an error (in the 1.3 build: 0 warnings) |
Generating Code... |
optimization of the program at the link stage |
You are in 'detached HEAD' state (git) |
normal with git clone --branch v1.3 |
| Red underlines in the editor, errors marked IntelliSense in the Error List | hints of the editor, not of the compiler. If the build succeeded (0 failed), they can be ignored. To see only build errors, choose Build Only in the drop-down list of the Error List |
7.14 I built Debug, but there is nothing new in dist\win64\bin
Cause. This is not an error: the Debug build puts the files into a separate folder
dist\<platform>\debug\bin (and …\debug\lib), so as not to overwrite the release — this is set in
build\Common.props.
What to do: look in C:\src\TMC_Suite\dist\win64\debug\bin (or dist\win32\debug\bin).
The table of folders is in step 3, section 3.4.
7.15 Russian letters in the programs are corrupted after editing the sources
Symptoms. After a source file was opened and saved in an editor, the program windows show
garbled characters instead of Russian labels, or the resource compiler (rc.exe) reports an error in
the .rc file.
Cause. The sources and resources are stored in the Windows-1251 encoding; the file was re-saved in UTF-8 or another encoding.
What to do: restore the original file (git: git checkout -- <path to the file>; ZIP: take the file
from the archive again). When editing the sources in Visual Studio, do not change the encoding
(do not use File → Save As… → the arrow on the Save button → Save with Encoding…).
7.16 Errors when building the Inno Setup installer
| Message (reproduced) | Cause | Solution |
|---|---|---|
Error on line 97 … No files found matching "…\docs\user-manual\sphinx\_build\html\*" |
the repository has no HTML manual | put index.html into this folder (step 6, section 6.4) |
Error on line 99 … No files found matching "…\samples\SAMPLE_R\*" |
the repository has no sample task files | put at least one .tpl into samples\SAMPLE_R (same section) |
Error on line 95 … No files found matching "…\dist\win32\bin\*" (or line 93 … dist\win64\bin\*) |
the Release version of one of the bitnesses is not built | build Release x64 and Release Win32 (step 6, section 6.3) |
If ISCC.exe is “not found”, check both possible Inno Setup installation paths
(step 1, section 1.5).
7.17 Test run: exit code 1 or no result files
Symptoms. In step 5 the kernel returned 1
(RESULT 1: ERROR in .tpl file - calculation is not done) or the test1.* files did not appear.
Causes and solutions:
- The task file was saved as
test1.tpl.txt. In File Explorer, turn on showing extensions (View → Show → File name extensions) and rename it totest1.tpl. - The text was not copied in full: the first line must be
#TMC_RT_H, the last one —#EOF. - The command was not run from the folder with the task file: before running, execute
cd C:\tmc_test. - The task file folder is not writable (for example, the task file is in
C:\Program Files\…): move the task file toC:\tmc_test.
If the kernel is started without /Arb (a normal start), the cause of the task file error is shown in the status
bar at the bottom of the kernel window.
If nothing helped
Build with a log (/fl "/flp:logfile=build.log;verbosity=detailed"), find the first
line with error in it and create a bug report in the
Issues section of the repository, attaching this line,
the Visual Studio version (vswhere … -property catalog_productDisplayVersion) and the command you
used for the build.