Skip to content

Commit 7146414

Browse files
ANcpLuaclaude
andcommitted
fix: restore DiagnosticClasses polyfill, normalize import paths on Windows
Restore accidentally removed InjectDiagnosticClassesOnLegacy ItemGroup. Normalize MakeRelative backslashes to forward slashes in ClaudeBrain @import paths for cross-platform consistency. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent fadbc8e commit 7146414

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/Build/Common/Common.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@
266266
<Target Name="GenerateClaudeMd" BeforeTargets="Build" Condition="'$(GenerateClaudeMd)' == 'true' AND !Exists('$(MSBuildProjectDirectory)/CLAUDE.md')">
267267
<PropertyGroup>
268268
<_RootClaudeMd>$([MSBuild]::GetPathOfFileAbove('CLAUDE.md', '$(MSBuildProjectDirectory)'))</_RootClaudeMd>
269-
<_RootClaudeMdRelative Condition="'$(_RootClaudeMd)' != ''">$([MSBuild]::MakeRelative('$(MSBuildProjectDirectory)', '$(_RootClaudeMd)'))</_RootClaudeMdRelative>
269+
<_RootClaudeMdRelative Condition="'$(_RootClaudeMd)' != ''">$([MSBuild]::MakeRelative('$(MSBuildProjectDirectory)', '$(_RootClaudeMd)').Replace('\','/'))</_RootClaudeMdRelative>
270270
</PropertyGroup>
271271

272272
<!-- SDK variant detection -->

src/Build/Common/LegacySupport.targets

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,10 @@
177177
DIAGNOSTICS (< net6.0)
178178
StackTraceHiddenAttribute
179179
───────────────────────────────────────────────────────────────────────── -->
180+
<ItemGroup Condition="'$(InjectDiagnosticClassesOnLegacy)' == 'true' AND ('$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'net472')">
181+
<Compile Include="$(_SharedSourcePath)Polyfills/DiagnosticClasses.cs" LinkBase="Shared/Polyfills" InProject="false"/>
182+
</ItemGroup>
183+
180184
<ItemGroup Condition="('$(InjectStackTraceHiddenOnLegacy)' == 'true' OR '$(InjectANcpLuaDiagnosticsPolyfills)' == 'true') AND '$(_NeedsNet6Polyfills)' == 'true'">
181185
<Compile Include="$(_SharedSourcePath)Polyfills/Diagnostics/StackTraceHiddenAttribute.cs" LinkBase="Shared/Polyfills/Diagnostics" InProject="false"/>
182186
</ItemGroup>

0 commit comments

Comments
 (0)