Merge pull request #1508 from slluis/fix-20966
[mono.git] / mcs / class / Microsoft.Build.Engine / Microsoft.Build.BuildEngine / Project.cs
index 065dc4c77bc490dc2cb67624f455d3d9b9c48196..005752baf98e12f541683c8aa9f258b6a7d03354 100644 (file)
@@ -323,9 +323,7 @@ namespace Microsoft.Build.BuildEngine {
                                Reevaluate ();
                        }
 
-#if NET_4_0
                        ProcessBeforeAndAfterTargets ();
-#endif
 
                        if (targetNames == null || targetNames.Length == 0) {
                                if (defaultTargets != null && defaultTargets.Length != 0) {
@@ -404,7 +402,6 @@ namespace Microsoft.Build.BuildEngine {
                        return sb.ToString ();
                }
 
-#if NET_4_0
                void ProcessBeforeAndAfterTargets ()
                {
                        var beforeTable = Targets.AsIEnumerable ()
@@ -440,7 +437,6 @@ namespace Microsoft.Build.BuildEngine {
                        expr.Parse (targets, ParseOptions.AllowItemsNoMetadataAndSplit);
                        return (string []) expr.ConvertTo (this, typeof (string []));
                }
-#endif
 
                [MonoTODO]
                public string [] GetConditionedPropertyValues (string propertyName)
@@ -1429,6 +1425,10 @@ namespace Microsoft.Build.BuildEngine {
                        return default (T);
                }
 
+               internal string ThisFileFullPath {
+                       get { return this_file_property_stack.Peek (); }
+               }
+
                // Used for MSBuild*This* set of properties
                internal void PushThisFileProperty (string full_filename)
                {