diff options
-rw-r--r-- | msvc/build-init.vcxproj.filters | 1 | ||||
-rw-r--r-- | msvc/mono.external.targets | 36 |
2 files changed, 22 insertions, 15 deletions
diff --git a/msvc/build-init.vcxproj.filters b/msvc/build-init.vcxproj.filters index 4cdc322a7b1..046a2d06383 100644 --- a/msvc/build-init.vcxproj.filters +++ b/msvc/build-init.vcxproj.filters @@ -2,5 +2,6 @@ <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClInclude Include="..\config.h" />
+ <ClInclude Include="..\winconfig.h" />
</ItemGroup>
</Project>
\ No newline at end of file diff --git a/msvc/mono.external.targets b/msvc/mono.external.targets index 5e2a3eed2bd..3489b874acc 100644 --- a/msvc/mono.external.targets +++ b/msvc/mono.external.targets @@ -10,6 +10,9 @@ <ConfPropertyFoundMatch ParameterType="System.String" Output="true" /> </ParameterGroup> <Task> + <Using Namespace="System" /> + <Using Namespace="System.Text.RegularExpressions" /> + <Using Namespace="System.IO" /> <Code Type="Fragment" Language="cs"> <![CDATA[ @@ -17,30 +20,33 @@ ConfPropertyValue = ""; ConfPropertyFoundMatch = "false"; - var regex = new System.Text.RegularExpressions.Regex (ConfRegEx); - using (StreamReader reader = new StreamReader(ConfFile)) + if (File.Exists (ConfFile)) { - string line; - while ((line = reader.ReadLine ()) != null) + var regex = new Regex (ConfRegEx); + using (StreamReader reader = new StreamReader(ConfFile)) { - var match = regex.Match (line); - if (match != null && match.Success) + string line; + while ((line = reader.ReadLine ()) != null) { - if (match.Groups != null && match.Groups.Count == 1) + var match = regex.Match (line); + if (match != null && match.Success) { - var propertyLine = match.Groups[0].ToString (); - if (!String.IsNullOrEmpty (propertyLine)) + if (match.Groups != null && match.Groups.Count == 1) { - var propertyLineItems = propertyLine.Split ('='); - if (propertyLineItems != null && propertyLineItems.Length == 2) + var propertyLine = match.Groups[0].ToString (); + if (!String.IsNullOrEmpty (propertyLine)) { - ConfPropertyName = propertyLineItems[0].Trim (); - ConfPropertyValue = propertyLineItems[1].Trim (); + var propertyLineItems = propertyLine.Split ('='); + if (propertyLineItems != null && propertyLineItems.Length == 2) + { + ConfPropertyName = propertyLineItems[0].Trim (); + ConfPropertyValue = propertyLineItems[1].Trim (); + } } } + ConfPropertyFoundMatch = "true"; + break; } - ConfPropertyFoundMatch = "true"; - break; } } } |