Skip to content

mkbundle nuget.exe on linux #17158

@dcasota

Description

@dcasota

Hi,

I'm running into following issue:

  1. Install Mono and nuget.exe on VMware Photon OS
  2. Build. mkbundle --simple -o /tmp/mononuget /usr/local/bin/nuget.exe
  3. Run /tmp/mononuget

Current Behavior

See the error(s) below:

The specified path is not of a legal form (empty).
System.ArgumentException: The specified path is not of a legal form (empty).

Expected Behavior

behavior of mkbundled nuget.exe on Linux as on MS Windows.

On which platforms did you notice this

[ ] macOS
[x] Linux
[ ] Windows

Version Used:
VMware Photon OS 3.0 on Azure
mono-6.0.0.313 with https://dist.nuget.org/win-x86-commandline/latest/nuget.exe (v5.2.0)

Also tested on:
mono-6.0.0.313 with https://dist.nuget.org/win-x86-commandline/v2.8.6/nuget.exe
mono-5.18.1.28 with https://dist.nuget.org/win-x86-commandline/v2.8.6/nuget.exe
mono-5.18.0.225 with https://dist.nuget.org/win-x86-commandline/latest/nuget.exe (v5.2.0)

Stacktrace

root@photonos [ / ]# MONO_LOG_MASK=asm MONO_LOG_LEVEL=debug mkbundle --simple -o /tmp/mononuget /usr/local/bin/nuget.exe
Mono: Assembly Loader probing location: '/usr/local/lib/mono/4.5/mscorlib.dll'.
Mono: Image addref mscorlib[0x2321f40] (asmctx DEFAULT) -> /usr/local/lib/mono/4.5/mscorlib.dll[0x2320b20]: 2
Mono: Prepared to set up assembly 'mscorlib' (/usr/local/lib/mono/4.5/mscorlib.dll)
Mono: Found assembly remapping for mscorlib and was for the same version 4.0.0.0
Mono: Found assembly remapping for mscorlib and was for the same version 4.0.0.0
Mono: Assembly Loader probing location: '/usr/local/lib/mono/4.5/mscorlib.dll'.
Mono: Assembly Loader loaded assembly from location: '/usr/local/lib/mono/4.5/mscorlib.dll'.
Mono: Assembly mscorlib[0x2321f40] added to domain mkbundle.exe, ref_count=1
Mono: Assembly Loader probing location: '/usr/local/lib/mono/4.5/mkbundle.exe'.
Mono: Image addref mkbundle[0x2377d70] (asmctx DEFAULT) -> /usr/local/lib/mono/4.5/mkbundle.exe[0x231e480]: 3
Mono: Prepared to set up assembly 'mkbundle' (/usr/local/lib/mono/4.5/mkbundle.exe)
Mono: Assembly mkbundle[0x2377d70] added to domain mkbundle.exe, ref_count=1
Mono: Assembly Loader loaded assembly from location: '/usr/local/lib/mono/4.5/mkbundle.exe'.
Mono: Assembly Loader probing location: '/usr/local/lib/mono/4.5/mkbundle.exe'.
Mono: Loading reference 0 of /usr/local/lib/mono/4.5/mkbundle.exe asmctx DEFAULT, looking for mscorlib, Version=4.0.0.0,Culture=neutral, PublicKeyToken=b77a5c561934e089
Mono: Found assembly remapping for mscorlib and was for the same version 4.0.0.0
Mono: Found assembly remapping for mscorlib and was for the same version 4.0.0.0
Mono: Assembly Ref addref mkbundle[0x2377d70] -> mscorlib[0x2321f40]: 2
Mono: Loading reference 1 of /usr/local/lib/mono/4.5/mkbundle.exe asmctx DEFAULT, looking for System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Mono: Found assembly remapping for System and was for the same version 4.0.0.0
Mono: Found assembly remapping for System and was for the same version 4.0.0.0
Mono: Domain mkbundle.exe search path is:
Mono:   path[0] = '/usr/local/lib/mono/4.5/'
Mono: End of domain mkbundle.exe search path.
Mono: Assembly Loader probing location: '/usr/local/lib/mono/4.5/System.dll'.
Mono: Image addref System[0x23834c0] (asmctx DEFAULT) -> /usr/local/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll[0x2382190]: 2
Mono: Prepared to set up assembly 'System' (/usr/local/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll)
Mono: Assembly System[0x23834c0] added to domain mkbundle.exe, ref_count=1
Mono: Assembly Loader loaded assembly from location: '/usr/local/lib/mono/4.5/System.dll'.
Mono: Assembly Ref addref mkbundle[0x2377d70] -> System[0x23834c0]: 2
Mono: Loading reference 0 of /usr/local/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll asmctx DEFAULT, lookingfor mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Mono: Found assembly remapping for mscorlib and was for the same version 4.0.0.0
Mono: Found assembly remapping for mscorlib and was for the same version 4.0.0.0
Mono: Assembly Ref addref System[0x23834c0] -> mscorlib[0x2321f40]: 3
Mono: Loading reference 2 of /usr/local/lib/mono/4.5/mkbundle.exe asmctx DEFAULT, looking for System.IO.Compression.FileSystem, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Mono: Found assembly remapping for System.IO.Compression.FileSystem and was for the same version 4.0.0.0
Mono: Found assembly remapping for System.IO.Compression.FileSystem and was for the same version 4.0.0.0
Mono: Domain mkbundle.exe search path is:
Mono:   path[0] = '/usr/local/lib/mono/4.5/'
Mono: End of domain mkbundle.exe search path.
Mono: Assembly Loader probing location: '/usr/local/lib/mono/4.5/System.IO.Compression.FileSystem.dll'.
Mono: Image addref System.IO.Compression.FileSystem[0x24d16d0] (asmctx DEFAULT) -> /usr/local/lib/mono/gac/System.IO.Compression.FileSystem/4.0.0.0__b77a5c561934e089/System.IO.Compression.FileSystem.dll[0x24d0880]: 2
Mono: Prepared to set up assembly 'System.IO.Compression.FileSystem' (/usr/local/lib/mono/gac/System.IO.Compression.FileSystem/4.0.0.0__b77a5c561934e089/System.IO.Compression.FileSystem.dll)
Mono: Assembly System.IO.Compression.FileSystem[0x24d16d0] added to domain mkbundle.exe, ref_count=1
Mono: Assembly Loader loaded assembly from location: '/usr/local/lib/mono/4.5/System.IO.Compression.FileSystem.dll'.
Mono: Assembly Ref addref mkbundle[0x2377d70] -> System.IO.Compression.FileSystem[0x24d16d0]: 2
Mono: Loading reference 0 of /usr/local/lib/mono/gac/System.IO.Compression.FileSystem/4.0.0.0__b77a5c561934e089/System.IO.Compression.FileSystem.dll asmctx DEFAULT, looking for mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Mono: Found assembly remapping for mscorlib and was for the same version 4.0.0.0
Mono: Found assembly remapping for mscorlib and was for the same version 4.0.0.0
Mono: Assembly Ref addref System.IO.Compression.FileSystem[0x24d16d0] -> mscorlib[0x2321f40]: 4
Mono: Loading reference 3 of /usr/local/lib/mono/4.5/mkbundle.exe asmctx DEFAULT, looking for System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Mono: Found assembly remapping for System.Core and was for the same version 4.0.0.0
Mono: Found assembly remapping for System.Core and was for the same version 4.0.0.0
Mono: Domain mkbundle.exe search path is:
Mono:   path[0] = '/usr/local/lib/mono/4.5/'
Mono: End of domain mkbundle.exe search path.
Mono: Assembly Loader probing location: '/usr/local/lib/mono/4.5/System.Core.dll'.
Mono: Image addref System.Core[0x250bdc0] (asmctx DEFAULT) -> /usr/local/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll[0x2506670]: 2
Mono: Prepared to set up assembly 'System.Core' (/usr/local/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll)
Mono: Assembly System.Core[0x250bdc0] added to domain mkbundle.exe, ref_count=1
Mono: Assembly Loader loaded assembly from location: '/usr/local/lib/mono/4.5/System.Core.dll'.
Mono: Assembly Ref addref mkbundle[0x2377d70] -> System.Core[0x250bdc0]: 2
Mono: Loading reference 0 of /usr/local/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll asmctx DEFAULT, looking for mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Mono: Found assembly remapping for mscorlib and was for the same version 4.0.0.0
Mono: Found assembly remapping for mscorlib and was for the same version 4.0.0.0
Mono: Assembly Ref addref System.Core[0x250bdc0] -> mscorlib[0x2321f40]: 5
Using runtime: /usr/local/bin/mono
     Assembly: /usr/local/bin/nuget.exe
     Assembly: /usr/local/lib/mono/4.5/mscorlib.dll
     Assembly: /usr/local/lib/mono/4.5/System.Core.dll
     Assembly: /usr/local/lib/mono/4.5/System.dll
     Assembly: /usr/local/lib/mono/4.5/Mono.Security.dll
     Assembly: /usr/local/lib/mono/4.5/System.Configuration.dll
     Assembly: /usr/local/lib/mono/4.5/System.Xml.dll
     Assembly: /usr/local/lib/mono/4.5/System.Security.dll
     Assembly: /usr/local/lib/mono/4.5/System.Numerics.dll
     Assembly: /usr/local/lib/mono/4.5/Microsoft.CSharp.dll
     Assembly: /usr/local/lib/mono/4.5/System.Xml.Linq.dll
     Assembly: /usr/local/lib/mono/4.5/System.ComponentModel.Composition.dll
     Assembly: /usr/local/lib/mono/4.5/System.Data.dll
     Assembly: /usr/local/lib/mono/4.5/System.Transactions.dll
     Assembly: /usr/local/lib/mono/4.5/System.EnterpriseServices.dll
     Assembly: /usr/local/lib/mono/4.5/System.Runtime.Serialization.dll
     Assembly: /usr/local/lib/mono/4.5/System.ServiceModel.Internals.dll
     Assembly: /usr/local/lib/mono/4.5/Microsoft.Build.Utilities.v4.0.dll
     Assembly: /usr/local/lib/mono/4.5/Microsoft.Build.Framework.dll
     Assembly: /usr/local/lib/mono/4.5/System.IO.Compression.dll
     Assembly: /usr/local/lib/mono/4.5/System.ComponentModel.DataAnnotations.dll
     Assembly: /usr/local/lib/mono/4.5/WindowsBase.dll
     Assembly: /usr/local/lib/mono/4.5/System.Xaml.dll
     Assembly: /usr/local/lib/mono/4.5/System.ServiceModel.dll
     Assembly: /usr/local/lib/mono/4.5/System.IdentityModel.dll
     Assembly: /usr/local/lib/mono/4.5/System.Web.ApplicationServices.dll
     Assembly: /usr/local/lib/mono/4.5/System.Messaging.dll
     Assembly: /usr/local/lib/mono/4.5/Mono.Messaging.dll
     Assembly: /usr/local/lib/mono/4.5/System.Drawing.dll
     Assembly: /usr/local/lib/mono/4.5/System.Configuration.Install.dll
     Assembly: /usr/local/lib/mono/4.5/System.Windows.Forms.dll
     Assembly: /usr/local/lib/mono/4.5/System.Runtime.Serialization.Formatters.Soap.dll
     Assembly: /usr/local/lib/mono/4.5/Accessibility.dll
     Assembly: /usr/local/lib/mono/4.5/Mono.WebBrowser.dll
     Assembly: /usr/local/lib/mono/4.5/Mono.Posix.dll
     Assembly: /usr/local/lib/mono/4.5/System.IdentityModel.Selectors.dll
     Assembly: /usr/local/lib/mono/4.5/System.Web.Services.dll
     Assembly: /usr/local/lib/mono/4.5/System.Web.dll
     Assembly: /usr/local/lib/mono/4.5/Mono.Data.Sqlite.dll
     Assembly: /usr/local/lib/mono/4.5/System.DirectoryServices.dll
     Assembly: /usr/local/lib/mono/4.5/Novell.Directory.Ldap.dll
     Assembly: /usr/local/lib/mono/4.5/System.Design.dll
     Assembly: /usr/local/lib/mono/4.5/System.ServiceModel.Activation.dll
     Assembly: /usr/local/lib/mono/4.5/System.Data.Services.Client.dll
     Assembly: /usr/local/lib/mono/4.5/System.Net.Http.dll
     Assembly: /usr/local/lib/mono/4.5/I18N.West.dll
     Assembly: /usr/local/lib/mono/4.5/I18N.dll
systemconfig: /usr/local/etc/mono/config
machineconfig: /usr/local/etc/mono/4.5/machine.config
Generated /tmp/mononuget
Mono: Unloading domain mkbundle.exe[0x231b1b0], assembly mscorlib[0x2321f40], ref_count=5
Mono: Unloading domain mkbundle.exe[0x231b1b0], assembly mkbundle[0x2377d70], ref_count=1
Mono: Unloading assembly mkbundle [0x2377d70].
Mono: Unloading domain mkbundle.exe[0x231b1b0], assembly System[0x23834c0], ref_count=2
Mono: Unloading domain mkbundle.exe[0x231b1b0], assembly System.IO.Compression.FileSystem[0x24d16d0], ref_count=2
Mono: Unloading domain mkbundle.exe[0x231b1b0], assembly System.Core[0x250bdc0], ref_count=2
Mono: Unloading image /usr/local/lib/mono/4.5/mkbundle.exe [0x231e480].
Mono: Unloading assembly System [0x23834c0].
Mono: Unloading image /usr/local/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll [0x2382190].
Mono: Unloading assembly System.IO.Compression.FileSystem [0x24d16d0].
Mono: Unloading image /usr/local/lib/mono/gac/System.IO.Compression.FileSystem/4.0.0.0__b77a5c561934e089/System.IO.Compression.FileSystem.dll [0x24d0880].
Mono: Unloading assembly System.Core [0x250bdc0].
Mono: Unloading image /usr/local/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll [0x2506670].
Mono: Unloading assembly mscorlib [0x2321f40].
Mono: Unloading image /usr/local/lib/mono/4.5/mscorlib.dll [0x2320b20].
root@photonos [ / ]# /tmp/mononuget
The specified path is not of a legal form (empty).
System.ArgumentException: The specified path is not of a legal form (empty).
  at System.IO.Path.InsecureGetFullPath (System.String path) [0x00025] in <e8a6cfd731fe4bbea03d436d6e95080c>:0
  at System.IO.Path.GetFullPathInternal (System.String path) [0x00000] in <e8a6cfd731fe4bbea03d436d6e95080c>:0
  at System.IO.FileSystemEnumerableIterator`1[TSource]..ctor (System.String path, System.String originalUserPath, System.String searchPattern, System.IO.SearchOption searchOption, System.IO.SearchResultHandler`1[TSource] resultHandler, System.Boolean checkHost) [0x00038] in <e8a6cfd731fe4bbea03d436d6e95080c>:0
  at System.IO.FileSystemEnumerableFactory.CreateFileNameIterator (System.String path, System.String originalUserPath, System.String searchPattern, System.Boolean includeFiles, System.Boolean includeDirs, System.IO.SearchOption searchOption,System.Boolean checkHost) [0x00009] in <e8a6cfd731fe4bbea03d436d6e95080c>:0
  at System.IO.Directory.EnumerateFileSystemNames (System.String path, System.String searchPattern, System.IO.SearchOption searchOption, System.Boolean includeFiles, System.Boolean includeDirs) [0x00000] in <e8a6cfd731fe4bbea03d436d6e95080c>:0
  at System.IO.Directory.InternalEnumerateFiles (System.String path, System.String searchPattern, System.IO.SearchOptionsearchOption) [0x00000] in <e8a6cfd731fe4bbea03d436d6e95080c>:0
  at System.IO.Directory.EnumerateFiles (System.String path, System.String searchPattern) [0x0001c] in <e8a6cfd731fe4bbea03d436d6e95080c>:0
  at NuGet.CommandLine.ExtensionLocator.FindAll (System.String globalRootDirectory, System.Collections.Generic.IEnumerable`1[T] customPaths, System.String assemblyPattern, System.String nugetDirectoryAssemblyPattern) [0x00086] in <86071b8d89ed441c8bd0686989227b79>:0
  at NuGet.CommandLine.ExtensionLocator.FindExtensions () [0x0000b] in <86071b8d89ed441c8bd0686989227b79>:0
  at NuGet.CommandLine.Program.AddExtensionsToCatalog (System.ComponentModel.Composition.Hosting.AggregateCatalog catalog, NuGet.CommandLine.IConsole console) [0x00005] in <86071b8d89ed441c8bd0686989227b79>:0
  at NuGet.CommandLine.Program.Initialize (NuGet.IFileSystem fileSystem, NuGet.CommandLine.IConsole console) [0x0003f] in <86071b8d89ed441c8bd0686989227b79>:0
  at NuGet.CommandLine.Program.MainCore (System.String workingDirectory, System.String[] args) [0x000d8] in <86071b8d89ed441c8bd0686989227b79>:0
root@photonos [ / ]#

I'v tried to mkbundle nuget.exe using the 4.5 libraries:
MONO_LOG_MASK=asm MONO_LOG_LEVEL=debug mkbundle --simple --static --deps -L /usr/local/lib/mono/4.5-api/ -L /root/mono/mono-5.18.0.225/external/binary-reference-assemblies/v4.5 -o /tmp/mononuget -L /usr/local/lib/mono/4.5 --config /usr/local/etc/mono/config --machine-config /usr/local/etc/mono/4.5/machine.config /usr/local/bin/nuget.exe

The error The specified path is not of a legal form (empty). does NOT show up, however a new error appears: root@photonos [ / ]# /tmp/mononuget The file /usr/local/lib/mscorlib.dll is an invalid CIL image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions