Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove packageReference from project file for management sdk #4923

Merged
merged 11 commits into from
Jul 26, 2024

Conversation

chunyu3
Copy link
Member

@chunyu3 chunyu3 commented Jul 17, 2024

Description

Fix #4913

Problem-tp-solve: Duplicate compile items
When generate a new service from typespec, the .NET codegen will generate scaffolding (include project file) for this new SDK. In the generated project file it includes several packageReference to add compile dependency. But in azure-sdk-for-net, the engsys already include all depended packages for management-plane SDK in Directory.Build.Common.targets. So the build will fail because of duplicate compile items.

Solution:
Since existing SDKs in azure-sdk-for-net contain define those packageRefernce in each SDK's project file, and we also need to support management SDKs from swagger which use the dotnet templates to create scaffolding folder, we decide to change in codegen side to remove packageReference when create scaffolding which will keep consistent with current SDKs.

Checklist

To ensure a quick review and merge, please ensure:

  • The PR has a understandable title and description explaining the why and what.
  • The PR is opened in draft if not ready for review yet.
    • If opened in draft, please allocate sufficient time (24 hours) after moving out of draft for review
  • The branch is recent enough to not have merge conflicts upon creation.

Ready to Land?

  • Build is completely green
    • Submissions with test failures require tracking issue and approval of a CODEOWNER
  • At least one +1 review by a CODEOWNER
  • All -1 reviews are confirmed resolved by the reviewer
    • Override/Marking reviews stale must be discussed with CODEOWNERS first

@chunyu3 chunyu3 requested a review from live1206 July 24, 2024 02:37
samples/Directory.Build.props Show resolved Hide resolved
@chunyu3 chunyu3 merged commit 2f15fe4 into Azure:feature/v3 Jul 26, 2024
8 checks 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.

ProjectScaffolding create invalid project files for new Management-plane SDK cause compile failure
2 participants