Skip to content

Commit bcdeff3

Browse files
author
Javad
authored
[NetFX] DEV | Drop support for Net46 and add support for Net461 (#899)
1 parent 2e36b6a commit bcdeff3

File tree

23 files changed

+318
-319
lines changed

23 files changed

+318
-319
lines changed

BUILDGUIDE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,9 @@ Tests can be built and run with custom Target Frameworks. See the below examples
201201
### Building Tests:
202202

203203
```bash
204-
> msbuild /t:BuildTestsNetFx /p:TargetNetFxVersion=net461
204+
> msbuild /t:BuildTestsNetFx /p:TargetNetFxVersion=net462
205205
# Build the tests for custom TargetFramework (.NET Framework)
206-
# Applicable values: net46 (Default) | net461 | net462 | net47 | net471 net472 | net48
206+
# Applicable values: net461 (Default) | net462 | net47 | net471 net472 | net48
207207
```
208208

209209
```bash
@@ -215,9 +215,9 @@ Tests can be built and run with custom Target Frameworks. See the below examples
215215
### Running Tests:
216216

217217
```bash
218-
> dotnet test /p:TargetNetFxVersion=net461 ...
218+
> dotnet test /p:TargetNetFxVersion=net462 ...
219219
# Use above property to run Functional Tests with custom TargetFramework (.NET Framework)
220-
# Applicable values: net46 (Default) | net461 | net462 | net47 | net471 net472 | net48
220+
# Applicable values: net461 (Default) | net462 | net47 | net471 net472 | net48
221221

222222
> dotnet test /p:TargetNetCoreVersion=netcoreapp3.1 ...
223223
# Use above property to run Functional Tests with custom TargetFramework (.NET Core)

RunTests.cmd

Lines changed: 21 additions & 21 deletions
Large diffs are not rendered by default.

src/Microsoft.Data.SqlClient.sln

Lines changed: 238 additions & 238 deletions
Large diffs are not rendered by default.

src/Microsoft.Data.SqlClient/add-ons/Directory.Build.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
<ItemGroup>
1717
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)"/>
1818
</ItemGroup>
19-
2019
<Choose>
2120
<!-- Set Default Target Framework when building for Debug and Release configurations. (Visual Studio) -->
2221
<When Condition="'$(TestTargetOS)' == '' AND ('$(Configuration)' == 'Debug' OR '$(Configuration)' == 'Release')">

src/Microsoft.Data.SqlClient/netcore/src/Common/perf/PerfRunner/PerfRunner.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<ItemGroup>
1414
<Compile Include="PerfRunner.cs" />
1515
</ItemGroup>
16-
<ItemGroup Condition="'$(TargetGroup)' != 'net46'">
16+
<ItemGroup Condition="'$(TargetFramework)' != 'net461'">
1717
<Compile Include="AssemblyAttributes.cs" />
1818
<Compile Include="$(CommonPath)\System\Diagnostics\CodeAnalysis\ExcludeFromCodeCoverageAttribute.cs">
1919
<Link>Common\System\Diagnostics\CodeAnalysis\ExcludeFromCodeCoverageAttribute.cs</Link>

src/Microsoft.Data.SqlClient/netcore/src/Common/src/System/Net/Logging/NetEventSource.Common.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
using System.Diagnostics.Tracing;
1414
using System.Runtime.CompilerServices;
1515
using System.Runtime.InteropServices;
16-
#if NET46
16+
#if NET461
1717
using System.Security;
1818
#endif
1919

@@ -45,7 +45,7 @@ namespace System.Net
4545
// method that takes an object and optionally provides a string representation of it, in case a particular library wants to customize further.
4646

4747
/// <summary>Provides logging facilities for System.Net libraries.</summary>
48-
#if NET46
48+
#if NET461
4949
[SecuritySafeCritical]
5050
#endif
5151
internal sealed partial class NetEventSource : EventSource

src/Microsoft.Data.SqlClient/netfx/ref/Microsoft.Data.SqlClient.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
4-
<TargetFramework>net46</TargetFramework>
4+
<TargetFramework>net461</TargetFramework>
55
<IntermediateOutputPath>$(ObjFolder)$(Configuration)\$(AssemblyName)\ref\</IntermediateOutputPath>
66
<OutputPath>$(BinFolder)$(Configuration)\$(AssemblyName)\ref\</OutputPath>
77
<DocumentationFile>$(OutputPath)\Microsoft.Data.SqlClient.xml</DocumentationFile>
88
<Product>Framework $(BaseProduct)</Product>
9-
<Configurations>Debug;Release;net46-Release;net46-Debug</Configurations>
9+
<Configurations>Debug;Release;net461-Release;net461-Debug</Configurations>
1010
</PropertyGroup>
1111
<ItemGroup>
1212
<Compile Include="Microsoft.Data.SqlClient.cs" />

src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<PropertyGroup>
55
<ProjectGuid>{407890AC-9876-4FEF-A6F1-F36A876BAADE}</ProjectGuid>
66
<RootNamespace>SqlClient</RootNamespace>
7-
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
7+
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
88
<EnableLocalAppContext>true</EnableLocalAppContext>
99
<ResxFileName>Strings</ResxFileName>
1010
<ResourceFileName>SqlClient.Resources.$(ResxFileName)</ResourceFileName>
@@ -63,8 +63,8 @@
6363
<!-- All Available Configurations-->
6464
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'" />
6565
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'" />
66-
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'net46-Debug|AnyCPU'" />
67-
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'net46-Release|AnyCPU'" />
66+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'net461-Debug|AnyCPU'" />
67+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'net461-Release|AnyCPU'" />
6868
<PropertyGroup Condition="$(Configuration.Contains('Debug'))">
6969
<DefineConstants>$(DefineConstants);DEBUG;DBG;_DEBUG;_LOGGING;RESOURCE_ANNOTATION_WORK;</DefineConstants>
7070
<DebugType>Full</DebugType>

src/Microsoft.Data.SqlClient/tests/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<Import Project="..\..\Directory.Build.props" />
77

88
<PropertyGroup>
9-
<TargetNetFxVersion Condition="'$(TargetNetFxVersion)' == ''">net46</TargetNetFxVersion>
9+
<TargetNetFxVersion Condition="'$(TargetNetFxVersion)' == ''">net461</TargetNetFxVersion>
1010
<TargetNetCoreVersion Condition="'$(ReferenceType)' == 'NetStandard' AND $(TargetNetStandardVersion)=='netstandard2.1'">netcoreapp3.1</TargetNetCoreVersion>
1111
<TargetNetCoreVersion Condition="'$(TargetNetCoreVersion)' == ''">netcoreapp2.1</TargetNetCoreVersion>
1212
<ReferenceType Condition="'$(ReferenceType)'==''">Project</ReferenceType>

src/Microsoft.Data.SqlClient/tests/FunctionalTests/AlwaysEncryptedTests/Utility.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ internal static byte[] DecryptDataUsingAED(byte[] encryptedCellBlob, byte[] key,
349349
}
350350

351351
/// <summary>
352-
/// Create a self-signed certificate without private key. NET46 only.
352+
/// Create a self-signed certificate without private key. NET461 only.
353353
/// </summary>
354354
internal static X509Certificate2 CreateCertificateWithNoPrivateKey()
355355
{

0 commit comments

Comments
 (0)