久久久久久久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 | 久久精品99久久 | 国产女人第一次做爰毛片 | 国产精品免费看 | 亚洲3级 | 欧美一区成人 | 亚洲欧美一区二区三区视频 | 国产高潮好爽受不了了夜色 | 国产一区久久久 | 蜜月aⅴ免费一区二区三区 99re在线视频 | 国产精品久久久久一区二区三区 | 在线黄色网 | av在线免费观看网址 | 亚洲综合色站 | 成年人免费在线视频 | 久草网站 | 中文字幕免费在线 | 精品美女久久久 | 91av视频| 中文字幕精品一区二区三区精品 | 农夫在线精品视频免费观看 | 岛国一区| 中文字幕国产 | 欧洲视频一区二区 | 午夜在线影院 | 国产日韩欧美在线观看 | www.色综合| 国产偷久久一级精品60部 | 亚洲视频www | 亚洲不卡在线观看 | 伊人免费在线观看 | av免费网| 日本不卡一区二区三区 | 国产伦精品一区二区三毛 | 综合第一页 | 伊人91在线 | 一区中文 | 成在线人视频免费视频 | 成人高清在线视频 | 91成人免费看| 日日久 |