Skip to content

Commit 26b8af0

Browse files
committed
sdk: strip consumer-specific globals from non-API-dep project references
Collapses the MSBuild project-instance cache key so parallel consumers share one build of netstandard2.0 libraries (Stride.Core.CompilerServices and friends). Without this, each consumer with a different Platform/TFM/GraphicsApi/TestRID passes distinct globals, MSBuild creates distinct build contexts, and they race on the single obj/Debug/netstandard2.0/ output.
1 parent 493ac61 commit 26b8af0

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

sources/sdk/Stride.Build.Sdk/Sdk/Stride.GraphicsApi.InnerBuild.targets

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,13 @@
119119
<StrideGraphicsApi>$(_StrideGraphicsApiCurrent)</StrideGraphicsApi>
120120
<SetTargetFramework>%(_StrideGraphicsApiDependentItems.SetTargetFramework);StrideGraphicsApi=$(_StrideGraphicsApiCurrent)</SetTargetFramework>
121121
</_MSBuildProjectReferenceExistent>
122+
<!-- Strip consumer-specific globals from non-API-dependent references. Under parallel
123+
MSBuild, different consumers (different TFM, platform, API, test RID…) would otherwise
124+
create distinct project-instance cache keys for the same referenced project (e.g.
125+
Stride.Core.CompilerServices, netstandard2.0) and race on its single obj/ output —
126+
the canonical "file locked by VBCSCompiler" error. -->
122127
<_MSBuildProjectReferenceExistent Condition="'%(_MSBuildProjectReferenceExistent.StrideGraphicsApiDependent)' != 'true'">
123-
<GlobalPropertiesToRemove>%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove);StrideGraphicsApi</GlobalPropertiesToRemove>
128+
<GlobalPropertiesToRemove>%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove);StrideGraphicsApi;StrideGraphicsApis;StrideGraphicsApiDependent;StrideGraphicsApiDependentBuildAll;StridePlatform;StridePlatforms;StrideNativeBuildMode;StrideTestRuntimeIdentifier;StrideSkipAutoPack</GlobalPropertiesToRemove>
124129
</_MSBuildProjectReferenceExistent>
125130
</ItemGroup>
126131
</Target>

0 commit comments

Comments
 (0)