Install any skill in seconds. Free to start, no credit card required.
Get Started Free →dotnet/property-patterns
MSBuild property definition patterns: conditional defaults, composition/concatenation, path normalization, trailing-slash handling, TFM detection helpers, and evaluation order. USE FOR: diagnosing and fixing property definition issues and shared-property anti-patterns in .props/.csproj; DefineConstants or NoWarn overwritten instead of appended; unconditional assignments that block project-level overrides; unquoted conditions that fail on empty properties; hardcoded paths that break cross-platfor
Passed 20 of 21 test cases with the skill, and 17 of 21 without it.
3 fixed18 passed either way1 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 2 test cases the skill fixed. Same model, same prompt, with and without the skill.
I need an MSBuild XML snippet to set custom compiler constants and warning suppressions based on whether the target framework is .NET Core. Please provide a PropertyGroup structure that appends my custom define constant and warning suppressions without inadvertently overwriting existing values.
| Checked | Without skill | With skill |
|---|---|---|
| Uses [MSBuild]::GetTargetFrameworkIdentifier to test if the framework identifier is .NETCoreApp | Missed | Passed |
| Appends new values to DefineConstants using semicolon concatenation with $(DefineConstants) | Passed | Passed |
The instructions your model reads when the skill loads.
Canonical property definition and manipulation patterns from the MSBuild repository.
Set a property only if not already set, allowing callers to override:
<PropertyGroup>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">AnyCPU</Platform>
<BuildInParallel Condition="'$(BuildInParallel)' == ''">true</BuildInParallel>
</PropertyGroup>
'$(Prop)' == ''.props: creates overridable defaults. In .targets: creates fallbacks.Group related properties under a shared condition:
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4'))">
<DefineConstants>$(DefineConstants);FEATURE_APARTMENT_STATE</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_APM</DefineConstants>
<FeatureAppDomain>true</FeatureAppDomain>
</PropertyGroup>
<PropertyGroup Condition="'$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)'))' == '.NETCoreApp'">
<NetCoreBuild>true</NetCoreBuild>
<DefineConstants>$(DefineConstants);RUNTIME_TYPE_NETCORE</DefineConstants>
</PropertyGroup>
Use the outer Condition on PropertyGroup to avoid repeating the same condition on every property.
test cases passed, vs 17 / 21 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.