msbuildtasks
msbuildtasks copied to clipboard
The NUnit task fails on Linux.
The NUnit task fails with Mono's xbuild on Linux due to using / to indicate command line options. A simple patch would be something like the following:
--- MSBuild.Community.Tasks/Source/MSBuild.Community.Tasks/NUnit.cs 2012-05-04 14:20:28.000000000 -0500 +++ ~/gp/Calgary/FW70/Build/Src/FwBuildTasks/NUnit.cs 2012-08-27 10:26:13.844237217 -0500 @@ -250,6 +250,24 @@ protected override string GenerateCommandLineCommands() { CommandLineBuilder builder = new CommandLineBuilder();
-
if (Environment.OSVersion.Platform == PlatformID.Unix) -
{ -
builder.AppendSwitch("-nologo"); -
if (DisableShadowCopy) -
builder.AppendSwitch("-noshadow"); -
if (_testInNewThread.HasValue && !_testInNewThread.Value) -
builder.AppendSwitch("-nothread"); -
builder.AppendFileNamesIfNotNull(_assemblies, " "); -
builder.AppendSwitchIfNotNull("-config=", _projectConfiguration); -
builder.AppendSwitchIfNotNull("-fixture=", _fixture); -
builder.AppendSwitchIfNotNull("-include=", _includeCategory); -
builder.AppendSwitchIfNotNull("-exclude=", _excludeCategory); -
builder.AppendSwitchIfNotNull("-transform=", _xsltTransformFile); -
builder.AppendSwitchIfNotNull("-xml=", _outputXmlFile); -
builder.AppendSwitchIfNotNull("-err=", _errorOutputFile); -
builder.AppendSwitchIfNotNull("-framework=",_framework); -
return builder.ToString(); -
} builder.AppendSwitch("/nologo"); if (DisableShadowCopy) {
@StephenMcConnel is this bug still open?
Given that I don't have write access to the git repository, and that the current readonly sources have not changed, I would say the bug is still open. We solved it by compiling a modified version of the sources locally for our internal work, but would prefer to be able to use unmodified sources.
So do I. @pwelter34 please take a look at this issue.
+1. This is a bit annoying, although it can be worked around.
Version 1.4.0.72 allows NUnit to run on Linux, but I am still having an issue with the Targets. Based on this post, I was able to get it working. http://ngeor.net/2013/11/msbuild-community-tasks-nunit-and-mono/ Is it possible to get this small change to the Targets property sets included?