Bug 27683 - Mono for Windows 3.12 - nunit-console error
Summary: Mono for Windows 3.12 - nunit-console error
Status: VERIFIED FIXED
Alias: None
Product: Installers
Classification: Mono
Component: General ()
Version: 3.12
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-03-05 05:23 UTC by Matt Ward
Modified: 2015-05-12 08:24 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Sample to repro the error with Mono 3.12 (185.75 KB, application/x-zip-compressed)
2015-03-05 05:23 UTC, Matt Ward
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description Matt Ward 2015-03-05 05:23:55 UTC
Created attachment 10169 [details]
Sample to repro the error with Mono 3.12

With an assembly containing a simple NUnit test that is run with nunit-console or nunit-console4 that ships with Mono 3.12 on Windows we see an error:

C:\Program Files (x86)\Mono\bin>nunit-console4 "d:\temp\Test\bin\Debug\Test.dll"
NUnit version 2.4.8
Copyright (C) 2002-2007 Charlie Poole.
Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
Copyright (C) 2000-2002 Philip Craig.
All Rights Reserved.

Runtime Environment -
   OS Version: Microsoft Windows NT 6.1.7601.65536 Service Pack 1
  CLR Version: 4.0.30319.17020 ( 3.12.0 (Visual Studio built mono) )


Unhandled Exception:
System.ArgumentException: path
  at System.IO.FileSystemInfo.CheckPath (System.String path) [0x00000] in <filename unknown>:0
  at System.IO.DirectoryInfo..ctor (System.String path, Boolean simpleOriginalPath) [0x00000] in <filename unknown>:0
  at System.IO.DirectoryInfo..ctor (System.String path) [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:.ctor (string)
  at NUnit.Util.AddinManager.RegisterAddins () [0x00000] in <filename unknown>:0
  at NUnit.Util.AddinManager.InitializeService () [0x00000] in <filename unknown>:0
  at NUnit.Util.ServiceManager.InitializeServices () [0x00000] in <filename unknown>:0
  at NUnit.ConsoleRunner.Runner.Main (System.String[] args) [0x00000] in <filename unknown>:0
  at NUnit.ConsoleRunner.Class1.Main (System.String[] args) [0x00000] in <filename unknown>:0


The problem seems to be with a change in Mono 3.12 so nunit 2.4.8 is no longer stripping off the correct number of characters from the url path. The problem seems to be that a url of the form "file:///d:/temp/nunit.core.dll" is being treated by Mono 3.12 as a Unc path. Attached is a sample project that reproduces the problem using nunit 2.4.8 directly. Microsoft .NET and Mono 3.3 work OK, but Mono 3.12 fails. Output from this test app is shown below:

Microsoft.NET:

codeBase: file:///d:/temp/TestNUnitMono/bin/Debug/nunit.core.DLL
Uri.UriSchemeFile.Length=4
Uri.SchemeDelimiter.length=3
num=8
assemblyPath: d:/temp/TestNUnitMono/bin/Debug/nunit.
core.DLL
path2: d:\temp\TestNUnitMono\bin\Debug\addins


Mono 3.3.0 on Windows:

Uri.UriSchemeFile.Length=4
Uri.SchemeDelimiter.length=3
num=8
assemblyPath: d:/temp/TestNUnitMono/bin/Debug/nunit.core.dll
path2: d:/temp/TestNUnitMono/bin/Debug\addins


Mono 3.12.0 on Windows

codeBase: file:///d:/temp/TestNUnitMono/bin/Debug/nunit.core.dll
uri.IsUnc=true
assemblyPath: ///d:/temp/TestNUnitMono/bin/Debug/nunit.core.dll
path2: \d:\temp\deletethisfolder\TestNUnitMono\bin\Debug\addins

Unhandled Exception:
System.ArgumentException: path
  at System.IO.FileSystemInfo.CheckPath (System.String path) [0x00064] in C:\buildroot\release\repos\mono\mcs\class\corlib\System.IO\FileSystemInfo.cs:263
  at System.IO.DirectoryInfo..ctor (System.String path, Boolean simpleOriginalPath) [0x00006] in C:\buildroot\release\repos\mono\mcs\class\corlib\System.IO\Dire
ctoryInfo.cs:59
  at System.IO.DirectoryInfo..ctor (System.String path) [0x00000] in C:\buildroot\release\repos\mono\mcs\class\corlib\System.IO\DirectoryInfo.cs:53
  at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:.ctor (string)
  at TestNUnitMono.MainClass.Main (System.String[] args) [0x00000] in <filenameunknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentException: path
  at System.IO.FileSystemInfo.CheckPath (System.String path) [0x00064] in C:\buildroot\release\repos\mono\mcs\class\corlib\System.IO\FileSystemInfo.cs:263
  at System.IO.DirectoryInfo..ctor (System.String path, Boolean simpleOriginalPath) [0x00006] in C:\buildroot\release\repos\mono\mcs\class\corlib\System.IO\DirectoryInfo.cs:59
  at System.IO.DirectoryInfo..ctor (System.String path) [0x00000] in C:\buildroot\release\repos\mono\mcs\class\corlib\System.IO\DirectoryInfo.cs:53
  at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:.ctor (string)
  at TestNUnitMono.MainClass.Main (System.String[] args) [0x00000] in <filename
unknown>:0
Comment 1 Jo Shields 2015-04-14 03:35:03 UTC
Working for me on 4.0 alpha
Comment 2 Matt Ward 2015-05-12 08:24:09 UTC
Looks good to me. Installed Mono 4.0.1 on Windows and it is working.

http://download.mono-project.com/archive/4.0.1/windows-installer/mono-4.0.1-gtksharp-2.12.26-win32-0.msi