File Content Replacer no longer matching regex after 10.0.4 to 2017.1 upgrade

Using the AssemblyFileVersion in AssemblyInfo (C#) template for the File Content Replacer build feature, we have been using the following regex to locate and replace a custom attribute value in the AssemblyInfo files:

(^\[\s*assembly\s*:\s*(MyNamespace\.)?SemanticVersion(Attribute)?\s*\(\s*@?\")(([0-9\*])+\.?)+(\"\s*\)\s*\])

The other settings can be seen below:

Our AssemblyInfo.cs files are all of the form:

using MyNamespace;
using System.Reflection;
using System.Runtime.InteropServices;

[assembly: AssemblyTitle("MyNamespace.MyComponent")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Some Software")]
[assembly: AssemblyProduct("MyNamespace.MyComponent")]
[assembly: AssemblyCopyright("Copyright © Some Software 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

[assembly: ComVisible(false)]
[assembly: Guid("r25ecd63-5266-vrt6-btu7-kt547sw223zx")]

[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: SemanticVersion("1.0.0")]

The replacement string $1%semanticVersion%$6 validates manually, but none are replaced in the solution.  Using $1\%semanticVersion%$6, the results are identical.  Am I alone?

0
1 comment
Avatar
Permanently deleted user

The File Content Replacer add-on available here fixed this issue.  Thanks to Andrey Shcheglov!

0

Please sign in to leave a comment.