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

Code Quality: Added root files to projects to make them easier to edit #16815

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Lamparter
Copy link
Contributor

Adds Directory.Packages.props, Directory.Build.props and .editorconfig to all projects as None to make them appear in Solution Explorer. This makes them easier to edit.

Comment on lines +9 to +13
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)\.editorconfig" />
<None Include="$(MSBuildThisFileDirectory)\Directory.Build.props" />
<None Include="$(MSBuildThisFileDirectory)\Directory.Packages.props" />
</ItemGroup>
Copy link
Member

Choose a reason for hiding this comment

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

This will make them appear on all projects. Instead you should add them as solution items.
I would recommend holding up the change until we migrate to slnx.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm aware of that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IMO it's a better experience to add them to the project directly as they apply to every project
If it was an explicit .props file that was in the actual project structure then I would add them to the solution, though since these files apply everywhere it makes sense to put them inside every project as None.

Copy link
Member

Choose a reason for hiding this comment

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

You can create a virtual folder and add them to it in the solution file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants