What problem does it solve? Files generated during an MSBuild build are invisible to the build process because globs expand during the evaluation phase, before those files exist. This causes generated source files to be skipped by the compiler (e.g., CS0246 errors), generated content to be missing from the output directory, and stale artifacts to survive the Clean target. ## Core Features & Use Cases - Correct Target Timing: Guides selection of BeforeTargets values (CoreCompile, BeforeCompile, BeforeBuild, AssignTargetPaths) so generated files are registered at the right moment in the build pipeline. - Item Group Registration: Shows how to add generated files to Compile, None, Content, and FileWrites item groups inside the generating target so they compile, copy to output, and get cleaned. - Path Best Practices: Enforces use of $(IntermediateOutputPath) instead of hardcoded obj/ paths so targets work with redirected intermediate output directories. - Use Case: A custom MSBuild task generates a .cs file during the build, but the compiler reports the type does not exist. This Skill explains adding the file to Compile and FileWrites with BeforeTargets="CoreCompile;BeforeCompile" to fix it. ## Quick Start Ask the AI to fix an MSBuild target whose generated .cs file is not being compiled by adding it to the Compile and FileWrites item groups with the correct BeforeTargets timing.