Skip to content

Use project namespace for generated code#1930

Merged
kshyju merged 4 commits intomainfrom
shkr/1158_srcgen_namespace
Sep 27, 2023
Merged

Use project namespace for generated code#1930
kshyju merged 4 commits intomainfrom
shkr/1158_srcgen_namespace

Conversation

@kshyju
Copy link
Copy Markdown
Member

@kshyju kshyju commented Sep 26, 2023

Fixes #1158

Currently the namespace for generated code is hardcoded as Microsoft.Azure.Functions.Worker. With this change, we will use the root namespace. RootNamespace is a prop our project will inherit from the Microsoft.Net.Sdk.props.

User can override this by setting the FunctionsGeneratedCodeNamespace msbuild property.

Fix was made to all source generators.

Pull request checklist

  • My changes do not require documentation changes - Need to follow up with team to determine whether we need docs update.
    • Otherwise: Documentation issue linked to PR
  • My changes should not be added to the release notes for the next release
    • Otherwise: I've added my notes to release_notes.md
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • I have added all required tests (Unit tests, E2E tests)

Additional information

Additional PR information

@kshyju kshyju merged commit 8cf9990 into main Sep 27, 2023
@kshyju kshyju deleted the shkr/1158_srcgen_namespace branch September 27, 2023 17:50
JoshLove-msft pushed a commit to JoshLove-msft/azure-functions-dotnet-worker that referenced this pull request Oct 4, 2023
* Using root namespace for generated types.

* release notes

* Using "RootNamespace" msbuild property and adding null check

* Adding "RootNamespace" to global configs in the tests
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.

FunctionMetadataProviderGenerator: Use project namespace for generated IFunctionMetadataProvider

3 participants