When I'm trying to run ionic build windows --release I get the following error:
[16:20:53] lint finished in 4.71 s
The following image was skipped because it has an unsupported size (undefinedxundefined): resources\android\icon\drawable-xhdpi-icon.png
Building project: C:\Users\Ivar\Documents\earthinks\platforms\windows\CordovaApp.Windows10.jsproj
Configuration : release
Platform : arm
C:\Users\Ivar\Documents\earthinks\platforms\windows\
CordovaApp.Windows10.jsproj(61,13): error MSB4226: The imported project
"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\Microsoft\VisualStudio\v15.0\JavaScript\Microsoft.VisualStudio.WJProject.Default.props"
was not found. Also, tried to find "Microsoft\VisualStudio\v15.0\JavaScript\Microsoft.VisualStudio.WJProject.Default.props"
in the fallback search path(s) for $(MSBuildExtensionsPath32) - "C:\Program Files (x86)\MSBuild" .
These search paths are defined in "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\msbuild.exe.Config".
Confirm that the path in the <Import> declaration is correct, and that the file exists on disk in one of the search paths.
Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\msbuild.exe: Command failed with exit code 1
Now I have installed the Visual Studio 2017 Build Tools.
I checked for the missing file and my folder C:\Program Files (x85)\Microsoft Visual Studio\2017\BuildTools\MSBuild\Microsoft\VisualStudio\v15.0\ only contains CodeAnalysis and WebApplications.
I first ran into a common error of not having any build tools at all. So I downloaded them, and this question (Cordova project and windows platform) said that I should add VSINSTALLDIR = C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\ to my environment variables.
Now my C:\Program Files (x86)\Microsoft Visual Studio\2017 only contains BuildTools. So I added the environment variable:
VSINSTALLDIR = C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools (BuildTools does contain the MSBuild folder (and does contain a JavaScript folder which doesn't contain Microsoft.VisualStudio.WJProject.Default.props))
Searching for Microsoft.VisualStudio.WJProject.Default.props in the Microsoft Visual Studio folder gave no results at all.