• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

fluffynuts/gulp-msbuild: msbuild plugin for gulp

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

hoffi/gulp-msbuild

开源软件地址(OpenSource Url):

https://github.com/fluffynuts/gulp-msbuild

开源编程语言(OpenSource Language):

JavaScript 100.0%

开源软件介绍(OpenSource Introduction):

gulp-msbuild

NPM NPM downloads Travis Coveralls David License

This plugin was blacklisted in the official gulp plugin directory, for apparently not following the Gulp Guidelines. C'est la vie. Being able to .src some solutions and pipeline through an msbuild process seems like a good thing to me.

Contributions welcome.

Usage

First, install gulp-msbuild as a development dependency:

npm install --save-dev gulp-msbuild

Then, add it to your gulpfile.js:

var gulp = require("gulp");
var msbuild = require("gulp-msbuild");

gulp.task("default", function() {
	return gulp.src("./project.sln")
		.pipe(msbuild());
});

Options

If you miss any options, feel free to open an issue.

Example

var gulp = require("gulp");
var msbuild = require("gulp-msbuild");

gulp.task("default", function() {
	return gulp.src("./project.sln")
		.pipe(msbuild({
			targets: ['Clean', 'Build'],
			toolsVersion: 3.5
			})
		);
});

stdout

Show output of msbuild

Default: false

stderr

Show errors of msbuild

Default: true

errorOnFail

If the MSBuild job fails with an error, this will cause the gulp-msbuild stream to return an error thus causing the gulp task to fail. This is useful if using an automated build server such as Jenkins where a failing MSBuild should also cause the overall build job to fail.

Default: false

logCommand

Logs the msbuild command that will be executed.

Default: false

targets

Specify Build Targets

Default:

['Rebuild']

configuration

Specify Build Configuration (Release or Debug)

Default: Release

Hint: You can also specify the Build Configuration using the properties option

properties: { Configuration: 'Debug' }

solutionPlatform

Specify the Solution Platform (e.g. x86, x64, AnyCPU)

Hint: You can also specify the Solution Platform using the properties option

properties: { Platform: 'AnyCPU' }

toolsVersion

Specify the .NET Tools-Version

Default: 4.0

Possible Values: 1.0, 1.1, 2.0, 3.5, 4.0, 12.0, 14.0, 15.0, 'auto'

'auto' attempts to find the latest version >= 12.0, with a fallback to 4.0

This parameter can be omitted by explicitely set them to null or undefined.

architecture

Specify the Architecture

Default: Auto-detected

Possible Values: x86, x64

Example:

msbuild({ architecture: 'x86' })

properties

Specify Custom Build Properties

Default: none

Example:

msbuild({ properties: { WarningLevel: 2 } })

Hint: Property values can use lodash.template templates (e.g. "<%= file.path %>")

verbosity

Specify the amount of information to display in the build output

Default: normal

Possible Values: quiet, minimal, normal, detailed, diagnostic

maxcpucount

Specify Maximal CPU-Count to use

Default: 0 = Automatic selection

Possible Values: -1 (MSBuild Default), 0 (Automatic), > 0 (Concrete value)

nodeReuse

Specify whether to enable or disable the re-use of MSBuild nodes

Default: true = Nodes remain after the build finishes so that subsequent builds can use them

Possible Values: true (MSBuild Default), false

nologo

Suppress Startup Banner and Copyright Message of MSBuild

Default: false -> Show Startup Banner and Copyright Message

fileLoggerParameters

Specify the parameters for the MSBuild File Logger.

Default: None

Example:

msbuild({ fileLoggerParameters: 'LogFile=Build.log;Append;Verbosity=diagnostic' })

Hint: Logger parameters options can use lodash.template templates (e.g. "<%= file.path %>")

consoleLoggerParameters

Specify the parameters for the MSBuild Console Logger. (See fileLoggerParameters for a usage example)

Default: None

Hint: Logger parameters options can use lodash.template templates (e.g. "<%= file.path %>")

loggerParameters

Specify the parameters for a custom MSBuild Logger.

Default: None

Example:

msbuild({ loggerParameters: 'XMLLogger,./MyLogger.dll;OutputAsHTML' })

Hint: Logger parameters options can use lodash.template templates (e.g. "<%= file.path %>")

customArgs

Specify custom msbuild arguments, which don't have a own property in gulp-msbuild.

Default: None

Example:

msbuild({ customArgs: ['/noautoresponse'] })

emitEndEvent

Specify if a gulp end-event should be emitted.

Default: false = No end event is emitted.

Possible Values: true, false

MSBuild Command-Line Reference

For a more detailed description of each MSBuild Option see the MSBuild Command-Line Reference

License

MIT License




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap