Reading AssemblyInformationalVersion value from AssemblyInfo file with RegEx
问题 I'm trying to read the AssemblyInformationalVersion from the AssemblyInfo file with msbuild but I am failing so far. The below one gets me the digits but I need to whole input inside quotes: <PropertyGroup> <Pattern>\[assembly: AssemblyInformationalVersion\(.(\d+)\.(\d+)\.(\d+)</Pattern> <In>@(ItemsFromFile)</In> <Out>$([System.Text.RegularExpressions.Regex]::Match($(In), $(Pattern)))</Out> </PropertyGroup> <Message Text="Output : $(Out.Remove(0, 41))"/> This is the target line for example: