Comments (7)
I believe the problem is here at lib/msbuild-finder.js
var version = constants.MSBUILD_VERSIONS[options.toolsVersion];
if (!version) {
throw new PluginError(constants.PLUGIN_NAME, 'No MSBuild Version was supplied!');
}
var is64Bit = options.architecture === 'x64';
if (version === '12.0' || version === '14.0') {
// On 64-bit systems msbuild is always under the x86 directory. If this
// doesn't exist we are on a 32-bit system. See also:
// https://blogs.msdn.microsoft.com/visualstudio/2013/07/24/msbuild-is-now-part-of-visual-studio/
var env_var_dir = process.env['ProgramFiles(x86)'] || process.env['ProgramFiles'];
var pathRoot = env_var_dir || path.join('C:', is64Bit ? 'Program Files (x86)' : 'Program Files');
var x64_dir = is64Bit ? 'amd64' : '';
return path.join(pathRoot, 'MSBuild', version, 'Bin', x64_dir, 'MSBuild.exe');
}
I believe we should be allowed specify the env_var_dir. Possibly being able to specify it as an option.
from gulp-msbuild.
Hm shouldn't it help to pass the correct toolsVersion
and VisualStudioVersion
-Property to gulp-msbuild? Like:
gulp_msbuild({
toolsVersion: 14.0,
properties: { VisualStudioVersion: 14.0 },
targets: ["Build"]
});
This should use the MSBuild executable at C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe
from gulp-msbuild.
aah I see i will try again the architecture to be x86
I confused this with Platform property 😓
from gulp-msbuild.
@hoffi it worked 😄 thank you so much, this is embarassing, it was my bad i confused architecture option with the Platform property.
Thanks a lot for the help and open sourcing this great library 😄
from gulp-msbuild.
closing this issue, my misunderstanding when using the library
from gulp-msbuild.
Just adding one note
I have to specify the VisualStudioVersion as a string 😄
so it will be something like this
gulp_msbuild({
toolsVersion: 14.0,
properties: { VisualStudioVersion: '14.0' },
targets: ["Build"]
});
from gulp-msbuild.
No problem :)
from gulp-msbuild.
Related Issues (20)
- SolutionPlatform option not defined in constants. HOT 1
- Default path to msbuild no longer valid after VS2017 install HOT 5
- VS 2017 Developer Command Prompt finds msbuild 14.0 HOT 10
- msbuild fails on multi-cpu machine when maxcpucount = 0 or > 1 HOT 2
- `toolsVersion: 15.0` fails to find msbuild, after looking in amd64 folder HOT 4
- Error: no writecb in Transform class HOT 4
- Gulp stream does not return if there are no errors and emitPublishedFiles: false HOT 2
- Fails to locate correct MSBuild when building database project using SSDT for VS 2017 HOT 4
- Build fails on Mac when Visual Studio for Mac installed HOT 4
- msBuildFromWhere Returns Path to TestAgent if Visual Studio Test Agent product is installed HOT 1
- AMD64 MSBuild tools can cause build problems with UWP apps
- "end" event no longer emitted
- gulp msbuild isn't considering the preview release of visual studio
- emitPublishedFiles undefined in the documentation
- Please make "targets" optional
- gulp has blacklisted gulp-msbuild HOT 5
- dll cannot be copied because it is used by another process
- MS Build in VS2019 folder not supported HOT 1
- Better way to find msbuild
- Msbuild does not build after error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gulp-msbuild.