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

如何將 msbuild 升級到 C# 6?

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

問題描述

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

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

我已經在我的 PC 上安裝了 VS 2015,它運行良好,可以構建類似的測試代碼

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"];

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

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

我也在 CI 服務器上安裝了 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

推薦答案

一定要調用:

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

這是 Visual Studio 2015 附帶的 MsBuild 版本,它調用理解這一點的 C# 編譯器.您可以通過安裝任何版本的 Visual Studio 2015 或安裝獨立的 Microsoft 構建工具 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 將選擇最新的可用版本,它可能不是您正在尋找的版本.在安裝之前,請檢查發行說明和依賴項以解決正在處理的版本的潛在問題,在這種情況下,它更特定于 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

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

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

相關文檔推薦

Is there a C# library that will perform the Excel NORMINV function?(是否有執行 Excel NORMINV 函數的 C# 庫?)
Select x random elements from a weighted list in C# (without replacement)(從 C# 中的加權列表中選擇 x 個隨機元素(無需替換))
Create a summary description of a schedule given a list of shifts(給定輪班列表,創建時間表的摘要描述)
C# Normal Random Number(C# 普通隨機數)
Standard deviation of generic list?(通用列表的標準偏差?)
AsyncCTP: Creating a class that is IAwaitable(AsyncCTP:創建一個 IAwaitable 的類)
主站蜘蛛池模板: 午夜精品一区二区三区在线观看 | 亚洲一区二区黄 | 中文字幕av网站 | 成人av在线播放 | 日本久久精品视频 | 男女激情网站免费 | 国产精品久久久久久吹潮 | 精品欧美一区二区精品久久 | 日韩中出| 午夜影院在线观看 | 蜜桃av鲁一鲁一鲁一鲁 | 在线 丝袜 欧美 日韩 制服 | 成人国产精品久久 | 激情伊人网 | 天天干天天草 | 国产精品精品久久久久久 | 久久99深爱久久99精品 | 五月激情综合 | 国产精品久久久久久久久久免费看 | 国产成人网 | 天天综合日日夜夜 | 亚洲成人精品免费 | 国产精品国产精品国产专区不卡 | 欧美精品在线一区 | 久久亚洲欧美日韩精品专区 | 人人擦人人干 | 久久精品亚洲精品国产欧美 | 亚洲一区二区三区四区视频 | 日韩视频在线一区 | 人人爽日日躁夜夜躁尤物 | 色天天综合 | 亚洲精品日本 | 亚洲欧美日韩中文在线 | 欧美成人黄色小说 | 国产美女免费视频 | 高清一区二区三区 | 久久久久免费精品国产 | 国产激情一区二区三区 | 真人女人一级毛片免费播放 | 黄色在线网站 | 国产精品视频一区二区三 |