MSBUILD: error MSBUILD0004: Too many project files specified

See original GitHub issue

Environment

  • Pythonnet version:
  • Python version:3.7
  • Operating System:raspbian(raspberry pi 3b+)

Details

pip3 install pythonnet
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pythonnet
  Using cached https://files.pythonhosted.org/packages/4a/0a/5964a5a1fdf207fab8e718edd1f8d3578e0681577fe9abe0d9006f9718c2/pythonnet-2.4.0.tar.gz
Building wheels for collected packages: pythonnet
  Running setup.py bdist_wheel for pythonnet ... error
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-_utmzlf0/pythonnet/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-q9e7hoav --python-tag cp37:
  running bdist_wheel
  running build
  running build_ext
  Checking for updates from https://www.nuget.org/api/v2/.
  Currently running NuGet.exe 4.1.0.
  Updating NuGet.exe to 5.3.1.
  Update successful.
  MSBuild auto-detection: using msbuild version '14.0' from '/usr/lib/mono/xbuild/14.0/bin'.
  
  >>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<
  
  MSBUILD: error MSBUILD0004: Too many project files specified
  
  WARNING: Error reading msbuild project information, ensure that your input solution or project file is valid. NETCore and UAP projects will be skipped, only packages.config files will be restored.
  Index was outside the bounds of the array.
  MSBuild auto-detection: using msbuild version '' from '/usr/bin'.
  
  >>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<
  
  MSBUILD: error MSBUILD0004: Too many project files specified
  
  WARNING: Error reading msbuild project information, ensure that your input solution or project file is valid. NETCore and UAP projects will be skipped, only packages.config files will be restored.
  Index was outside the bounds of the array.
  Traceback (most recent call last):
    File "/tmp/pip-install-_utmzlf0/pythonnet/setup.py", line 432, in _install_packages
      subprocess.check_call(cmd, shell=use_shell)
    File "/usr/lib/python3.7/subprocess.py", line 347, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command 'mono tools/nuget/nuget.exe restore pythonnet.sln  -MSBuildVersion 14 -o packages' returned non-zero exit status 1.
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-_utmzlf0/pythonnet/setup.py", line 658, in <module>
      zip_safe=False,
    File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 145, in setup
      return distutils.core.setup(**attrs)
    File "/usr/lib/python3.7/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/tmp/pip-install-_utmzlf0/pythonnet/setup.py", line 610, in run
      return bdist_wheel.bdist_wheel.run(self)
    File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 188, in run
      self.run_command('build')
    File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/lib/python3.7/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/lib/python3.7/distutils/command/build_ext.py", line 340, in run
      self.build_extensions()
    File "/usr/lib/python3.7/distutils/command/build_ext.py", line 449, in build_extensions
      self._build_extensions_serial()
    File "/usr/lib/python3.7/distutils/command/build_ext.py", line 474, in _build_extensions_serial
      self.build_extension(ext)
    File "/tmp/pip-install-_utmzlf0/pythonnet/setup.py", line 245, in build_extension
      self._install_packages()
    File "/tmp/pip-install-_utmzlf0/pythonnet/setup.py", line 437, in _install_packages
      subprocess.check_call(cmd, shell=use_shell)
    File "/usr/lib/python3.7/subprocess.py", line 347, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command 'mono tools/nuget/nuget.exe restore pythonnet.sln  -o packages' returned non-zero exit status 1.
  
  ----------------------------------------
  Failed building wheel for pythonnet
  Running setup.py clean for pythonnet
Failed to build pythonnet
Installing collected packages: pythonnet
  Running setup.py install for pythonnet ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-_utmzlf0/pythonnet/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-lwm7k9ba/install-record.txt --single-version-externally-managed --compile --user --prefix=:
    usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: -c --help [cmd1 cmd2 ...]
       or: -c --help-commands
       or: -c cmd --help
    
    error: option --single-version-externally-managed not recognized
    
    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-_utmzlf0/pythonnet/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-lwm7k9ba/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-_utmzlf0/pythonnet/

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
dbcohenmcommented, Sep 6, 2021

Sorry @filmor, but why is this closed? Does not seem to me that a solution has been found – but maybe I am wrong. I have exactly the same problem now, using the latest mono-complete and pythonnet 2.5.0.

2reactions
tibortakacscommented, Oct 30, 2020

I had the same issue in Ubuntu 20.04. I tried multiple versions (2.5.1, 2.5.0, 2.4.0, 2.3.0), I have had always the same issue.

Environment:

$ mono --version
Mono JIT compiler version 6.8.0.105 (Debian 6.8.0.105+dfsg-2 Wed Feb 26 23:23:50 UTC 2020)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           __thread
	SIGSEGV:       altstack
	Notifications: epoll
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug 
	Interpreter:   yes
	LLVM:          supported, not enabled.
	Suspend:       hybrid
	GC:            sgen (concurrent by default)

$ python --version
Python 3.8.5

$ which python
<PATH>/venv/bin/python
$ pip install pythonnet

Collecting pythonnet
  Using cached pythonnet-2.5.1.tar.gz (1.9 MB)
Requirement already satisfied: pycparser in <PATH>/venv/lib/python3.8/site-packages (from pythonnet) (2.20)
Building wheels for collected packages: pythonnet
  Building wheel for pythonnet (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: <PATH>/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9q7s23jk/pythonnet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9q7s23jk/pythonnet/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-wd_hvh5c
       cwd: /tmp/pip-install-9q7s23jk/pythonnet/
  Complete output (140 lines):
  running bdist_wheel
  running build
  running build_ext
  Checking for updates from https://www.nuget.org/api/v2/.
  Currently running NuGet.exe 4.1.0.
  Updating NuGet.exe to 5.7.0.
  Update successful.
  MSBuild auto-detection: using msbuild version '14.0' from '/usr/lib/mono/xbuild/14.0/bin'.
  
  >>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<
  
  MSBUILD: error MSBUILD0004: Too many project files specified
  
  WARNING: Error reading msbuild project information, ensure that your input solution or project file is valid. NETCore and UAP projects will be skipped, only packages.config files will be restored.
  Restoring NuGet package UnmanagedExports.1.2.7.
  Restoring NuGet package System.ValueTuple.4.5.0.
  Restoring NuGet package NUnit.3.12.0.
  Restoring NuGet package NUnit.ConsoleRunner.3.11.1.
  Adding package 'NUnit.ConsoleRunner.3.11.1' to folder '/tmp/pip-install-9q7s23jk/pythonnet/packages'
  Adding package 'NUnit.3.12.0' to folder '/tmp/pip-install-9q7s23jk/pythonnet/packages'
  Adding package 'System.ValueTuple.4.5.0' to folder '/tmp/pip-install-9q7s23jk/pythonnet/packages'
  Adding package 'UnmanagedExports.1.2.7' to folder '/tmp/pip-install-9q7s23jk/pythonnet/packages'
  Added package 'NUnit.ConsoleRunner.3.11.1' to folder '/tmp/pip-install-9q7s23jk/pythonnet/packages'
  Added package 'UnmanagedExports.1.2.7' to folder '/tmp/pip-install-9q7s23jk/pythonnet/packages'
  Added package 'System.ValueTuple.4.5.0' to folder '/tmp/pip-install-9q7s23jk/pythonnet/packages'
  Added package 'NUnit.3.12.0' to folder '/tmp/pip-install-9q7s23jk/pythonnet/packages'
  
  NuGet Config files used:
      <HOME>/.config/NuGet/NuGet.Config
  
  Feeds used:
      <HOME>/.nuget/packages/
      https://api.nuget.org/v3/index.json
  
  Installed:
      4 package(s) to packages.config projects
  
  >>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<
  
  XBuild Engine Version 14.0
  Mono, Version 6.8.0.105
  Copyright (C) 2005-2013 Various Mono authors
  
  Build started 10/30/2020 8:02:03 PM.
  __________________________________________________
  Project "/tmp/pip-install-9q7s23jk/pythonnet/pythonnet.sln" (Clean target(s)):
  	Target ValidateSolutionConfiguration:
  		Building solution configuration "ReleaseMono|x64".
  	Target Clean:
  		The project 'clrmodule' is disabled for solution configuration 'ReleaseMono|x64'.
  Done building project "/tmp/pip-install-9q7s23jk/pythonnet/pythonnet.sln".
  
  Build succeeded.
  	 0 Warning(s)
  	 0 Error(s)
  
  Time Elapsed 00:00:02.3788640
  
  >>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<
  
  XBuild Engine Version 14.0
  Mono, Version 6.8.0.105
  Copyright (C) 2005-2013 Various Mono authors
  
  Build started 10/30/2020 8:02:06 PM.
  __________________________________________________
  Project "/tmp/pip-install-9q7s23jk/pythonnet/pythonnet.sln" (Build target(s)):
  	Target ValidateSolutionConfiguration:
  		Building solution configuration "ReleaseMono|x64".
  	Target Build:
  		Project "/tmp/pip-install-9q7s23jk/pythonnet/src/runtime/Python.Runtime.csproj" (default target(s)):
  			Target PrepareForBuild:
  				Configuration: ReleaseMono Platform: x64
  				Created directory "bin/"
  				Created directory "obj/x64/ReleaseMono/"
  			Target CopyNonResxEmbeddedResources:
  				Copying file from '/tmp/pip-install-9q7s23jk/pythonnet/src/runtime/resources/clr.py' to '/tmp/pip-install-9q7s23jk/pythonnet/src/runtime/obj/x64/ReleaseMono/Python.Runtime.resources.clr.py'
  			Target GenerateSatelliteAssemblies:
  			No input files were specified for target GenerateSatelliteAssemblies, skipping.
  			Target CoreCompile:
  				Tool /usr/lib/mono/4.5/mcs.exe execution started with arguments: /noconfig /debug:pdbonly /optimize+ /out:obj/x64/ReleaseMono/Python.Runtime.dll /resource:obj/x64/ReleaseMono/Python.Runtime.resources.clr.py,clr.py Codecs/EncoderGroup.cs Codecs/DecoderGroup.cs Codecs/RawProxyEncoder.cs Codecs/TupleCodecs.cs converterextensions.cs finalizer.cs Properties/AssemblyInfo.cs ../SharedAssemblyInfo.cs arrayobject.cs assemblymanager.cs BorrowedReference.cs classderived.cs classbase.cs classmanager.cs classobject.cs clrobject.cs codegenerator.cs constructorbinder.cs constructorbinding.cs converter.cs CustomMarshaler.cs debughelper.cs delegatemanager.cs delegateobject.cs eventbinding.cs eventobject.cs exceptions.cs extensiontype.cs fieldobject.cs generictype.cs genericutil.cs importhook.cs indexer.cs interfaceobject.cs interfaces.cs interop.cs iterator.cs managedtype.cs metatype.cs methodbinder.cs methodbinding.cs methodobject.cs methodwrapper.cs modulefunctionobject.cs moduleobject.cs modulepropertyobject.cs nativecall.cs NewReference.cs NonCopyableAttribute.cs overload.cs propertyobject.cs pyansistring.cs pydict.cs PyExportAttribute.cs pyfloat.cs pyint.cs pyiter.cs pylist.cs pylong.cs pynumber.cs pyobject.cs pyscope.cs pysequence.cs pystring.cs pythonengine.cs pythonexception.cs pytuple.cs ReferenceExtensions.cs runtime.cs typemanager.cs typemethod.cs Util.cs platform/Types.cs platform/LibraryLoader.cs polyfill/ReflectionPolifills.cs slots/mp_length.cs interop38.cs obj/x64/ReleaseMono/.NETFramework,Version=v4.0.AssemblyAttribute.cs /target:library /unsafe+ /define:"PYTHON38;PYTHON3;UCS4;MONO_LINUX;PYTHON_WITHOUT_ENABLE_SHARED" /nowarn:1591 /doc:bin/Python.Runtime.xml /langversion:7.3 /nostdlib /reference:/usr/lib/mono/4.0-api/System.dll /reference:/usr/lib/mono/4.0-api/System.Core.dll /reference:/usr/lib/mono/4.0-api//mscorlib.dll
  CSC: error CS1617: Invalid -langversion option `7.3'. It must be `ISO-1', `ISO-2', Default, Latest or value in range 1 to 7.2
  			Task "Csc" execution -- FAILED
  			Done building target "CoreCompile" in project "/tmp/pip-install-9q7s23jk/pythonnet/src/runtime/Python.Runtime.csproj".-- FAILED
  		Done building project "/tmp/pip-install-9q7s23jk/pythonnet/src/runtime/Python.Runtime.csproj".-- FAILED
  	Task "MSBuild" execution -- FAILED
  	Done building target "Build" in project "/tmp/pip-install-9q7s23jk/pythonnet/pythonnet.sln".-- FAILED
  Done building project "/tmp/pip-install-9q7s23jk/pythonnet/pythonnet.sln".-- FAILED
  
  Build FAILED.
  Errors:
  
  /tmp/pip-install-9q7s23jk/pythonnet/pythonnet.sln (Build) ->
  (Build target) ->
  /tmp/pip-install-9q7s23jk/pythonnet/src/runtime/Python.Runtime.csproj (default targets) ->
  /usr/lib/mono/xbuild/14.0/bin/Microsoft.CSharp.targets (CoreCompile target) ->
  
  	CSC: error CS1617: Invalid -langversion option `7.3'. It must be `ISO-1', `ISO-2', Default, Latest or value in range 1 to 7.2
  
  	 0 Warning(s)
  	 1 Error(s)
  
  Time Elapsed 00:00:03.0776450
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-9q7s23jk/pythonnet/setup.py", line 630, in <module>
      setup(
    File "<PATH>/venv/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/tmp/pip-install-9q7s23jk/pythonnet/setup.py", line 612, in run
      return bdist_wheel.bdist_wheel.run(self)
    File "<PATH>/venv/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 290, in run
      self.run_command('build')
    File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/lib/python3.8/distutils/command/build_ext.py", line 340, in run
      self.build_extensions()
    File "/usr/lib/python3.8/distutils/command/build_ext.py", line 449, in build_extensions
      self._build_extensions_serial()
    File "/usr/lib/python3.8/distutils/command/build_ext.py", line 474, in _build_extensions_serial
      self.build_extension(ext)
    File "/tmp/pip-install-9q7s23jk/pythonnet/setup.py", line 353, in build_extension
      subprocess.check_call(" ".join(cmd + ["/t:Build"]), shell=use_shell)
    File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command 'xbuild pythonnet.sln /p:Configuration=ReleaseMono /p:Platform=x64 /p:DefineConstants="PYTHON38%3BPYTHON3%3BUCS4%3BMONO_LINUX%3BPYTHON_WITHOUT_ENABLE_SHARED" /p:PythonBuildDir="/tmp/pip-install-9q7s23jk/pythonnet/build/lib.linux-x86_64-3.8" /p:PythonInteropFile="interop38.cs" /p:PackageId=pythonnet_py38_x64 /verbosity:normal /t:Build' returned non-zero exit status 1.
  ----------------------------------------
  ERROR: Failed building wheel for pythonnet
  Running setup.py clean for pythonnet
Failed to build pythonnet
Installing collected packages: pythonnet
    Running setup.py install for pythonnet ... error
    ERROR: Command errored out with exit status 1:
     command: <PATH>/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9q7s23jk/pythonnet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9q7s23jk/pythonnet/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-zbz6m6vp/install-record.txt --single-version-externally-managed --compile --install-headers <PATH>/venv/include/site/python3.8/pythonnet
         cwd: /tmp/pip-install-9q7s23jk/pythonnet/
    Complete output (6 lines):
    usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: setup.py --help [cmd1 cmd2 ...]
       or: setup.py --help-commands
       or: setup.py cmd --help
    
    error: option --single-version-externally-managed not recognized
    ----------------------------------------
ERROR: Command errored out with exit status 1:<PATH>/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9q7s23jk/pythonnet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9q7s23jk/pythonnet/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-zbz6m6vp/install-record.txt --single-version-externally-managed --compile --install-headers <PATH>/venv/include/site/python3.8/pythonnet Check the logs for full command output.
WARNING: You are using pip version 20.2.3; however, version 20.2.4 is available.
You should consider upgrading via the '<PATH>/venv/bin/python -m pip install --upgrade pip' command.

I tried the latest master (de7c7c2aa89a88a2610dc8bdf46cf356453e6ede) using the source installation, same issue:

$ python setup.py bdist_wheel

<PATH>/venv/lib/python3.8/site-packages/setuptools/dist.py:452: UserWarning: Normalizing '3.0.0dev1' to '3.0.0.dev1'
  warnings.warn(tmpl.format(**locals()))
running bdist_wheel
running build
running build_ext
Checking for updates from https://api.nuget.org/v3/index.json [https://api.nuget.org/v3/index.json].
  CACHE https://api.nuget.org/v3/registration5-gz-semver2/nuget.commandline/index.json
Currently running NuGet.exe 5.7.0.
NuGet.exe is up to date.
Update successful.
MSBuild auto-detection: using msbuild version '14.0' from '/usr/lib/mono/xbuild/14.0/bin'.

>>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<

MSBUILD: error MSBUILD0004: Too many project files specified

WARNING: Error reading msbuild project information, ensure that your input solution or project file is valid. NETCore and UAP projects will be skipped, only packages.config files will be restored.
All packages listed in packages.config are already installed.

>>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<

XBuild Engine Version 14.0
Mono, Version 6.8.0.105
Copyright (C) 2005-2013 Various Mono authors

Build started 10/30/2020 8:04:08 PM.
__________________________________________________
Project "<PATH>/pythonnet/pythonnet.sln" (Clean target(s)):
	Target ValidateSolutionConfiguration:
		Building solution configuration "ReleaseMono|x64".
	Target Clean:
		Project "<PATH>/pythonnet/src/runtime/Python.Runtime.csproj" (Clean target(s)):
			Target CoreClean:
				Deleting file '<PATH>/pythonnet/src/runtime/obj/x64/ReleaseMono/.NETFramework,Version=v4.0.AssemblyAttribute.cs'
				Deleting file '<PATH>/pythonnet/src/runtime/obj/x64/ReleaseMono/Python.Runtime.resources.clr.py'
				Deleting file '<PATH>/pythonnet/src/runtime/obj/x64/ReleaseMono/Python.Runtime.csproj.FilesWrittenAbsolute.txt'
		Done building project "<PATH>/pythonnet/src/runtime/Python.Runtime.csproj".
		The project 'clrmodule' is disabled for solution configuration 'ReleaseMono|x64'.
Done building project "<PATH>/pythonnet/pythonnet.sln".

Build succeeded.
	 0 Warning(s)
	 0 Error(s)

Time Elapsed 00:00:01.5075450

>>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<

XBuild Engine Version 14.0
Mono, Version 6.8.0.105
Copyright (C) 2005-2013 Various Mono authors

Build started 10/30/2020 8:04:10 PM.
__________________________________________________
Project "<PATH>/pythonnet/pythonnet.sln" (Build target(s)):
	Target ValidateSolutionConfiguration:
		Building solution configuration "ReleaseMono|x64".
	Target Build:
		Project "<PATH>/pythonnet/src/runtime/Python.Runtime.csproj" (default target(s)):
			Target PrepareForBuild:
				Configuration: ReleaseMono Platform: x64
			Target CopyNonResxEmbeddedResources:
				Copying file from <PATH>/pythonnet/src/runtime/resources/clr.py' to '<PATH>/pythonnet/src/runtime/obj/x64/ReleaseMono/Python.Runtime.resources.clr.py'
			Target GenerateSatelliteAssemblies:
			No input files were specified for target GenerateSatelliteAssemblies, skipping.
			Target CoreCompile:
				Tool /usr/lib/mono/4.5/mcs.exe execution started with arguments: /noconfig /debug:pdbonly /optimize+ /out:obj/x64/ReleaseMono/Python.Runtime.dll /resource:obj/x64/ReleaseMono/Python.Runtime.resources.clr.py,clr.py Codecs/EncoderGroup.cs Codecs/DecoderGroup.cs Codecs/RawProxyEncoder.cs Codecs/TupleCodecs.cs converterextensions.cs finalizer.cs Properties/AssemblyInfo.cs ../SharedAssemblyInfo.cs arrayobject.cs assemblymanager.cs BorrowedReference.cs bufferinterface.cs classderived.cs classbase.cs classmanager.cs classobject.cs clrobject.cs codegenerator.cs constructorbinder.cs constructorbinding.cs converter.cs CustomMarshaler.cs debughelper.cs delegatemanager.cs delegateobject.cs eventbinding.cs eventobject.cs exceptions.cs extensiontype.cs fieldobject.cs generictype.cs genericutil.cs importhook.cs indexer.cs interfaceobject.cs interfaces.cs interop.cs iterator.cs managedtype.cs metatype.cs methodbinder.cs methodbinding.cs methodobject.cs methodwrapper.cs modulefunctionobject.cs moduleobject.cs modulepropertyobject.cs nativecall.cs NewReference.cs NonCopyableAttribute.cs overload.cs propertyobject.cs pyansistring.cs pybuffer.cs pydict.cs PyExportAttribute.cs pyfloat.cs pyint.cs pyiter.cs pylist.cs pylong.cs pynumber.cs pyobject.cs pyscope.cs pysequence.cs pystring.cs pythonengine.cs pythonexception.cs pytuple.cs ReferenceExtensions.cs runtime.cs runtime_data.cs runtime_state.cs typemanager.cs typemethod.cs Util.cs platform/Types.cs platform/LibraryLoader.cs polyfill/ReflectionPolifills.cs platform/NativeCodePage.cs slots/mp_length.cs interop38.cs obj/x64/ReleaseMono/.NETFramework,Version=v4.0.AssemblyAttribute.cs /target:library /unsafe+ /define:"PYTHON38;UCS4;PYTHON_WITHOUT_ENABLE_SHARED" /nowarn:1591 /doc:bin/Python.Runtime.xml /langversion:7.3 /nostdlib /reference:/usr/lib/mono/4.0-api/System.dll /reference:/usr/lib/mono/4.0-api/System.Core.dll /reference:/usr/lib/mono/4.0-api//mscorlib.dll
CSC: error CS1617: Invalid -langversion option `7.3'. It must be `ISO-1', `ISO-2', Default, Latest or value in range 1 to 7.2
			Task "Csc" execution -- FAILED
			Done building target "CoreCompile" in project "<PATH>/pythonnet/src/runtime/Python.Runtime.csproj".-- FAILED
		Done building project "<PATH>/pythonnet/src/runtime/Python.Runtime.csproj".-- FAILED
	Task "MSBuild" execution -- FAILED
	Done building target "Build" in project "<PATH>/pythonnet/pythonnet.sln".-- FAILED
Done building project "<PATH>/pythonnet/pythonnet.sln".-- FAILED

Build FAILED.
Errors:

<PATH>/pythonnet/pythonnet.sln (Build) ->
(Build target) ->
<PATH>/pythonnet/src/runtime/Python.Runtime.csproj (default targets) ->
/usr/lib/mono/xbuild/14.0/bin/Microsoft.CSharp.targets (CoreCompile target) ->

	CSC: error CS1617: Invalid -langversion option `7.3'. It must be `ISO-1', `ISO-2', Default, Latest or value in range 1 to 7.2

	 0 Warning(s)
	 1 Error(s)

Time Elapsed 00:00:01.9098960
Traceback (most recent call last):
  File "setup.py", line 621, in <module>
    setup(
  File "<PATH>/venv/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "setup.py", line 603, in run
    return bdist_wheel.bdist_wheel.run(self)
  File "<PATH>/venv/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 290, in run
    self.run_command('build')
  File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.8/distutils/command/build_ext.py", line 340, in run
    self.build_extensions()
  File "/usr/lib/python3.8/distutils/command/build_ext.py", line 449, in build_extensions
    self._build_extensions_serial()
  File "/usr/lib/python3.8/distutils/command/build_ext.py", line 474, in _build_extensions_serial
    self.build_extension(ext)
  File "setup.py", line 347, in build_extension
    subprocess.check_call(" ".join(cmd + ["/t:Build"]), shell=use_shell)
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'xbuild pythonnet.sln /p:Configuration=ReleaseMono /p:Platform=x64 /p:DefineConstants="PYTHON38%3BUCS4%3BPYTHON_WITHOUT_ENABLE_SHARED" /p:PythonBuildDir="<PATH>/pythonnet/build/lib.linux-x86_64-3.8" /p:PythonInteropFile="interop38.cs" /p:PackageId=pythonnet_py38_x64 /verbosity:normal /t:Build' returned non-zero exit status 1.
Read more comments on GitHub >

github_iconTop Results From Across the Web

XBuild reporting too many project files but works with ...
MSBUILD : error MSBUILD0004: Too many project files specified. I have XBuild Engine Version 12.0 and Mono, Version 4.0.2.0.
Read more >
errors during mono build
I was able to build the project using Mono 6.10 and msbuild 16.6.0 on Arch ... MSBUILD: error MSBUILD0004: Too many project files...
Read more >
Nuget restore causing msbuild error: 4025 The project file ...
I have 2 project file in my solution (xyz.sln) A.csproj (Class Library) B.csproj (windowservice, a console app) b.vdproj (a setup project ...
Read more >
xbuild solution at linux
[14:15:03][MSBuild output] MSBUILD: error MSBUILD0004: Too many project files specified. [14:15:04]Publishing internal artifacts.
Read more >
error MSBUILD0004: Too many project files specified
MSBUILD : error MSBUILD0004: Too many project files specified.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found