簡體   English   中英

Visual Studio如何確定項目的C#版本以及它的存儲位置?

[英]How does Visual Studio determine the C# version for a project and where is it stored?

最近,我從“項目”屬性的“生成”部分的“高級”選項更改了語言版本。 我將其從5.0更改為6.0。 該項目的目標框架是.Net 4.6.2。 項目文件已簽出,但沒有發現任何區別。 此信息存儲在哪里? 如果.csproj文件中沒有任何更改,Visual Studio如何識別語言版本?

您是在錯誤假設csproj文件未更改的情況下工作的。 嘗試按保存,您將在其中看到區別,如下所示:

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <LangVersion>6</LangVersion> <!-- This line -->
</PropertyGroup>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM