CB-11825 Windows dll file won't be copied as resource while adding custom plugin to a UWP project
Changing Package action from Content to None because Content does not work for Mobile - dlls were not being packaged into appx Project: http://git-wip-us.apache.org/repos/asf/cordova-windows/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-windows/commit/adddd089 Tree: http://git-wip-us.apache.org/repos/asf/cordova-windows/tree/adddd089 Diff: http://git-wip-us.apache.org/repos/asf/cordova-windows/diff/adddd089 Branch: refs/heads/4.4.x Commit: adddd0893e9e5a4918169b959f75f0d8fa6c047f Parents: 44e400c Author: daserge <v-ses...@microsoft.com> Authored: Wed Oct 5 19:01:26 2016 +0300 Committer: daserge <v-ses...@microsoft.com> Committed: Thu Oct 20 20:54:55 2016 +0300 ---------------------------------------------------------------------- spec/unit/pluginHandler/windows.spec.js | 10 +++++----- template/cordova/lib/JsprojManager.js | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/adddd089/spec/unit/pluginHandler/windows.spec.js ---------------------------------------------------------------------- diff --git a/spec/unit/pluginHandler/windows.spec.js b/spec/unit/pluginHandler/windows.spec.js index 161f6f5..ae2cd56 100644 --- a/spec/unit/pluginHandler/windows.spec.js +++ b/spec/unit/pluginHandler/windows.spec.js @@ -216,16 +216,16 @@ describe('windows project handler', function () { // project files, which is not needed. it('should write to correct project files when conditions are specified', function () { - var xpath = 'Content[@Include="' + computeResourcePath(resourceFiles[0]) + '"][@Condition="\'$(Platform)\'==\'x86\'"]'; + var xpath = 'None[@Include="' + computeResourcePath(resourceFiles[0]) + '"][@Condition="\'$(Platform)\'==\'x86\'"]'; validateInstalledProjects('resource-file', resourceFiles[0], xpath, ['all']); - xpath = 'Content[@Include="' + computeResourcePath(resourceFiles[1]) + '"]'; + xpath = 'None[@Include="' + computeResourcePath(resourceFiles[1]) + '"]'; validateInstalledProjects('resource-file', resourceFiles[1], xpath, ['windows', 'phone', 'windows10']); - xpath = 'Content[@Include="' + computeResourcePath(resourceFiles[2]) + '"]'; + xpath = 'None[@Include="' + computeResourcePath(resourceFiles[2]) + '"]'; validateInstalledProjects('resource-file', resourceFiles[2], xpath, ['phone']); - xpath = 'Content[@Include="' + computeResourcePath(resourceFiles[3]) + '"][@Condition="\'$(Platform)\'==\'x64\'"]'; + xpath = 'None[@Include="' + computeResourcePath(resourceFiles[3]) + '"][@Condition="\'$(Platform)\'==\'x64\'"]'; validateInstalledProjects('resource-file', resourceFiles[3], xpath, ['windows8']); }); @@ -454,7 +454,7 @@ describe('windows project handler', function () { resourcefiles.forEach(function(resourceFile) { install(resourceFile, dummyPluginInfo, dummyProject); }); - var path = 'ItemGroup/Content'; + var path = 'ItemGroup/None'; var incText = computeResourcePath(resourcefiles[0]); var targetConditions = {versions: undefined, deviceTarget: undefined, arch: 'x86'}; validateUninstalledProjects('resource-file', resourcefiles[0], path, incText, targetConditions, ['all']); http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/adddd089/template/cordova/lib/JsprojManager.js ---------------------------------------------------------------------- diff --git a/template/cordova/lib/JsprojManager.js b/template/cordova/lib/JsprojManager.js index 21ee808..3bd7ac6 100644 --- a/template/cordova/lib/JsprojManager.js +++ b/template/cordova/lib/JsprojManager.js @@ -121,7 +121,7 @@ jsprojManager.prototype = { copyToOutputDirectory.text = 'Always'; children.push(copyToOutputDirectory); - var item = createItemGroupElement('ItemGroup/Content', sourcePath, targetConditions, children); + var item = createItemGroupElement('ItemGroup/None', sourcePath, targetConditions, children); this._getMatchingProjects(targetConditions).forEach(function (project) { project.appendToRoot(item); }); @@ -130,7 +130,7 @@ jsprojManager.prototype = { removeResourceFileFromProject: function (relPath, targetConditions) { events.emit('verbose', 'jsprojManager.removeResourceFile(relPath: ' + relPath + ', targetConditions: ' + JSON.stringify(targetConditions) + ')'); this._getMatchingProjects(targetConditions).forEach(function (project) { - project.removeItemGroupElement('ItemGroup/Content', relPath, targetConditions); + project.removeItemGroupElement('ItemGroup/None', relPath, targetConditions); }); }, --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org