Soumettre la recherche
Mettre en ligne
Ms build的初體驗
•
Télécharger en tant que PPTX, PDF
•
1 j'aime
•
480 vues
L
LearningTech
Suivre
Affichage du diaporama
Signaler
Partager
Affichage du diaporama
Signaler
Partager
1 sur 15
Télécharger maintenant
Recommandé
pyspider 介绍 - pycon2014@北京
pyspider 介绍 - pycon2014@北京
roybinux
百度前端性能监控与优化实践
百度前端性能监控与优化实践
Welefen Lee
第16章
第16章
paoapao
前端编译平台
前端编译平台
Welefen Lee
透過Nuget管理內部共用元件
透過Nuget管理內部共用元件
昱劭 劉
Multi thread 多執行緒程式設計(use c#)
Multi thread 多執行緒程式設計(use c#)
Gelis Wu
20131191 msbuild properties
20131191 msbuild properties
LearningTech
Ms build 触ってみよう
Ms build 触ってみよう
Oda Shinsuke
Recommandé
pyspider 介绍 - pycon2014@北京
pyspider 介绍 - pycon2014@北京
roybinux
百度前端性能监控与优化实践
百度前端性能监控与优化实践
Welefen Lee
第16章
第16章
paoapao
前端编译平台
前端编译平台
Welefen Lee
透過Nuget管理內部共用元件
透過Nuget管理內部共用元件
昱劭 劉
Multi thread 多執行緒程式設計(use c#)
Multi thread 多執行緒程式設計(use c#)
Gelis Wu
20131191 msbuild properties
20131191 msbuild properties
LearningTech
Ms build 触ってみよう
Ms build 触ってみよう
Oda Shinsuke
Nu get advanced
Nu get advanced
matthewosborn
20131104 basic msbuild by Anney
20131104 basic msbuild by Anney
LearningTech
Nuget
Nuget
Amir Barylko
Continuous Deployment
Continuous Deployment
wlscaudill
MSDN Live - CI using TFS11 & NuGet
MSDN Live - CI using TFS11 & NuGet
Xavier Decoster
2011 - Dotnet Information Day: NUGET
2011 - Dotnet Information Day: NUGET
Daniel Fisher
An overview of the NuGet ecosystem - Mobel.io
An overview of the NuGet ecosystem - Mobel.io
Maarten Balliauw
DevOps的神鬼奇航
DevOps的神鬼奇航
Edward Kuo
我們與Azure DevOps的距離
我們與Azure DevOps的距離
Edward Kuo
李成银:前端编译平台
李成银:前端编译平台
taobao.com
Java Build Tool course in 2011
Java Build Tool course in 2011
Ching Yi Chan
Git&Github Tutorial
Git&Github Tutorial
Ting Wen Su
Continuous Delivery with Ansible x GitLab CI (2e)
Continuous Delivery with Ansible x GitLab CI (2e)
Chu-Siang Lai
CICD Workshop 20180922
CICD Workshop 20180922
Earou Huang
前端也能變全端
前端也能變全端
ericpi Bi
02.uliweb开发入门
02.uliweb开发入门
modou li
Open source的devops工具箱 公開版@coscup2016
Open source的devops工具箱 公開版@coscup2016
Kirk Chen
開發工具與環境建置
開發工具與環境建置
Shengyou Fan
[2020 .NET Conf] 企業Azure DevOps Service 實際應用架構與秘辛
[2020 .NET Conf] 企業Azure DevOps Service 實際應用架構與秘辛
Edward Kuo
Intro to Git 投影片
Intro to Git 投影片
Tony Yeh
30 分鐘安裝 Drupal 企業網站
30 分鐘安裝 Drupal 企業網站
tripocom
面向未来的前端类库开发 — KISSY 类库构想与实践
面向未来的前端类库开发 — KISSY 类库构想与实践
taobao.com
Contenu connexe
En vedette
Nu get advanced
Nu get advanced
matthewosborn
20131104 basic msbuild by Anney
20131104 basic msbuild by Anney
LearningTech
Nuget
Nuget
Amir Barylko
Continuous Deployment
Continuous Deployment
wlscaudill
MSDN Live - CI using TFS11 & NuGet
MSDN Live - CI using TFS11 & NuGet
Xavier Decoster
2011 - Dotnet Information Day: NUGET
2011 - Dotnet Information Day: NUGET
Daniel Fisher
An overview of the NuGet ecosystem - Mobel.io
An overview of the NuGet ecosystem - Mobel.io
Maarten Balliauw
En vedette
(7)
Nu get advanced
Nu get advanced
20131104 basic msbuild by Anney
20131104 basic msbuild by Anney
Nuget
Nuget
Continuous Deployment
Continuous Deployment
MSDN Live - CI using TFS11 & NuGet
MSDN Live - CI using TFS11 & NuGet
2011 - Dotnet Information Day: NUGET
2011 - Dotnet Information Day: NUGET
An overview of the NuGet ecosystem - Mobel.io
An overview of the NuGet ecosystem - Mobel.io
Similaire à Ms build的初體驗
DevOps的神鬼奇航
DevOps的神鬼奇航
Edward Kuo
我們與Azure DevOps的距離
我們與Azure DevOps的距離
Edward Kuo
李成银:前端编译平台
李成银:前端编译平台
taobao.com
Java Build Tool course in 2011
Java Build Tool course in 2011
Ching Yi Chan
Git&Github Tutorial
Git&Github Tutorial
Ting Wen Su
Continuous Delivery with Ansible x GitLab CI (2e)
Continuous Delivery with Ansible x GitLab CI (2e)
Chu-Siang Lai
CICD Workshop 20180922
CICD Workshop 20180922
Earou Huang
前端也能變全端
前端也能變全端
ericpi Bi
02.uliweb开发入门
02.uliweb开发入门
modou li
Open source的devops工具箱 公開版@coscup2016
Open source的devops工具箱 公開版@coscup2016
Kirk Chen
開發工具與環境建置
開發工具與環境建置
Shengyou Fan
[2020 .NET Conf] 企業Azure DevOps Service 實際應用架構與秘辛
[2020 .NET Conf] 企業Azure DevOps Service 實際應用架構與秘辛
Edward Kuo
Intro to Git 投影片
Intro to Git 投影片
Tony Yeh
30 分鐘安裝 Drupal 企業網站
30 分鐘安裝 Drupal 企業網站
tripocom
面向未来的前端类库开发 — KISSY 类库构想与实践
面向未来的前端类库开发 — KISSY 类库构想与实践
taobao.com
KISSY Mechanism
KISSY Mechanism
lifesinger
[JCConf 2022] Compose for Desktop - 開發桌面軟體的新選擇
[JCConf 2022] Compose for Desktop - 開發桌面軟體的新選擇
Shengyou Fan
基于Seajs的项目构建
基于Seajs的项目构建
Zhang Xiaoxue
杨皓 新浪博客前端架构分享
杨皓 新浪博客前端架构分享
isnull
從軟體開發角度 談 Docker 的應用
從軟體開發角度 談 Docker 的應用
謝 宗穎
Similaire à Ms build的初體驗
(20)
DevOps的神鬼奇航
DevOps的神鬼奇航
我們與Azure DevOps的距離
我們與Azure DevOps的距離
李成银:前端编译平台
李成银:前端编译平台
Java Build Tool course in 2011
Java Build Tool course in 2011
Git&Github Tutorial
Git&Github Tutorial
Continuous Delivery with Ansible x GitLab CI (2e)
Continuous Delivery with Ansible x GitLab CI (2e)
CICD Workshop 20180922
CICD Workshop 20180922
前端也能變全端
前端也能變全端
02.uliweb开发入门
02.uliweb开发入门
Open source的devops工具箱 公開版@coscup2016
Open source的devops工具箱 公開版@coscup2016
開發工具與環境建置
開發工具與環境建置
[2020 .NET Conf] 企業Azure DevOps Service 實際應用架構與秘辛
[2020 .NET Conf] 企業Azure DevOps Service 實際應用架構與秘辛
Intro to Git 投影片
Intro to Git 投影片
30 分鐘安裝 Drupal 企業網站
30 分鐘安裝 Drupal 企業網站
面向未来的前端类库开发 — KISSY 类库构想与实践
面向未来的前端类库开发 — KISSY 类库构想与实践
KISSY Mechanism
KISSY Mechanism
[JCConf 2022] Compose for Desktop - 開發桌面軟體的新選擇
[JCConf 2022] Compose for Desktop - 開發桌面軟體的新選擇
基于Seajs的项目构建
基于Seajs的项目构建
杨皓 新浪博客前端架构分享
杨皓 新浪博客前端架构分享
從軟體開發角度 談 Docker 的應用
從軟體開發角度 談 Docker 的應用
Plus de LearningTech
vim
vim
LearningTech
PostCss
PostCss
LearningTech
ReactJs
ReactJs
LearningTech
Docker
Docker
LearningTech
Semantic ui
Semantic ui
LearningTech
node.js errors
node.js errors
LearningTech
Process control nodejs
Process control nodejs
LearningTech
Expression tree
Expression tree
LearningTech
SQL 效能調校
SQL 效能調校
LearningTech
flexbox report
flexbox report
LearningTech
Vic weekly learning_20160504
Vic weekly learning_20160504
LearningTech
Reflection & activator
Reflection & activator
LearningTech
Peggy markdown
Peggy markdown
LearningTech
Node child process
Node child process
LearningTech
20160415ken.lee
20160415ken.lee
LearningTech
Peggy elasticsearch應用
Peggy elasticsearch應用
LearningTech
Expression tree
Expression tree
LearningTech
Vic weekly learning_20160325
Vic weekly learning_20160325
LearningTech
D3js learning tips
D3js learning tips
LearningTech
git command
git command
LearningTech
Plus de LearningTech
(20)
vim
vim
PostCss
PostCss
ReactJs
ReactJs
Docker
Docker
Semantic ui
Semantic ui
node.js errors
node.js errors
Process control nodejs
Process control nodejs
Expression tree
Expression tree
SQL 效能調校
SQL 效能調校
flexbox report
flexbox report
Vic weekly learning_20160504
Vic weekly learning_20160504
Reflection & activator
Reflection & activator
Peggy markdown
Peggy markdown
Node child process
Node child process
20160415ken.lee
20160415ken.lee
Peggy elasticsearch應用
Peggy elasticsearch應用
Expression tree
Expression tree
Vic weekly learning_20160325
Vic weekly learning_20160325
D3js learning tips
D3js learning tips
git command
git command
Ms build的初體驗
1.
MsBuild的初體驗 2013.08.30 Bryan Lin
2.
Agenda • Why MsBuild? •
認識MsBuild • 範例實作
3.
Why MsBuild? • 當我們要發佈站台的時候: •
取得最新版本 • 所有程式都要Build過 • 更改設定 • …(其他步驟) • 產出檔案要publish至對應的目錄
4.
Why MsBuild? • 有這麼多步驟要做,而且要分別執行,很麻煩。 •
有沒有一個方法只執行一次就做完所有動作? • 就是MsBuild了!
5.
認識MsBuild • MsBuild是什麼?能做到那些事情? • 是一個Xml格式的文件 •
裡面描述了專案所包含的檔案有哪些,建置的設定等等資訊(ex. *.csproj檔案) • 也可以使用MsBuild來撰寫建置站台所需要的流程
6.
認識MsBuild • MsBuild的基本框架 • MsBuild的內容其實是由一個Project包含著多個Target所組合而成, 再依照參數的不同來決定將會執行那些Target •
範例如下: <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/deve loper/msbuild/2003"> <Target Name="Build"> <Message Text="Hello Msbuild!" /> </Target> </Project>
7.
認識MsBuild • 在專案檔中我們指定了預設執行的Target為Build, 在Build之中執行了顯示訊息的任務 • 執行方式:在Visiual
Stuiod Cmd中,執行MsBuild <你的Build檔案> • 在畫面上輸出Hello Msbuild!
8.
認識MsBuild • 想執行多個任務,範例如下:
9.
認識MsBuild <?xml version="1.0" encoding="utf-8"?> <Project
DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Target Name="Build"> <CallTarget Targets="Step 1"/> <CallTarget Targets="Step 2"/> </Target> <Target Name="Step 1"> <Message Text="Step 1" /> </Target> <Target Name="Step 2"> <Message Text="Step 2" /> </Target> </Project>
10.
認識MsBuild • 想要了解更多有關MsBuild的資訊? • 請洽http://msdn.microsoft.com/zh-tw/library/dd393574.aspx
11.
範例實作 • 取得目前專案的ChangeSet,並將此ChangeSet寫入AssemblyVersion
12.
範例實作 <?xml version="1.0" encoding="utf-8"?> <Project
ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <ProjectSourceControl>./</ProjectSourceControl> <VersionTextPath>version.txt</VersionTextPath> <MajorVersion Condition="$(MajorVersion) == ''">8</MajorVersion> <MinorVersion Condition="$(MinorVersion) == ''">1</MinorVersion> <ProgramFiles32 Condition="$(ProgramW6432) != ''">C:Program Files (x86)</ProgramFiles32> <ProgramFiles32 Condition="$(ProgramFiles32) == ''">C:Program Files</ProgramFiles32> <VS10Dir>$(ProgramFiles32)Microsoft Visual Studio 10.0</VS10Dir> <VS11Dir>$(ProgramFiles32)Microsoft Visual Studio 11.0</VS11Dir> <TF Condition="Exists('$(VS10Dir)')">"$(VS10Dir)Common7IDETF.exe"</TF> <TF Condition="Exists('$(VS11Dir)')">"$(VS11Dir)Common7IDETF.exe"</TF> </PropertyGroup>
13.
範例實作(續) <Target Name="GetVersion" BeforeTargets="Build"
Condition="$(Configuration.Contains('Release'))"> <Message Text="***************** $(Configuration)" Importance="high" /> <Exec Command="$(TF) history /stopafter:1 /noprompt /recursive $(ProjectSourceControl) > $(VersionTextPath)"/> <PropertyGroup> <VersionContent>$([System.IO.File]::ReadAllText('$(VersionTextPath)'))</VersionContent> <CurrentVersion>$([System.Text.RegularExpressions.Regex]::Match($(VersionContent), '*?s*(?<version>d+)s*(S*)?s*((?<year>d{4})/(?<month>d{0,2})/(?<day>d{0,2})).*?$').Groups["version"].Value)</CurrentVersion> <CurrentVersionYear>$([System.Text.RegularExpressions.Regex]::Match($(VersionContent), '*?s*(?<version>d+)s*(S*)?s*((?<year>d{4})/(?<month>d{0,2})/(?<day>d{0,2})).*?$').Groups["year"].Value)</CurrentVersionYear> <CurrentVersionMonth>$([System.Text.RegularExpressions.Regex]::Match($(VersionContent), '*?s*(?<version>d+)s*(S*)?s*((?<year>d{4})/(?<month>d{0,2})/(?<day>d{0,2})).*?$').Groups["month"].Value)</CurrentVersionMonth> <CurrentVersionDay>$([System.Text.RegularExpressions.Regex]::Match($(VersionContent), '*?s*(?<version>d+)s*(S*)?s*((?<year>d{4})/(?<month>d{0,2})/(?<day>d{0,2})).*?$').Groups["day"].Value)</CurrentVersionDay> <CurrentDate>$([System.DateTime]::Today.ToString("MMdd"))</CurrentDate> <AssemblyVersion>$(MajorVersion).$(MinorVersion).$(CurrentVersion).$(CurrentVersionMonth)$(CurrentVersionDay)</AssemblyVersion> </PropertyGroup>
14.
範例實作(續) <Delete Files="$(VersionTextPath)" /> <Message
Text="***************** $(AssemblyVersion)" Importance="high" /> <Exec Command="ATTRIB -R $(ProjectDir)PropertiesVersionInfo.cs" /> <WriteLinesToFile Condition=" '$(AssemblyVersion)' != '' " File="$(ProjectDir)PropertiesVersionInfo.cs" Overwrite="True" Lines="[assembly: System.Reflection.AssemblyVersion("$(AssemblyVersion)")] [assembly: System.Reflection.AssemblyFileVersion("$(AssemblyVersion)")]" /> </Target> </Project>
15.
參考資料 http://msdn.microsoft.com/zh-tw/library/dd393574.aspx http://ithelp.ithome.com.tw/question/10107277?tag=ithome.nq
Télécharger maintenant