Skip to content

WorkloadCollection cleanup #36092

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

Merged
merged 2 commits into from
Oct 13, 2023

Conversation

MiYanni
Copy link
Member

@MiYanni MiYanni commented Oct 12, 2023

Related: #35859

Summary

Daniel had suggested that I put the WorkloadCollection alias into the global usings instead of redefining it in multiple .cs files. To do that, I needed it to be defined where the types exist; meaning, you can't just put it in the Directory.Build.props at the root of the repo as every project doesn't have access to WorkloadId or WorkloadDefinition. Therefore, I just added a Directory.Build.props for them to the 2 projects I know contain these classes, dotnet and dotnet.Tests.

@MiYanni MiYanni requested review from dsplaisted and a team October 12, 2023 23:42
@ghost ghost added Area-Infrastructure untriaged Request triage from a team member labels Oct 12, 2023
Copy link
Member

@nagilson nagilson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love it 🔥

@MiYanni MiYanni enabled auto-merge October 13, 2023 00:05
Copy link
Member

@dsplaisted dsplaisted left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of creating a Directory.Build.props file for single projects, why don't you put the Using item in the .csproj files themselves?

@MiYanni MiYanni disabled auto-merge October 13, 2023 00:19
@MiYanni
Copy link
Member Author

MiYanni commented Oct 13, 2023

@dsplaisted

Instead of creating a Directory.Build.props file for single projects, why don't you put the Using item in the .csproj files themselves?

For whatever reason, my brain thought, "Well, let me put these with the other Usings in Directory.Build.props. Oh, right. It won't work there. Well I'll just split it out where it will work." Also, I've only every used these Using items in a Directory.Build.props file, so I didn't know if that affected anything. Like, I didn't look at the binlog to see when the generation task/target happens for this stuff.

But this is much better to have them in the .csproj instead of separate files. Updated the PR.

Edit: Ahhhh, found it in the docs:
image

@MiYanni MiYanni enabled auto-merge October 13, 2023 17:35
@MiYanni MiYanni merged commit d8fabcc into dotnet:release/8.0.2xx Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Infrastructure untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants