久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

如何將 msbuild 升級到 C# 6?

How to upgrade msbuild to C# 6?(如何將 msbuild 升級到 C# 6?)
本文介紹了如何將 msbuild 升級到 C# 6?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我想在我的項目中使用 C# 6(空傳播,其他功能).

I want to use C# 6 in my project (null propagation, other features).

我已經(jīng)在我的 PC 上安裝了 VS 2015,它運行良好,可以構(gòu)建類似的測試代碼

I've installed VS 2015 on my PC and it works brilliantly and builds test code like

var user = new SingleUserModel(); //all model fields are null
var test = user.User?.Avatar?["blah"];

但是當(dāng)我將我的項目推送到 repo 并且 CI 開始構(gòu)建它時,由于 ? 不受支持,構(gòu)建失敗.

But when I push my project to the repo and CI starts to build it, build fails because of unsupported ?.

我也在 CI 服務(wù)器上安裝了 VS2015,但看起來它并沒有使用它.我能做什么?

I've installed VS2015 on CI server too but looke like it doesn't use it. What can I do?

CI - CruiseControl .NET使用 C:WindowsMicrosoft.NETFrameworkv4.0.30319MSBuild.exe

CI - CruiseControl .NET Builds with C:WindowsMicrosoft.NETFrameworkv4.0.30319MSBuild.exe

推薦答案

一定要調(diào)用:

C:Program Files (x86)MSBuild14.0BinMsBuild.exe

這是 Visual Studio 2015 附帶的 MsBuild 版本,它調(diào)用理解這一點的 C# 編譯器.您可以通過安裝任何版本的 Visual Studio 2015 或安裝獨立的 Microsoft 構(gòu)建工具 2015.

That's the version of MsBuild that ships with Visual Studio 2015 and calls the C# compiler that understands this. You can get this version of MsBuild on your system by installing any edition of Visual Studio 2015 or by installing the stand-alone Microsoft Build Tools 2015.

添加對以下 NuGet 包的引用也會強制使用新編譯器:

Adding a reference to the following NuGet package will also force use of the new compiler:

Install-Package Microsoft.Net.Compilers

請注意,Install-Package 將選擇最新的可用版本,它可能不是您正在尋找的版本.在安裝之前,請檢查發(fā)行說明和依賴項以解決正在處理的版本的潛在問題,在這種情況下,它更特定于 VS 2015.

Please note Install-Package will pick the latest available version which may not be the one you are looking for. Before you install, please check the release notes and dependencies to resolve the underlying issue with the version being dealt with, which in this case, was more specific to VS 2015.

所以對于 Visual Studio 2015:

So for Visual Studio 2015:

Install-Package Microsoft.Net.Compilers -Version 1.0.0

這篇關(guān)于如何將 msbuild 升級到 C# 6?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

Is there a C# library that will perform the Excel NORMINV function?(是否有執(zhí)行 Excel NORMINV 函數(shù)的 C# 庫?)
Select x random elements from a weighted list in C# (without replacement)(從 C# 中的加權(quán)列表中選擇 x 個隨機元素(無需替換))
Create a summary description of a schedule given a list of shifts(給定輪班列表,創(chuàng)建時間表的摘要描述)
C# Normal Random Number(C# 普通隨機數(shù))
Standard deviation of generic list?(通用列表的標(biāo)準(zhǔn)偏差?)
AsyncCTP: Creating a class that is IAwaitable(AsyncCTP:創(chuàng)建一個 IAwaitable 的類)
主站蜘蛛池模板: 婷婷六月天 | 黄色免费片 | 一级特黄妇女高潮 | 波多野吉衣一二三区乱码 | 在线观看一区 | 在线不欧美 | 182tv午夜| 91中文| 日韩精品视频在线播放 | 无套内谢的新婚少妇国语播放 | 五月在线视频 | 一级免费毛片 | 福利小视频在线观看 | 日韩av在线免费看 | 伊人999| 欧美日韩成人在线 | 成人毛片在线观看 | 韩国三级中文字幕hd久久精品 | 日本三级视频在线观看 | 91白浆 | 色伊伊| 成人动漫免费观看 | a级黄毛片| 欧美日韩国产精品 | www.草逼| 91视频色 | 婷婷激情五月 | 在线观看网址你懂的 | www一级片| 欧美专区第一页 | 久久一区二区视频 | 天天做天天干 | 日韩免费大片 | 免费视频一区 | 国产黄色片在线观看 | 一区二区三区国产精品 | 天堂成人在线 | 欧美中文字幕 | 99在线精品视频 | 深夜福利网址 | 久草青青草 |