|
122 | 122 |
|
123 | 123 | <Import Project="$(MSBuildThisFileDirectory)/Tests.targets" Condition="'$(IsTestProject)' == 'true'"/> |
124 | 124 | <Import Project="$(MSBuildThisFileDirectory)/Npm.targets"/> |
125 | | - <Import Project="$(MSBuildThisFileDirectory)/LegacySupport.targets"/> |
126 | 125 | <Import Project="$(MSBuildThisFileDirectory)/../Enforcement/VersionEnforcement.targets"/> |
127 | 126 |
|
128 | 127 | <!-- ═══════════════════════════════════════════════════════════════════════ |
|
259 | 258 | Generates a rich, context-aware CLAUDE.md per project with: |
260 | 259 | - Project type detection (Library, Test, Web, Source Generator) |
261 | 260 | - Target framework and language version |
262 | | - - Active polyfills and extensions |
263 | 261 | - Test configuration (xUnit, MTP, AwesomeAssertions) |
264 | 262 | - Analyzer and build settings |
265 | 263 | ═══════════════════════════════════════════════════════════════════════ --> |
|
286 | 284 | <_ClaudeMdProjectType Condition="'$(UseRoslynUtilities)' == 'true' AND '$(TargetFrameworkIdentifier)' == '.NETStandard'">Source Generator</_ClaudeMdProjectType> |
287 | 285 | </PropertyGroup> |
288 | 286 |
|
289 | | - <!-- Build active polyfills list --> |
290 | | - <PropertyGroup> |
291 | | - <_ClaudeMdPolyfills></_ClaudeMdPolyfills> |
292 | | - <_ClaudeMdPolyfills Condition="'$(InjectIndexRangeOnLegacy)' == 'true'">$(_ClaudeMdPolyfills)- Index/Range structs </_ClaudeMdPolyfills> |
293 | | - <_ClaudeMdPolyfills Condition="'$(InjectIsExternalInitOnLegacy)' == 'true'">$(_ClaudeMdPolyfills)- IsExternalInit (records) </_ClaudeMdPolyfills> |
294 | | - <_ClaudeMdPolyfills Condition="'$(InjectRequiredMemberOnLegacy)' == 'true'">$(_ClaudeMdPolyfills)- required keyword </_ClaudeMdPolyfills> |
295 | | - <_ClaudeMdPolyfills Condition="'$(InjectCallerAttributesOnLegacy)' == 'true'">$(_ClaudeMdPolyfills)- CallerArgumentExpression </_ClaudeMdPolyfills> |
296 | | - <_ClaudeMdPolyfills Condition="'$(InjectUnreachableExceptionOnLegacy)' == 'true'">$(_ClaudeMdPolyfills)- UnreachableException </_ClaudeMdPolyfills> |
297 | | - <_ClaudeMdPolyfills Condition="'$(InjectExperimentalAttributeOnLegacy)' == 'true'">$(_ClaudeMdPolyfills)- ExperimentalAttribute </_ClaudeMdPolyfills> |
298 | | - <_ClaudeMdPolyfills Condition="'$(InjectNullabilityAttributesOnLegacy)' == 'true'">$(_ClaudeMdPolyfills)- Nullability attributes </_ClaudeMdPolyfills> |
299 | | - <_ClaudeMdPolyfills Condition="'$(InjectTrimAttributesOnLegacy)' == 'true'">$(_ClaudeMdPolyfills)- Trim/AOT attributes </_ClaudeMdPolyfills> |
300 | | - <_ClaudeMdPolyfills Condition="'$(InjectStringExtensionsPolyfill)' == 'true'">$(_ClaudeMdPolyfills)- String extensions (Contains/Replace with StringComparison) </_ClaudeMdPolyfills> |
301 | | - <_ClaudeMdPolyfills Condition="'$(InjectTimeProviderPolyfill)' == 'true'">$(_ClaudeMdPolyfills)- TimeProvider </_ClaudeMdPolyfills> |
302 | | - <_ClaudeMdPolyfills Condition="'$(InjectLockPolyfill)' == 'true'">$(_ClaudeMdPolyfills)- Lock class </_ClaudeMdPolyfills> |
303 | | - <_ClaudeMdPolyfills Condition="'$(InjectParamCollectionOnLegacy)' == 'true'">$(_ClaudeMdPolyfills)- params collections </_ClaudeMdPolyfills> |
304 | | - <_ClaudeMdPolyfills Condition="'$(InjectStackTraceHiddenOnLegacy)' == 'true'">$(_ClaudeMdPolyfills)- StackTraceHidden </_ClaudeMdPolyfills> |
305 | | - </PropertyGroup> |
306 | | - |
307 | | - <!-- Build active extensions list --> |
308 | | - <PropertyGroup> |
309 | | - <_ClaudeMdExtensions></_ClaudeMdExtensions> |
310 | | - <_ClaudeMdExtensions Condition="'$(InjectSharedThrow)' == 'true'">$(_ClaudeMdExtensions)- Throw guard clauses </_ClaudeMdExtensions> |
311 | | - <_ClaudeMdExtensions Condition="'$(InjectCommonComparers)' == 'true' OR '$(InjectStringOrdinalComparer)' == 'true'">$(_ClaudeMdExtensions)- StringOrdinalComparer </_ClaudeMdExtensions> |
312 | | - <_ClaudeMdExtensions Condition="'$(InjectSourceGenHelpers)' == 'true'">$(_ClaudeMdExtensions)- Source generator helpers (EquatableArray, DiagnosticInfo) </_ClaudeMdExtensions> |
313 | | - <_ClaudeMdExtensions Condition="'$(InjectCodeFixProviderBase)' == 'true'">$(_ClaudeMdExtensions)- CodeFixProviderBase </_ClaudeMdExtensions> |
314 | | - <_ClaudeMdExtensions Condition="'$(InjectDiagnosticAnalyzerBase)' == 'true'">$(_ClaudeMdExtensions)- DiagnosticAnalyzerBase </_ClaudeMdExtensions> |
315 | | - <_ClaudeMdExtensions Condition="'$(InjectSyntaxModifierExtensions)' == 'true'">$(_ClaudeMdExtensions)- SyntaxModifierExtensions </_ClaudeMdExtensions> |
316 | | - </PropertyGroup> |
317 | | - |
318 | 287 | <!-- Build test config section --> |
319 | 288 | <PropertyGroup> |
320 | 289 | <_ClaudeMdTestConfig></_ClaudeMdTestConfig> |
|
343 | 312 | <!-- Assemble the full content --> |
344 | 313 | <PropertyGroup> |
345 | 314 | <_ClaudeMdContent>@import $(_RootClaudeMdRelative) # $(MSBuildProjectName) **Type:** $(_ClaudeMdProjectType) **Framework:** $(TargetFramework) **Language:** C# $(LangVersion) **SDK:** $(_ClaudeMdSdkVariant)</_ClaudeMdContent> |
346 | | - <_ClaudeMdContent Condition="'$(_ClaudeMdPolyfills)' != ''">$(_ClaudeMdContent) ## Active Polyfills $(_ClaudeMdPolyfills)</_ClaudeMdContent> |
347 | | - <_ClaudeMdContent Condition="'$(_ClaudeMdExtensions)' != ''">$(_ClaudeMdContent) ## Active Extensions $(_ClaudeMdExtensions)</_ClaudeMdContent> |
348 | 315 | <_ClaudeMdContent Condition="'$(_ClaudeMdTestConfig)' != ''">$(_ClaudeMdContent) ## Test Configuration $(_ClaudeMdTestConfig)</_ClaudeMdContent> |
349 | 316 | <_ClaudeMdContent Condition="'$(_ClaudeMdFeatures)' != ''">$(_ClaudeMdContent) ## SDK Features $(_ClaudeMdFeatures)</_ClaudeMdContent> |
350 | 317 | <_ClaudeMdContent>$(_ClaudeMdContent) ## Banned APIs $(_ClaudeMdBannedApis)</_ClaudeMdContent> |
|
0 commit comments