Also you need to have Visual Studio 2013… and make sure you’re NOT loading any cordova scripts like: <script type="text/javascript" src="cordova_plugins.js"></script>
I had to jump through some fiery hoops to get it all installed on my machine. I wish I would have saved all the links to everything I installed. I think there’s a dependency for windows / cordova that is only available for VS2013. VS2015 absolutely does not work and you’ll get this same error even when you set the target version to 10. Start with VS2013 and search for a windows - cordova dependency. Then make sure that VS2013 is running when running the cordova build windows and cordova windows run CLI command
Just for clarification: After installing Windows 10 SDK, everything is working fine for me.
So, on my new Win10 machine, VS2015 and Windows 10 SDK are installed. That’s enough.
Visual Studio 2015 currently installs the Windows 10 SDK automatically. You will have to add the Tools for Apache Cordova support specifically though as they are not install by default.
Then you can create an ionic project at the command line as normal and then create new project from existing code in VS2015 to open it in the IDE. Build / Run etc seem to work fine for me.
In the finished build just look for the images folder and replace them with your own images. There will be a bunch of default ‘empty’ images for which you can override, just make sure you give them the same name and dimension (eg: 150x150 px)
I added the preference section
preference name=“SplashScreen” value="screen"
preference name=“SplashScreenDelay” value="3000"
preference name=“windows-target-version” value=“10.0”
But when I execute the run command, i am getting below error:
Running command: “D:\Program Files\nodejs\node.exe” D:\project\test\hooks\after_prepare\010_add_platform_class.js D:\project\test
add to body class: platform-windows
Building project: D:\project\test\platforms\windows\CordovaApp.Windows10.jsproj
Configuration : debug
Platform : anycpu
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\JavaScript\Microsoft.VisualStudio.JavaScript.UAP.targets(70,2): error : “10.0.10240.0” is not a supported value for TargetPlatformVersion. Please change it on the Project Property page. [D:\project\test\platforms\windows\CordovaApp.Windows10.jsproj]
ERROR running one or more of the platforms: Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe: Command failed with exit code 1
You may not have the required environment or OS to run this project
Yes, I am able to resolve the issue with WIN 10 platform.
I tried building the solution using VS 2015 and before that, removed the win 10 project from the solution. Just keeping the Windows 8.1 and Win Phone 8.1 Project.
I have not modified anything in the config.xml like the preference name=“windows-target-version” value=“10.0”
Thanks for the quick reply, that works for me too, but the requirements were unfortunately to build for Windows 10. It works when the “www” folder is copied into a Cordova project created with Visual Studio, but I’d prefer that the project that cordova creates would work.
To solve this I have made 3 changes in the project which resulted in project running successfully.
Below are the changes
In config.xml add <preference name="windows-target-version" value="10.0" />
In index.html file add in head tag <meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">
In App.js file replace below line cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
with
if (cordova.plugins.Keyboard.hideKeyboardAccessoryBar) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
}
Error The following component requires .NET Native compilation which is not available when targeting ‘Windows10’ and ‘AnyCPU’. Consider changing the targeted processor architecture to one of the following: ‘x86, x64, ARM’ (if you are using command line this could be done by adding ‘–archs’ parameter, for example: ‘cordova build windows --archs=x64’). C:\Users\endriazizi\Desktop\VIRGINAPP\virginrevolutionapp\platforms\windows\plugins\pushwoosh-cordova-plugin\PushSDK.winmd