msbuildtasks icon indicating copy to clipboard operation
msbuildtasks copied to clipboard

The NUnit task fails on Linux.

Open StephenMcConnel opened this issue 13 years ago • 5 comments

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 avatar Aug 27 '12 15:08 StephenMcConnel

@StephenMcConnel is this bug still open?

Shamar avatar Mar 15 '13 20:03 Shamar

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.

StephenMcConnel avatar Mar 15 '13 21:03 StephenMcConnel

So do I. @pwelter34 please take a look at this issue.

Shamar avatar Mar 16 '13 20:03 Shamar

+1. This is a bit annoying, although it can be worked around.

dchenbecker avatar Apr 11 '13 20:04 dchenbecker

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?

mvfranz avatar Feb 16 '14 04:02 mvfranz