Error MSB4062: The “SetEnv” task could not be loaded from the assembly

I have a rather similar issue, and got stock at the same point. I found two possible solutions over here:

  • install Visual Studio 2015 as well
  • create .config file in the same dir as your exe (if you don't have it already) containing binding redirection of msbuild assemblies

The first option works for me:

  • use an administrator prompt from the current user, don't elevate from a limited user, the paths will be a mess if you do that
  • npm install --global --production --vs2015 windows-build-tools
  • npm install --global --production windows-build-tools (this one gets stuck during the installation, ctrl-c to end it)
  • npm install --global --production windows-build-tools (yes, the same command again to finish the configuration)
  • npm config set msvs_version 2015 --global

Since I'm not a real programmer I wouldn't know where to begin for the latter option.