msbuild error MSB4025
See original GitHub issueI’m using Windows 10
, node 7.7.2
, npm 4.1.2
I get this error when running node-gyp rebuild
for after installing the binding module leveldown
(My objective is to rebuild it for electron). The specific error is…
MSBUILD : error MSB4025: The project file could not be loaded. Root element is missing.
I searched for this error but it seemed to be specific to visual studio projects and xml files. I don’t have a lot of context since I’m not usually a windows user. Somewhere I found that you can specific --msvs_version=2013
, that did not work. But I tried with 2017
(because that’s the latest download) and I got the following error.
Traceback (most recent call last):
File "C:\Users\Gebruiker\AppData\Roaming\npm\node_modules\node-gyp\gyp\gyp_main.py", line 16, in <module>
sys.exit(gyp.script_main())
File "C:\Users\Gebruiker\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 545, in script_main
return main(sys.argv[1:])
File "C:\Users\Gebruiker\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 538, in main
return gyp_main(args)
File "C:\Users\Gebruiker\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 514, in gyp_main
options.duplicate_basename_check)
File "C:\Users\Gebruiker\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 98, in Load
generator.CalculateVariables(default_variables, params)
File "C:\Users\Gebruiker\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1900, in CalculateVariables
generator_flags.get('msvs_version', 'auto'))
File "C:\Users\Gebruiker\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSVersion.py", line 434, in SelectVisualStudioVersion
versions = _DetectVisualStudioVersions(version_map[version], 'e' in version)
KeyError: '2017'
If anyone has any idas I would be very grateful! -S
Issue Analytics
- State:
- Created 7 years ago
- Reactions:14
- Comments:65 (26 by maintainers)
Top Results From Across the Web
Error MSB4025: The Project File Could Not Be Loaded
A project file could not be loaded ! This is a problem that occurs with the following file or directory: MSB4025_PROJECT.MDBD.
Read more >MSBUILD Error MSB4025 in TeamCity build ... - Stack Overflow
Error: error MSB4025: The project file could not be loaded. Data at the root level is invalid. I launched cmd as Administrator and...
Read more >error MSB4025: The project file could not be loaded. Data at ...
MSBUILD : error MSB4025: The project file could not be loaded. Data at the root level is invalid. Line 1, position 1 #834....
Read more >Visual Studio 2019 16.8.7 cannot build solution files with ...
7, we cannot build solution files with MSBuild anymore. The following error occurs: error MSB4025: The project file could not be loaded. Data...
Read more >How to solve error MSB4025 - CodeProject
Um. That doesn't look right at all: HTML. <project defaulttargets="Build"> xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
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
3.6.0 supports VS2017 You can install
Build Tools for Visual Studio 2017
, make sure to selectC++ tools
,Windows 10 SDK
andMSBuild
and your set.This bug can be closed /cc @rvagg
Edit
for
P.S. you only need one, and best tested is 10393
node-gyp@3.6.0
do not install any of the special SDKs (red) only any of the greensI solved this error by running
npm install --global --production windows-build-tools --vs2015
(note the--vs2015
)