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

Fake.AssemblyInfoFile Regex for attributes in VB.NET is case-sensitive #1254

Closed
forgetaboutit opened this issue Jun 1, 2016 · 1 comment
Closed

Comments

@forgetaboutit
Copy link

forgetaboutit commented Jun 1, 2016

Description

Functions in the Fake.AssemblyInfo module don't work as expected because they don't find all attributes in an AssemblyInfo.vb file with uppercased <Assembly: ...> attributes. This is unhelpful since Visual Studio uppercases the assembly: part by default. The problem seems to be that the regex (regexAttrNameValueVb) for matching the assembly attributes is used in a case-sensitive way.

Repro steps

  1. In Visual Studio, enable Extras -> Options -> Text Editor -> Basic -> Advanced -> "Pretty listing (reformatting) of code"
  2. Create an AssemblyInfo.vb file in a VB.NET project and edit the versions in the file for example
  3. Use the GetAttributes function on the file to extract all attributes

Expected behavior

GetAttributes should return a sequence containing the attributes in the AssemblyInfo.vb file

Actual behavior

GetAttributes returns an empty sequence

Known workarounds

Disable the aforementioned option in Visual Studio and manually lowercase the <Assembly: ...> to <assembly: ...>.

Related information

  • Observed on FAKE version 4.26.0.
  • Problem still exists in the source for version 4.28.0
@forgetaboutit
Copy link
Author

If someone told me how to fix it, I'd happily provide a pull request. I'm not sure, however, what would be the best solution to fix the issue. Do you think that matching the regexes case-insensitively in general would be acceptable?

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