[ 
https://issues.apache.org/jira/browse/CB-7655?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vladimir Kotikov updated CB-7655:
---------------------------------
    Description: 
Repro steps:
1. Create mobilespec app with windows platform
2.  Open CordovaApp.sln with Visual Studio
3. Try to build/run solution

Error:
{noformat}
File content does not conform to specified schema.
The element 'Capabilities' in namespace 
'http://schemas.microsoft.com/appx/2010/manifest' has invalid child element 
'Capability' in namespace 'http://schemas.microsoft.com/appx/2010/manifest'.
List of possible elements expected: 'DeviceCapability' in namespace 
'http://schemas.microsoft.com/appx/2010/manifest'. 
d:\Projects\cordova\release3.6.1\mobilespec_merged\platforms\windows\build\windows80\Debug\AnyCPU\AppxManifest.xml
 36 6 CordovaApp.Windows80
{noformat}

Problem here is that appxmanifest files in application directory is not valid, 
until we run {{build}}/{{run}} scripts from cordova directory.
One possible solution is to add custom prebuild event that calls 
{{cordova/lib/prepare.js}} to jsproj files, that will update appxmanifests. To 
avoid running this script twice, we need to add additional parameter from 
{{build}} script to msbuild and run prebuild event only if this parameter is 
__not__ specified.

  was:
Repro steps:
1. Create mobilespec app with windows platform
2.  Open CordovaApp.sln with Visual Studio
3. Try to build/run solution

Error:
{noformat}
File content does not conform to specified schema. The element 'Capabilities' 
in namespace 'http://schemas.microsoft.com/appx/2010/manifest' has invalid 
child element 'Capability' in namespace 
'http://schemas.microsoft.com/appx/2010/manifest'. List of possible elements 
expected: 'DeviceCapability' in namespace 
'http://schemas.microsoft.com/appx/2010/manifest'. 
d:\Projects\cordova\release3.6.1\mobilespec_merged\platforms\windows\build\windows80\Debug\AnyCPU\AppxManifest.xml
 36 6 CordovaApp.Windows80
{noformat}

Problem here is that appxmanifest files in application directory is not valid, 
until we run {{build}}/{{run}} scripts from cordova directory.

One possible solution is to add custom prebuild event that calls 
{{cordova/lib/prepare.js}} to jsproj files, that will update appxmanifests. To 
avoid running this script twice, we need to add additiona parameter from build 
cript to msbuild and run prebuild event only if this parameter is not specified.


> Cordova app fails to build/run with Visual Studio without pre building via 
> console.
> -----------------------------------------------------------------------------------
>
>                 Key: CB-7655
>                 URL: https://issues.apache.org/jira/browse/CB-7655
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Windows
>    Affects Versions: 3.6.3
>            Reporter: Vladimir Kotikov
>             Fix For: 3.7.0
>
>
> Repro steps:
> 1. Create mobilespec app with windows platform
> 2.  Open CordovaApp.sln with Visual Studio
> 3. Try to build/run solution
> Error:
> {noformat}
> File content does not conform to specified schema.
> The element 'Capabilities' in namespace 
> 'http://schemas.microsoft.com/appx/2010/manifest' has invalid child element 
> 'Capability' in namespace 'http://schemas.microsoft.com/appx/2010/manifest'.
> List of possible elements expected: 'DeviceCapability' in namespace 
> 'http://schemas.microsoft.com/appx/2010/manifest'. 
> d:\Projects\cordova\release3.6.1\mobilespec_merged\platforms\windows\build\windows80\Debug\AnyCPU\AppxManifest.xml
>  36 6 CordovaApp.Windows80
> {noformat}
> Problem here is that appxmanifest files in application directory is not 
> valid, until we run {{build}}/{{run}} scripts from cordova directory.
> One possible solution is to add custom prebuild event that calls 
> {{cordova/lib/prepare.js}} to jsproj files, that will update appxmanifests. 
> To avoid running this script twice, we need to add additional parameter from 
> {{build}} script to msbuild and run prebuild event only if this parameter is 
> __not__ specified.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to