// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#if NET_2_0
using System;
using System.IO;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
+using Mono.XBuild.Utilities;
namespace Microsoft.Build.Tasks {
[MonoTODO]
protected override string GenerateFullPathToTool ()
{
- return Path.Combine (ToolPath, ToolExe);
+ if (!string.IsNullOrEmpty (ToolPath))
+ return Path.Combine (ToolPath, ToolExe);
+ return ToolLocationHelper.GetPathToDotNetFrameworkFile (ToolExe, TargetDotNetFrameworkVersion.VersionLatest);
}
[MonoTODO]
return true;
}
- protected override void LogEventsFromTextOutput (string singleLine, MessageImportance importance)
+ protected override void LogEventsFromTextOutput (string singleLine, MessageImportance messageImportance)
{
singleLine = singleLine.Trim ();
if (singleLine.Length == 0)
Match match = ErrorRegex.Match (singleLine);
if (!match.Success) {
- Log.LogMessage (importance, singleLine);
+ Log.LogMessage (messageImportance, singleLine);
return;
}
string col = match.Result ("${column}");
int columnNumber = 0;
if (!string.IsNullOrEmpty (col))
- columnNumber = col == "255+" ? -1 : Int32.Parse (col);
+ columnNumber = col.IndexOf ("+") >= 0 ? -1 : Int32.Parse (col);
string category = match.Result ("${level}");
string code = match.Result ("${number}");
Log.LogError (null, code, null, filename, lineNumber, columnNumber, -1,
-1, text, null);
} else {
- Log.LogMessage (importance, singleLine);
+ Log.LogMessage (messageImportance, singleLine);
}
}
[MonoTODO]
protected override string ToolName {
- get { return Utilities.RunningOnWindows ? "vbnc.bat" : "vbnc"; }
+ get {
+ return MSBuildUtils.RunningOnWindows ? "vbnc.bat" : "vbnc";
+ }
}
[MonoTODO]
}
}
-#endif