Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Use the newer AppDeployCmd when available
The old XapDeployCmd could raise "Error: The parameter is incorrect." with project files that were opened with more recent versions of Visual Studio.
This change looks for the Windows Phone SDK 8.1 AppDeployCmd before falling back to the WP SDK 8.0 XapDeployCmd.
  • Loading branch information
oliversalzburg committed Dec 15, 2014
1 parent 6bb3fc3 commit d292b80a69d302280eef940b5ee816bd8e2d7d2c
Showing 1 changed file with 9 additions and 1 deletion.
@@ -23,8 +23,16 @@ var Q = require('Q'),
proc = require('child_process'),
msbuildTools = require('./MSBuildTools');

// returns path to XapDeploy util from Windows Phone 8.1 SDK
// returns path to app deployment util from Windows Phone 8.x SDK
module.exports.getXapDeploy = function () {
// Try the newer AppDeploy first
var appDeployUtils = path.join((process.env["ProgramFiles(x86)"] || process.env["ProgramFiles"]),
'Microsoft SDKs', 'Windows Phone', 'v8.1', 'Tools', 'AppDeploy', 'AppDeployCmd.exe');
if (fs.existsSync(appDeployUtils)) {
return Q.resolve(appDeployUtils);
}

// If AppDeployCmd wasn't found, try XapDeployCmd
var xapDeployUtils = path.join((process.env["ProgramFiles(x86)"] || process.env["ProgramFiles"]),
'Microsoft SDKs', 'Windows Phone', 'v8.0', 'Tools', 'Xap Deployment', 'XapDeployCmd.exe');
// Check if XapDeployCmd is exists

0 comments on commit d292b80

Please sign in to comment.