You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/05/06 21:32:50 UTC

[GitHub] [cordova-windows] janpio edited a comment on issue #332: Ability to override TargetPlatformVersion via config.xml

janpio edited a comment on issue #332: Ability to override TargetPlatformVersion via config.xml
URL: https://github.com/apache/cordova-windows/issues/332#issuecomment-489786949
 
 
   Ok, had some time to spend on investigating this:
   
   > The CordovaApp.Windows10.jsproj template file has a hard-coded TargetPlatformVersion, which currently seems to be set to 10.0.10240.0
   
   This value is not hardcoded, but gets filled by the maximum SDK installed on your machine when `cordova prepare` is run (which `cordova build` and `cordova run` do in the background):
   
   https://github.com/apache/cordova-windows/blob/c52b81c3f6daff69b57939fcf62451d3c2a602dd/template/cordova/lib/prepare.js#L497
   
   This means that your machine probably only had `10.0.10240.0` or no Windows SDK at all, as 10.0.10240.0 is also the default, installed.
   
   For me the value for example is set to `<TargetPlatformVersion>10.0.18362.0</TargetPlatformVersion>` when running `cordova platform add windows`.
   
   So installed the `10.0.15063.0` SDK should automatically replace this value.
   
   ---
   
   If you also want to influence `TargetPlatformMinVersion` in `.jsproj`, then you can use `<preference name="uap-target-min-version" value="10.0.15063.0" />` in `config.xml`.
   
   ---
   
   And related, you can also realize this diff, but in `\platforms\windows\package.windows10.appxmanifest`:
   
   ```diff
   -        <TargetDeviceFamily MaxVersionTested="10.0.10240.0" MinVersion="10.0.10240.0" Name="Windows.Universal" />
   +        <TargetDeviceFamily MaxVersionTested="10.0.15063.0" MinVersion="10.0.15063.0" Name="Windows.Universal" />
   ```
   
   by setting this in `config.xml`:
   
   ```
           <preference name="Windows.Universal-MinVersion" value="10.0.15063.0" />
           <preference name="Windows.Universal-MaxVersionTested" value="10.0.15063.0" />
   ```
   
   Although I am not totally sure what this achieves to be honest.
   
   ---
   
   Please let me know if this helped to fix the problem for your @MarkMaldaba.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org