Unique namespace generation for GitVersionInformation class#3619
Merged
asbjornu merged 12 commits intoJul 23, 2023
Conversation
Applesauce314
commented
Jul 5, 2023
Comment on lines
+26
to
+32
| {1}{2} | ||
| {4}[global::System.Runtime.CompilerServices.CompilerGenerated] | ||
| {4}[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] | ||
| {4}static class GitVersionInformation | ||
| {4}{{ | ||
| {0} | ||
| }} | ||
| {4}}}{3} |
Contributor
Author
There was a problem hiding this comment.
This part here is the most clunky, I would much prefer a cleaner way of handling the indent/non-indent and brackets needed for the csharp namespace.
Member
There was a problem hiding this comment.
Yeah, this is not very elegant. Pull requests to improve it are welcome.
asbjornu
requested changes
Jul 21, 2023
asbjornu
left a comment
Member
There was a problem hiding this comment.
I think this is a nice addition that may resolve a few bugs reported over the years, but I think the proposed name is a bit too long, unwieldy, and imprecise. How do you feel about UseProjectNamespace?
asbjornu
approved these changes
Jul 23, 2023
Contributor
|
Thank you @Applesauce314 for your contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
adds a configuration option
to allow the creation of the
GitVersionInformationclass in a namespace related to the project it is in.this allows different projects to have the class in different namespaces so if internalsvisibleto attribute is used there is not class name collision (CS0436), eliminating the need to suppress the issue.
Related Issue
issue #3606
Issue #448
Motivation and Context
Elimination of CS0436
How Has This Been Tested?
wrote unit tests to cover added code
Checklist: