Skip to content

Add optional namespace around GitVersionInformation. #2392

@sxleixer

Description

@sxleixer

I use GitVersionTask in multiple projects on a single solution. When I add a reference to a project also using the task and make them fried assemblies I get the following warning.

The type 'GitVersionInformation' in '<ProjectA>\obj\Debug\GitVersionInformation.g.cs' conflicts 
with the imported type 'GitVersionInformation' in '<ProjectB>'. 
Using the type defined in '<ProjectB>\obj\Debug\GitVersionInformation.g.cs'.

Detailed Description

I would suggest to create an optional custom namespace around the specified GitVersionInformation classes. Such that one may cherry-pick the namespace of the GitVersionInformation to use.

Context

This will give me the possibility to get rid of the warning and not to have any conflicting information in my project.

Possible Implementation

Add a new property which can be set in the project e.g. GitVersionInfoNamespace. When it is not set, there will be no namespace around the GitVersionInformation. When set the namespace will be generated. Changing it this way should be backwards compatible.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions