Skip to content

Implement support for AssemblyInfo.vb in the MSBuild GitVersionTask #811

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 1 commit into from
Apr 4, 2016

Conversation

apmorton
Copy link

Just some general notes about these changes.

  • VB.NET generally uses a root namespace at the project level, and everything that doesn't specify a namespace is put there - which is why the VisualBasicAssemblyInfoBuilder does not namespace its GitVersionInformation class
  • VB.NET does not have static classes - the best you can do is make it NotInheritable, provide a Private Sub New(), and make all your members Shared
    • IMO this is better than using a module, as it prevents your members from polluting the namespace
  • The majority of changes here are related to unit testing - I basically duplicated all existing tests for C# and VB.NET
  • I tried to implement it in a way generic enough to allow future expansion to additional languages without hassle. Support generating AssemblyVersion attributes in other languages #138 mentions F# support as a goal.

Lastly, I have this currently working in an existing VB.NET project at work - everything checks out with dotPeak, and it seems to be working as expected.

@pascalberger
Copy link
Member

LGTM.

@JakeGinnivan @gep13 Any opinion against merging this PR / VB.NET support?

@gep13
Copy link
Member

gep13 commented Apr 2, 2016

@pascalberger In principal, I have no problem with merging this in, but I haven't as yet, had a chance to review the PR properly.

@asbjornu
Copy link
Member

asbjornu commented Apr 2, 2016

I've had a look and I think it's a thorough and good implementation with great test coverage. The only thing I thought while reading through the code was that AssemblyInfoBuilder should have been renamed to CSharpAssemblyInfoBuilder and then in a new commit, the AssemblyInfoBuilder should be added, instead of the other way around.

This is because the contents of CSharpAssemblyInfoBuilder is mostly identical to that of the old AssemblyInfoBuilder and the new AssemblyInfoBuilder is an abstract base class for CSharpAssemblyInfoBuilder and VisualBasicAssemblyInfoBuilder.

Other than that, this PR LGTM. 👍

@JakeGinnivan JakeGinnivan merged commit 3954783 into GitTools:master Apr 4, 2016
@gep13
Copy link
Member

gep13 commented Apr 4, 2016

@apmorton thanks for your work on this, we really appreciate it! 👍

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

Successfully merging this pull request may close these issues.

5 participants