Skip to content

Adds a transitive NuGet props file to ensure consumer project exposes needed properties to the source generator#92

Merged
danielmarbach merged 3 commits intomainfrom
include-props
May 7, 2026
Merged

Adds a transitive NuGet props file to ensure consumer project exposes needed properties to the source generator#92
danielmarbach merged 3 commits intomainfrom
include-props

Conversation

@andreasohlund
Copy link
Copy Markdown
Member

Adds a transitive NuGet props file so the source generators can detect Azure Functions host projects in package consumers without relying on repo-local build configuration.

Changes

  • pack NServiceBus.AzureFunctions.Common.props into build/ and buildTransitive/ from NServiceBus.AzureFunctions.Common
  • move the required CompilerVisibleProperty items into that props file:
    • OutputType
    • FunctionsExecutionModel
    • RootNamespace
  • remove those CompilerVisibleProperty entries from src/Custom.Build.props
  • import NServiceBus.AzureFunctions.Common.props directly in src/IntegrationTestApp/IntegrationTestApp.csproj so the local integration app uses the same setup as package consumers

Why

The composition generator depends on compiler-visible MSBuild properties to recognize the Azure Functions host project and emit AddNServiceBusFunctions().

Previously, that worked in this repository because Custom.Build.props exposed those properties globally, but consumers referencing the NuGet package did not get the same configuration. By shipping the props file as a transitive package asset, consumers now get the required compiler-visible properties automatically.

Added public and private dependency groups, updated project properties, and included a description for the project.
@danielmarbach danielmarbach merged commit 836ffcb into main May 7, 2026
5 of 6 checks passed
@danielmarbach danielmarbach deleted the include-props branch May 7, 2026 20:13
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.

4 participants