msbuild 输出中的 1>、2>、3> 符号是否代表线程?
Do the 1>, 2>, 3> symbols in msbuild output stand for threads?
我最近打开了 msbuild 的正常日志记录详细程度来调试一些构建问题。我使用 -m -graph 参数并正在构建一个包含 3 个项目的解决方案。一个项目是MyProjectlibrary,一个是调用库的MyProjectTests测试项目,第三个项目是调用库的MyProjectConsole app
我希望 msbuild 构建一个依赖关系图(因为 -m -graph)首先构建库,然后是测试项目和控制台应用程序项目。
这是构建的示例输出。我不知道 2>、3>、1> 符号是什么意思。
问。它们是表示并行构建中的线程,还是 3 节点图中的节点编号,还是表示构建顺序排名?
问。 2> 下方行的缩进表示那些是属于 2> 线程的日志消息,交错的 2> 2> 3> 3> 1> 2> 块表示线程 运行 的 msbuild 日志输出块并行并将它们的输出发送到单个日志收集线程?
谢谢
在下面的日志输出中:
HsLog 是控制台程序,建立在 'node 1' 之上。 (CPU核心1?图节点1?)
HsLoggerTests 是单元测试项目,构建于 'node 2' 之上。
HsLogger 是库,建立在 'node
Build started 2022-05-21 07:33:46. Static graph loaded in 0.471 seconds: 3 nodes, 2 edges
2>Project "c:\dev\highspeed\HsLogger\HsLog\HsLog.csproj" on node 1 (Restore;Publish target(s)).
2>_GetAllRestoreProjectPathItems:
Determining projects to restore...
3>Project "c:\dev\highspeed\HsLogger\HsLoggerTests\HsLoggerTests.csproj" on node 2 (Restore;Publish target(s)).
3>_GetAllRestoreProjectPathItems:
Determining projects to restore...
2>Restore:
Committing restore...
Assets file has not changed. Skipping assets file writing. Path: c:\dev\highspeed\HsLogger\HsLogger\obj\project.assets.json
Restored c:\dev\highspeed\HsLogger\HsLogger\HsLogger.csproj (in 59 ms).
Committing restore...
Assets file has not changed. Skipping assets file writing. Path: c:\dev\highspeed\HsLogger\HsLog\obj\project.assets.json
Restored c:\dev\highspeed\HsLogger\HsLog\HsLog.csproj (in 57 ms).
NuGet Config files used:
C:\Users\kkkwj\AppData\Roaming\NuGet\NuGet.Config
C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config
Feeds used:
https://api.nuget.org/v3/index.json
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\
All projects are up-to-date for restore.
2>Project "c:\dev\highspeed\HsLogger\HsLog\HsLog.csproj" (2) is building "c:\dev\highspeed\HsLogger\HsLogger\HsLogger.csproj" (1:11) on node 1 (default targets).
1>GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
CoreGenerateAssemblyInfo:
Skipping target "CoreGenerateAssemblyInfo" because all output files are up-to-date with respect to the input files.
CoreCompile:
Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.
GenerateBuildDependencyFile:
Skipping target "GenerateBuildDependencyFile" because all output files are up-to-date with respect to the input files.
CopyFilesToOutputDirectory:
HsLogger -> c:\dev\highspeed\HsLogger\HsLogger\bin\Debug\net5.0-windows7.0\win-x64\HsLogger.dll
PostBuild:
set bindir=%holding%\lib\core\AnyCPU\Debug\net5.0-windows7.0
3>Restore:
Committing restore...
Assets file has not changed. Skipping assets file writing. Path: c:\dev\highspeed\HsLogger\HsLogger\obj\project.assets.json
Restored c:\dev\highspeed\HsLogger\HsLogger\HsLogger.csproj (in 58 ms).
Committing restore...
Assets file has not changed. Skipping assets file writing. Path: c:\dev\highspeed\HsLogger\HsLoggerTests\obj\project.assets.json
Restored c:\dev\highspeed\HsLogger\HsLoggerTests\HsLoggerTests.csproj (in 57 ms).
NuGet Config files used:
C:\Users\kkkwj\AppData\Roaming\NuGet\NuGet.Config
C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config
Feeds used:
https://api.nuget.org/v3/index.json
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\
All projects are up-to-date for restore.
3>Done Building Project "c:\dev\highspeed\HsLogger\HsLoggerTests\HsLoggerTests.csproj" (Restore;Publish target(s)).
1>PostBuild:
1>Done Building Project "c:\dev\highspeed\HsLogger\HsLogger\HsLogger.csproj" (default targets).
2>GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
CoreGenerateAssemblyInfo:
Skipping target "CoreGenerateAssemblyInfo" because all output files are up-to-date with respect to the input files.
CoreCompile:
Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.
_CreateAppHost:
Skipping target "_CreateAppHost" because all output files are up-to-date with respect to the input files.
_CopyOutOfDateSourceItemsToOutputDirectory:
Skipping target "_CopyOutOfDateSourceItemsToOutputDirectory" because all output files are up-to-date with respect to the input files.
GenerateBuildDependencyFile:
Skipping target "GenerateBuildDependencyFile" because all output files are up-to-date with respect to the input files.
GenerateBuildRuntimeConfigurationFiles:
Skipping target "GenerateBuildRuntimeConfigurationFiles" because all output files are up-to-date with respect to the input files.
CopyFilesToOutputDirectory:
HsLog -> c:\dev\highspeed\HsLogger\HsLog\bin\Debug\net5.0-windows7.0\win-x64\HsLog.dll
PostBuild:
_CopyResolvedFilesToPublishPreserveNewest:
Skipping target "_CopyResolvedFilesToPublishPreserveNewest" because all output files are up-to-date with respect to the input files.
Publish:
HsLog -> c:\dev\highspeed\HsLogger\HsLog\bin\Debug\net5.0-windows7.0\win-x64\publish\
2>Done Building Project "c:\dev\highspeed\HsLogger\HsLog\HsLog.csproj" (Restore;Publish target(s)).
数字是'project key'。它们是按构建生成的,并且在构建中每个项目都是唯一的。
这些数字确实表示并行处理并标识已在集中式记录器中收集的消息块。但是数字不是节点。
'MSBuild node' 是一个用于并行处理的隔离进程。一个节点可能re-used被多个项目
您的构建似乎使用了 2 个节点。 HsLog.csproj(项目键 2)开始在节点 1 上构建。HsLoggerTests.csproj(键 3)开始在节点 2 上构建。HsLog.csproj 依赖于 HsLogger.csproj(键1) 并开始在节点 1.
上构建 HsLogger.csproj
我最近打开了 msbuild 的正常日志记录详细程度来调试一些构建问题。我使用 -m -graph 参数并正在构建一个包含 3 个项目的解决方案。一个项目是MyProjectlibrary,一个是调用库的MyProjectTests测试项目,第三个项目是调用库的MyProjectConsole app
我希望 msbuild 构建一个依赖关系图(因为 -m -graph)首先构建库,然后是测试项目和控制台应用程序项目。
这是构建的示例输出。我不知道 2>、3>、1> 符号是什么意思。
问。它们是表示并行构建中的线程,还是 3 节点图中的节点编号,还是表示构建顺序排名?
问。 2> 下方行的缩进表示那些是属于 2> 线程的日志消息,交错的 2> 2> 3> 3> 1> 2> 块表示线程 运行 的 msbuild 日志输出块并行并将它们的输出发送到单个日志收集线程?
谢谢
在下面的日志输出中: HsLog 是控制台程序,建立在 'node 1' 之上。 (CPU核心1?图节点1?) HsLoggerTests 是单元测试项目,构建于 'node 2' 之上。 HsLogger 是库,建立在 'node
Build started 2022-05-21 07:33:46. Static graph loaded in 0.471 seconds: 3 nodes, 2 edges
2>Project "c:\dev\highspeed\HsLogger\HsLog\HsLog.csproj" on node 1 (Restore;Publish target(s)). 2>_GetAllRestoreProjectPathItems: Determining projects to restore... 3>Project "c:\dev\highspeed\HsLogger\HsLoggerTests\HsLoggerTests.csproj" on node 2 (Restore;Publish target(s)). 3>_GetAllRestoreProjectPathItems: Determining projects to restore... 2>Restore: Committing restore... Assets file has not changed. Skipping assets file writing. Path: c:\dev\highspeed\HsLogger\HsLogger\obj\project.assets.json Restored c:\dev\highspeed\HsLogger\HsLogger\HsLogger.csproj (in 59 ms). Committing restore... Assets file has not changed. Skipping assets file writing. Path: c:\dev\highspeed\HsLogger\HsLog\obj\project.assets.json Restored c:\dev\highspeed\HsLogger\HsLog\HsLog.csproj (in 57 ms). NuGet Config files used: C:\Users\kkkwj\AppData\Roaming\NuGet\NuGet.Config C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config Feeds used: https://api.nuget.org/v3/index.json C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\ All projects are up-to-date for restore. 2>Project "c:\dev\highspeed\HsLogger\HsLog\HsLog.csproj" (2) is building "c:\dev\highspeed\HsLogger\HsLogger\HsLogger.csproj" (1:11) on node 1 (default targets). 1>GenerateTargetFrameworkMonikerAttribute: Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files. CoreGenerateAssemblyInfo: Skipping target "CoreGenerateAssemblyInfo" because all output files are up-to-date with respect to the input files. CoreCompile: Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files. GenerateBuildDependencyFile: Skipping target "GenerateBuildDependencyFile" because all output files are up-to-date with respect to the input files. CopyFilesToOutputDirectory: HsLogger -> c:\dev\highspeed\HsLogger\HsLogger\bin\Debug\net5.0-windows7.0\win-x64\HsLogger.dll PostBuild: set bindir=%holding%\lib\core\AnyCPU\Debug\net5.0-windows7.0 3>Restore: Committing restore... Assets file has not changed. Skipping assets file writing. Path: c:\dev\highspeed\HsLogger\HsLogger\obj\project.assets.json Restored c:\dev\highspeed\HsLogger\HsLogger\HsLogger.csproj (in 58 ms). Committing restore... Assets file has not changed. Skipping assets file writing. Path: c:\dev\highspeed\HsLogger\HsLoggerTests\obj\project.assets.json Restored c:\dev\highspeed\HsLogger\HsLoggerTests\HsLoggerTests.csproj (in 57 ms). NuGet Config files used: C:\Users\kkkwj\AppData\Roaming\NuGet\NuGet.Config C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config Feeds used: https://api.nuget.org/v3/index.json C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\ All projects are up-to-date for restore. 3>Done Building Project "c:\dev\highspeed\HsLogger\HsLoggerTests\HsLoggerTests.csproj" (Restore;Publish target(s)). 1>PostBuild: 1>Done Building Project "c:\dev\highspeed\HsLogger\HsLogger\HsLogger.csproj" (default targets). 2>GenerateTargetFrameworkMonikerAttribute: Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files. CoreGenerateAssemblyInfo: Skipping target "CoreGenerateAssemblyInfo" because all output files are up-to-date with respect to the input files. CoreCompile: Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files. _CreateAppHost: Skipping target "_CreateAppHost" because all output files are up-to-date with respect to the input files. _CopyOutOfDateSourceItemsToOutputDirectory: Skipping target "_CopyOutOfDateSourceItemsToOutputDirectory" because all output files are up-to-date with respect to the input files. GenerateBuildDependencyFile: Skipping target "GenerateBuildDependencyFile" because all output files are up-to-date with respect to the input files. GenerateBuildRuntimeConfigurationFiles: Skipping target "GenerateBuildRuntimeConfigurationFiles" because all output files are up-to-date with respect to the input files. CopyFilesToOutputDirectory: HsLog -> c:\dev\highspeed\HsLogger\HsLog\bin\Debug\net5.0-windows7.0\win-x64\HsLog.dll PostBuild: _CopyResolvedFilesToPublishPreserveNewest: Skipping target "_CopyResolvedFilesToPublishPreserveNewest" because all output files are up-to-date with respect to the input files. Publish: HsLog -> c:\dev\highspeed\HsLogger\HsLog\bin\Debug\net5.0-windows7.0\win-x64\publish\ 2>Done Building Project "c:\dev\highspeed\HsLogger\HsLog\HsLog.csproj" (Restore;Publish target(s)).
数字是'project key'。它们是按构建生成的,并且在构建中每个项目都是唯一的。
这些数字确实表示并行处理并标识已在集中式记录器中收集的消息块。但是数字不是节点。
'MSBuild node' 是一个用于并行处理的隔离进程。一个节点可能re-used被多个项目
您的构建似乎使用了 2 个节点。 HsLog.csproj(项目键 2)开始在节点 1 上构建。HsLoggerTests.csproj(键 3)开始在节点 2 上构建。HsLog.csproj 依赖于 HsLogger.csproj(键1) 并开始在节点 1.
上构建 HsLogger.csproj