Finally I solved this issue by installing Build Tools for Visual Studio 2017. Assuming that you have already installed Visual Studio 2017 on your machine.
-
Go the official website of Visual Studio 2017 .
-
Scoll down a little bit and you will find a list of options.
-
Expand Other Tools and Frameworks. Download and Install Build Tools for Visual Studio 2017.
-
Go to System Environment Variables.
-
Make a new variable with this Name and Path:
VSINSTALLDIR = C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\ -
Now go to your ionic Project and add these two lines in config.xml file:
-
<preference name=“windows-target-version” value=“10.0”/
-
<preference name=“windows-phone-target-version” value=“10.0” /
-
Please Close the preference tag. This editor is hiding it if I put closing symbol.
-
Open command prompt or terminal, go to your project directory and run this command:
ionic cordova build windows
Hope it will help you guys.