MSBUILD: error MSBUILD0004: Too many project files specified
See original GitHub issueEnvironment
- 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:
- Created 4 years ago
- Comments:7 (1 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
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:
I tried the latest master (de7c7c2aa89a88a2610dc8bdf46cf356453e6ede) using the source installation, same issue: