Giter Site home page Giter Site logo

Comments (7)

Shuliyey avatar Shuliyey commented on August 26, 2024

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.

hoffi avatar hoffi commented on August 26, 2024

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.

Shuliyey avatar Shuliyey commented on August 26, 2024

aah I see i will try again the architecture to be x86

I confused this with Platform property 😓

from gulp-msbuild.

Shuliyey avatar Shuliyey commented on August 26, 2024

@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.

Shuliyey avatar Shuliyey commented on August 26, 2024

closing this issue, my misunderstanding when using the library

from gulp-msbuild.

Shuliyey avatar Shuliyey commented on August 26, 2024

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.

hoffi avatar hoffi commented on August 26, 2024

No problem :)

from gulp-msbuild.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.