Skip to content

Auto-include generated .cs files in compilation - #7

Merged
stanoddly merged 4 commits into
mainfrom
6-add-compile-metadata-test
Mar 5, 2026
Merged

Auto-include generated .cs files in compilation#7
stanoddly merged 4 commits into
mainfrom
6-add-compile-metadata-test

Conversation

@botoddly

@botoddly botoddly commented Mar 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Generated .cs files are now automatically added to the <Compile> item group — no manual setup needed
  • Opt out with Compile="false" for .cs templates that shouldn't be compiled
  • Explicit Compile="true" still works for non-.cs extensions
  • Compile metadata is excluded from template variables (like Destination)
  • README updated with new examples and documentation

Test plan

  • GeneratedCsFile_IsCompiledSuccessfully.cs output auto-included, build succeeds
  • GeneratedCsFile_CompileFalse_IsExcludedFromCompilationCompile="false" opts out, build fails as expected
  • Existing GenerationTests still pass (5 tests total)

Closes #6

@botoddly botoddly changed the title Add failing test for Compile metadata on generated .cs files Auto-include generated .cs files in compilation Mar 4, 2026
Comment thread README.md Outdated
Comment thread src/Fluidify/FluidifyTask.cs Outdated
Comment thread src/Fluidify/build/Fluidify.targets Outdated
Comment thread tests/Fluidify.Tests.Functional/Fixtures/CompileApp/CompileApp.csproj Outdated
@stanoddly
stanoddly merged commit 5e97246 into main Mar 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add opt-in Compile metadata to include generated files in compilation

2 participants