Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add Visual Basic support to AssemblyFileInfo task and make Namespace optional in config #471
This pull request contains one new feature and one breaking change.
First, as I'm sure many of us have VB code in the wild, I've added support for generating AssemblyInfo.vb files for Visual Basic projects. I was unsure whether it was better to call the function CreateVisualBasicAssemblyInfoWithConfig or CreateVBAssemblyInfoWithConfig, so I played it safe and went with the former. I've not added any tests specific to generating the VB file as there were no architectural changes to the attributes, and the existing tests did not cover the differences between the AssemblyInfo file layout between languages.
Second, I've added a breaking change to the AssemblyInfoFileConfig record in that it is now a class. This was done to allow the Namespace field to be optional for code passing an AssemblyInfoFileConfig to the CreateXXAssemblyInfoWithConfig functions, as it's pointless to write a namespace declaration to the AssemblyInfo file if no class is being generated, and it's confusing to require the developer to specify the namespace when they want to specify that no class should be generated to begin with. We could alternatively turn the defaults on their head such that no class is generated by default, but I feel that would silently change the behavior of people's build scripts, where this would only effect those that wish to disable class generation anyway.
Third, I'm still a novice when it comes to F#, so if I've made any poor stylistic choices in my coding please let me know