Git Product home page Git Product logo

Comments (11)

af4jm avatar af4jm commented on August 16, 2024 2

Found a work-around for situations where VS2017 is also installed, which is to force gulp to use 2017 instead of 2019... in node_modules\gulp-msbuild\lib\msbuild-finder.js line 14 (parameter list for the call to vswhere.exe)... change '-latest' to '-version', '[15.0,16.0)'

from habitat.

af4jm avatar af4jm commented on August 16, 2024 1

Proposed solution: abandon gulp-msbuild in favor of msbuild (https://github.com/jhaker/nodejs-msbuild)

from habitat.

cassidydotdk avatar cassidydotdk commented on August 16, 2024 1

Instead of Gulp-Msbuild use the following
var _msBuild = require('msbuild');
var msbuild = new _msBuild();

The existing process loops through .csproj files however and builds them individually. If you switch to build on a .SLN level, project dependencies need to be configured.

Not necessarily saying this is a problem, just raising awareness :)

from habitat.

nickwesselman avatar nickwesselman commented on August 16, 2024

I have Visual Studio 2019 installed (and still VS17) and cannot reproduce this on the master branch. The default buildToolsVersion in the gulp-config is 15.0.

As announced at SUGCON, Habitat is being retired in favor of a new set of examples, which will likely be 100% MSBuild based with no use of gulp. So we do not plan on any significant changes to the gulp scripts at this time.

We will be doing a small maintenance release for Sitecore 9.2, so if there is an adjustment to the existing scripts that needs to happen that might be possible. Can you identify any additional differences between your scripts and the those on the master branch?

from habitat.

af4jm avatar af4jm commented on August 16, 2024

Great to hear the sample will be gulp-free (fingers crossed it won't need NPM either), we've been considering trying to rid ourselves of Gulp once our hired Sitecore consultants hand off after go live.

When I ran into this I didn't notice any differences around how it calls gulp-msbuild, but I will try to make some time in the next day or 2 to revisit. Unfortunately my successful work-around involved modifying a line of code in gulp-msbuild, which is quite inconvenient since it's NPM-controlled.

from habitat.

hoquem1 avatar hoquem1 commented on August 16, 2024

Instead of Gulp-Msbuild use the following
var _msBuild = require('msbuild');
var msbuild = new _msBuild();

from habitat.

af4jm avatar af4jm commented on August 16, 2024

@hoquem1 that was my initial idea, but the trick is figuring out what else in gulpfile.js also needs to change.. it would be great if one was a drop-in replacement for the other, but it's not... at this point we're likely to try to convert it to straight-up msbuild, no node & no gulp... but not until the 3rd party consultants complete hand-off after go-live (we've got dev, qa, & uat, as well as blue-green with staging & prod, so the risk is relatively low

from habitat.

hoquem1 avatar hoquem1 commented on August 16, 2024

@af4jm take a look at this blog I created. Hopefully this will help you.
http://mohammadhoque.com/?p=296

from habitat.

hoquem1 avatar hoquem1 commented on August 16, 2024

@cassidydotdk
I didn't have to manually do that. It respected the dependency graph from solution file. Now that being said, just because I didn't run into an issue, I can't guarantee that it doesn't exists. I like the fact that someone else was thinking about the same issue as I was :)

from habitat.

nickwesselman avatar nickwesselman commented on August 16, 2024

Approach using require('msbuild') from @cassidydotdk:

https://gist.github.com/cassidydotdk/d2c72096ee0a1b5cf1e542ee108ce024

from habitat.

nickwesselman avatar nickwesselman commented on August 16, 2024

This is resolved in v1.8 by switching to require('msbuild') ... thanks for the report and the suggested fixes everyone.

from habitat.

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.