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

Adding "Directory.Build.props" and ".editorconfig" #345

Open
iPazooki opened this issue Aug 28, 2023 · 2 comments
Open

Adding "Directory.Build.props" and ".editorconfig" #345

iPazooki opened this issue Aug 28, 2023 · 2 comments
Assignees

Comments

@iPazooki
Copy link

Some of the configuration settings for each project are shared, such as Authors and Company, which are repeated in every project. Moreover, we may want to enable the nullability feature in all projects, but with the current configuration, we would have to add the Nullable setting individually to each project, which is not efficient. A solution for this issue is to create a Directory.Build.props file at the root of the project and include all the common configuration settings in that file.

For example, the file could look like this:
image

In this file, I have added the shared configuration settings and enabled the Nullble feature for all projects. I have also added SonarAnalyzer.CSharp code analysis to all projects to maintain high code quality.

Additionally, we can create a ".editorconfig" file with the default configuration suggested by Microsoft to ensure a consistent code style across the entire solution.

@jamesmh
Copy link
Owner

jamesmh commented Sep 12, 2023

So, TBH the duplicates in csproj files is not an issue at all. But I'm open to starting a simple Directory.Build.props.

Let's not add the sonar analyzer yet though. Would be more appropriate to add that in a separate PR as:

  1. This will most likely lead to other code changes I suspect...
  2. It's a different intent than just "adding a new Directory.Build.props with existing properties.

LMK once a PR is ready 👍 Thanks!

@iPazooki
Copy link
Author

@jamesmh , The pull request with number #346 is now ready. Our next step could be adding <Nullable>enable</Nullable> to identify any possible null exceptions and fix them. However, this won't be an easy task as we need to update some projects as explained in the pull request.

If you are happy with that, I can create another issue for null exception

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

No branches or pull requests

2 participants