Skip to content

Commit

Permalink
Change LangVersion to be 11 (#2184)
Browse files Browse the repository at this point in the history
Downlevel "latest" maps to pre-11. In the future, we'll want to either keep this up-to-date (e.g. update it to 12 when .NET 8 ships) or change it to preview, which will always be up-to-date.
  • Loading branch information
stephentoub authored Jul 27, 2023
1 parent f1f7f12 commit f2e0763
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion build/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(SrcTargets)</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">$(SrcStandardTargets)</TargetFrameworks>
<NetStandardImplicitPackageVersion>$(NetStandardVersion)</NetStandardImplicitPackageVersion>
<LangVersion>7.3</LangVersion>
<LangVersion>11</LangVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<AssemblyName>Microsoft.IdentityModel.KeyVaultExtensions</AssemblyName>
<Description>Includes types that provide support for signing and encrypting tokens with Azure Key Vault.</Description>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<LangVersion>latest</LangVersion>
<PackageId>Microsoft.IdentityModel.KeyVaultExtensions</PackageId>
<TargetFrameworks Condition="'$(TargetNet8)' == 'True'">netstandard2.0;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks Condition="'$(TargetNet8)' != 'True'">netstandard2.0;net6.0</TargetFrameworks>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<Description>Includes types that provide support for signing and encrypting tokens with Azure Key Vault for
Applications that are using Managed identities for Azure resources.</Description>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<LangVersion>latest</LangVersion>
<PackageId>Microsoft.IdentityModel.ManagedKeyVaultSecurityKey</PackageId>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<PackageTags>.NET;Windows;Authentication;Identity;Azure;Key;Vault;Extensions</PackageTags>
Expand All @@ -31,4 +30,4 @@
<ProjectReference Include="..\Microsoft.IdentityModel.KeyVaultExtensions\Microsoft.IdentityModel.KeyVaultExtensions.csproj" />
</ItemGroup>

</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ internal virtual void AddQClaim(Dictionary<string, object> payload, SignedHttpRe
if (!firstQueryParam)
stringBuffer.Append("&");

stringBuffer.Append($"{queryParam.Key}={queryParam.Value}");
stringBuffer.Append(queryParam.Key).Append('=').Append(queryParam.Value);

queryParamNameList.Add(queryParam.Key);
firstQueryParam = false;
Expand Down Expand Up @@ -342,7 +342,7 @@ internal virtual void AddHClaim(Dictionary<string, object> payload, SignedHttpRe
if (!firstHeader)
stringBuffer.Append(_newlineSeparator);

stringBuffer.Append($"{headerName}: {header.Value}");
stringBuffer.Append(headerName).Append(": ").Append(header.Value);
firstHeader = false;
}

Expand Down Expand Up @@ -847,7 +847,7 @@ internal virtual void ValidateQClaim(JsonWebToken signedHttpRequest, SignedHttpR
if (!firstQueryParam)
stringBuffer.Append("&");

stringBuffer.Append($"{queryParamName}={queryParamsValue}");
stringBuffer.Append(queryParamName).Append('=').Append(queryParamsValue);
firstQueryParam = false;

// remove the query param from the dictionary to mark it as covered.
Expand Down Expand Up @@ -915,7 +915,7 @@ internal virtual void ValidateHClaim(JsonWebToken signedHttpRequest, SignedHttpR
if (!firstHeader)
stringBuffer.Append(_newlineSeparator);

stringBuffer.Append($"{headerName}: {headerValue}");
stringBuffer.Append(headerName).Append(": ").Append(headerValue);
firstHeader = false;

// remove the header from the dictionary to mark it as covered.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageId>Microsoft.IdentityModel.Tokens</PackageId>
<PackageTags>.NET;Windows;Authentication;Identity;SecurityTokens;Cryptographic operations;Signing;Verifying Signatures;Encryption</PackageTags>
<LangVersion>latest</LangVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<DelaySign>true</DelaySign>
<Description>Tests for Microsoft.IdentityModel.KeyVaultExtensions</Description>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<LangVersion>latest</LangVersion>
<PackageId>Microsoft.IdentityModel.KeyVaultExtensions.Tests</PackageId>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<Import Project="..\..\build\commonTest.props" />

Expand All @@ -8,7 +8,6 @@
<DelaySign>true</DelaySign>
<Description>Tests for Microsoft.IdentityModel.ManagedKeyVaultSecurityKey</Description>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<LangVersion>latest</LangVersion>
<PackageId>Microsoft.IdentityModel.ManagedKeyVaultSecurityKey.Tests</PackageId>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
Expand Down

0 comments on commit f2e0763

Please sign in to comment.