If the code is cordova, try this:
Microsoft.VisualStudio.WJProject.Default.props cannot be found. error MSB4019
Enter in the platform/windows/cordova/lib
, open the msbuildtools
with notepad, and edit this part:
var versions = ['15.0', '14.0', '12.0', '4.0'];
with your versions you have.
For example will remove the 15 and 14 in the two functions
var versions = ['12.0', '4.0'];
and remove the || versions[2] || versions[3]
in this line
var msbuildTools = versions[0] || versions[1] || versions[2] || versions[3];
module.exports.findAvailableVersion = function () {
var versions = ['15.0', '14.0', '12.0', '4.0'];
return Q.all(versions.map(checkMSBuildVersion)).then(function (versions) {
// select first msbuild version available, and resolve promise with it
var msbuildTools = versions[0] || versions[1] || versions[2] || versions[3];
return msbuildTools ? Q.resolve(msbuildTools) : Q.reject('MSBuild tools not found');
});
};
function findAllAvailableVersionsFallBack() {
var versions = ['15.0', '14.0', '12.0', '4.0'];
events.emit('verbose', 'Searching for available MSBuild versions...');
return Q.all(versions.map(checkMSBuildVersion)).then(function(unprocessedResults) {
return unprocessedResults.filter(function(item) {
return !!item;
});
});
}
VisualStudioVersion = 15.0.26228.9
I get this error instead:MSB4132: The tools version "15.0" is unrecognized. Available tools versions are "12.0", "14.0", "2.0", "3.5", "4.0".
I really hope that somebody has a solution for this. (Maybe it's fixed "automagically" in the next VS2017 update.) – RanunculaceousProjectCollection
) programmatically and not via the command line, you have to copy the redirected assembly versions from MSBuild to the.config
of your application. Just go toC:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe.config
and copy the whole<runtime>
element in your.config
. (And maybe also change the file paths in theWorkaround
section.) This tells MSBuild to use version 15 instead of something older. (At least this worked with the VS2017 Relase.) – Ranunculaceous