Skip to content

Commit

Permalink
DEV | Drop support for Net461 and add support for Net462 (#1574)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavoudEshtehari authored Apr 6, 2022
1 parent 9583088 commit a0af306
Show file tree
Hide file tree
Showing 25 changed files with 69 additions and 69 deletions.
6 changes: 3 additions & 3 deletions BUILDGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ msbuild -t:BuildTestsNetCore

```bash
msbuild -t:BuildTestsNetFx
# Build the tests for the .NET Framework (NetFx) driver in 'Debug' Configuration. Default .NET Framework version is 4.6.1.
# Build the tests for the .NET Framework (NetFx) driver in 'Debug' Configuration. Default .NET Framework version is 4.6.2.
```

```bash
Expand Down Expand Up @@ -281,7 +281,7 @@ Tests can be built and run with custom Target Frameworks. See the below examples
```bash
msbuild -t:BuildTestsNetFx -p:TargetNetFxVersion=net462
# Build the tests for custom TargetFramework (.NET Framework)
# Applicable values: net461 (Default) | net462 | net47 | net471 net472 | net48
# Applicable values: net462 (Default) | net462 | net47 | net471 net472 | net48
```

```bash
Expand All @@ -295,7 +295,7 @@ msbuild -t:BuildTestsNetCore -p:TargetNetCoreVersion=netcoreapp3.1
```bash
dotnet test -p:TargetNetFxVersion=net462 ...
# Use above property to run Functional Tests with custom TargetFramework (.NET Framework)
# Applicable values: net461 (Default) | net462 | net47 | net471 net472 | net48
# Applicable values: net462 (Default) | net462 | net47 | net471 net472 | net48

dotnet test -p:TargetNetCoreVersion=netcoreapp3.1 ...
# Use above property to run Functional Tests with custom TargetFramework (.NET Core)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Microsoft.Data.SqlClient is a data provider for Microsoft SQL Server and Azure S

The Microsoft.Data.SqlClient package supports the below environments:

- .NET Framework 4.6.1+
- .NET Framework 4.6.2+
- .NET Core 3.1+
- .NET Standard 2.0+

Expand Down
26 changes: 13 additions & 13 deletions RunTests.cmd

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/Microsoft.Data.SqlClient/add-ons/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<!--These properties can be modified locally to target .NET version of choice to build and test entire test suite-->
<PropertyGroup>
<TargetNetFxVersion Condition="'$(TargetNetFxVersion)' == ''">net461</TargetNetFxVersion>
<TargetNetFxVersion Condition="'$(TargetNetFxVersion)' == ''">net462</TargetNetFxVersion>
<TargetNetStandardVersion Condition="'$(TargetNetStandardVersion)' == ''">netstandard2.0</TargetNetStandardVersion>
<TargetNetCoreVersion Condition="'$(TargetNetCoreVersion)' == ''">netcoreapp3.1</TargetNetCoreVersion>
</PropertyGroup>
Expand All @@ -37,7 +37,7 @@
<PropertyGroup>
<TargetFrameworks Condition="'$(TestTargetOS)' == 'Windowsnetstandard' OR '$(TestTargetOS)' == 'Unixnetstandard'">netstandard2.0;netstandard2.1</TargetFrameworks>
<TargetFrameworks Condition="'$(TestTargetOS)' == 'Windowsnetcoreapp' OR '$(TestTargetOS)' == 'Unixnetcoreapp'">netcoreapp3.1</TargetFrameworks>
<TargetFrameworks Condition="'$(TestTargetOS)' == 'Windowsnetfx'">net461</TargetFrameworks>
<TargetFrameworks Condition="'$(TestTargetOS)' == 'Windowsnetfx'">net462</TargetFrameworks>
</PropertyGroup>
</Otherwise>
</Choose>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
using System.Diagnostics.Tracing;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
#if NET461
#if net462
using System.Security;
#endif

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

/// <summary>Provides logging facilities for System.Net libraries.</summary>
#if NET461
#if net462
[SecuritySafeCritical]
#endif
internal sealed partial class NetEventSource : EventSource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ private void EnlistNonNull(Transaction tx)
// NOTE: Global Transactions is an Azure SQL DB only
// feature where the Transaction Manager (TM) is not
// MS-DTC. Sys.Tx added APIs to support Non MS-DTC
// promoter types/TM in .NET 4.6.1. Following directions
// promoter types/TM in .NET 4.6.2. Following directions
// from .NETFX shiproom, to avoid a "hard-dependency"
// (compile time) on Sys.Tx, we use reflection to invoke
// the new APIs. Further, the _isGlobalTransaction flag
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<TargetFramework>net461</TargetFramework>
<TargetFramework>net462</TargetFramework>
<IntermediateOutputPath>$(ObjFolder)$(Configuration)\$(AssemblyName)\ref\</IntermediateOutputPath>
<OutputPath>$(BinFolder)$(Configuration)\$(AssemblyName)\ref\</OutputPath>
<DocumentationFile>$(OutputPath)\Microsoft.Data.SqlClient.xml</DocumentationFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PropertyGroup>
<ProjectGuid>{407890AC-9876-4FEF-A6F1-F36A876BAADE}</ProjectGuid>
<RootNamespace>SqlClient</RootNamespace>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<EnableLocalAppContext>true</EnableLocalAppContext>
<ResxFileName>Strings</ResxFileName>
<ResourceFileName>SqlClient.Resources.$(ResxFileName)</ResourceFileName>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ private void EnlistNonNull(SysTx.Transaction tx)
// NOTE: Global Transactions is an Azure SQL DB only
// feature where the Transaction Manager (TM) is not
// MS-DTC. Sys.Tx added APIs to support Non MS-DTC
// promoter types/TM in .NET 4.6.1. Following directions
// promoter types/TM in .NET 4.6.2. Following directions
// from .NETFX shiproom, to avoid a "hard-dependency"
// (compile time) on Sys.Tx, we use reflection to invoke
// the new APIs. Further, the _isGlobalTransaction flag
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2872,7 +2872,7 @@
<value>Globale Transaktionen sind für diese Azure SQL-Datenbank-Instanz nicht aktiviert. Wenden Sie sich an den Azure SQL-Datenbank-Support, um Unterstützung zu erhalten.</value>
</data>
<data name="GT_UnsupportedSysTxVersion" xml:space="preserve">
<value>Die aktuell geladene Datei "System.Transactions.dll" unterstützt keine globalen Transaktionen. Führen Sie ein Upgrade auf .NET Framework 4.6.1 oder höher durch.</value>
<value>Die aktuell geladene Datei "System.Transactions.dll" unterstützt keine globalen Transaktionen. Führen Sie ein Upgrade auf .NET Framework 4.6.2 oder höher durch.</value>
</data>
<data name="SQL_BatchedUpdatesNotAvailableOnContextConnection" xml:space="preserve">
<value>Batchupdates werden bei der Kontextverbindung nicht unterstützt.</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2872,7 +2872,7 @@
<value>Las transacciones globales no están habilitadas para esta base de datos SQL de Azure. Para obtener ayuda, póngase en contacto con el soporte técnico de Azure SQL Database.</value>
</data>
<data name="GT_UnsupportedSysTxVersion" xml:space="preserve">
<value>El archivo System.Transactions.dll cargado actualmente no es compatible con las transacciones globales. Actualice a .NET Framework 4.6.1 o posterior.</value>
<value>El archivo System.Transactions.dll cargado actualmente no es compatible con las transacciones globales. Actualice a .NET Framework 4.6.2 o posterior.</value>
</data>
<data name="SQL_BatchedUpdatesNotAvailableOnContextConnection" xml:space="preserve">
<value>La conexión de contexto no admite la actualización de procesamiento por lotes.</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2872,7 +2872,7 @@
<value>Les transactions globales ne sont pas activées pour cette base de données Azure SQL. Contactez le support d'Azure SQL Database pour obtenir de l'aide.</value>
</data>
<data name="GT_UnsupportedSysTxVersion" xml:space="preserve">
<value>Le fichier System.Transactions.dll actuellement chargé ne prend pas en charge les transactions globales. Effectuez une mise à niveau vers .NET Framework 4.6.1 ou ultérieur.</value>
<value>Le fichier System.Transactions.dll actuellement chargé ne prend pas en charge les transactions globales. Effectuez une mise à niveau vers .NET Framework 4.6.2 ou ultérieur.</value>
</data>
<data name="SQL_BatchedUpdatesNotAvailableOnContextConnection" xml:space="preserve">
<value>Le traitement par lots des mises à jour n'est pas pris en charge sur la connexion du contexte.</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2872,7 +2872,7 @@
<value>Le transazioni globali non sono abilitate per questo database SQL di Azure. Per assistenza, contattare il supporto del database SQL di Azure.</value>
</data>
<data name="GT_UnsupportedSysTxVersion" xml:space="preserve">
<value>Il file System.Transactions.dll attualmente caricato non supporta le transazioni globali. Effettuare l'aggiornamento a .NET Framework 4.6.1 o versioni successive.</value>
<value>Il file System.Transactions.dll attualmente caricato non supporta le transazioni globali. Effettuare l'aggiornamento a .NET Framework 4.6.2 o versioni successive.</value>
</data>
<data name="SQL_BatchedUpdatesNotAvailableOnContextConnection" xml:space="preserve">
<value>L'esecuzione di batch di aggiornamenti non è supportata nella connessione contesto.</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2872,7 +2872,7 @@
<value>この Azure SQL Database では、グローバル トランザクションは有効ではありません。Azure SQL Database サポートにお問い合わせください。</value>
</data>
<data name="GT_UnsupportedSysTxVersion" xml:space="preserve">
<value>現在読み込まれている System.Transactions.dll では、グローバル トランザクションはサポートされていません。.NET Framework 4.6.1 またはそれ以降にアップグレードしてください。</value>
<value>現在読み込まれている System.Transactions.dll では、グローバル トランザクションはサポートされていません。.NET Framework 4.6.2 またはそれ以降にアップグレードしてください。</value>
</data>
<data name="SQL_BatchedUpdatesNotAvailableOnContextConnection" xml:space="preserve">
<value>コンテキスト接続では、更新のバッチ処理はサポートされていません。</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2872,7 +2872,7 @@
<value>이 Azure SQL Database에 대해 전역 트랙잭션을 사용하도록 설정되어 있지 않습니다. 도움이 필요하면 Azure SQL Database 지원 팀에 문의하세요.</value>
</data>
<data name="GT_UnsupportedSysTxVersion" xml:space="preserve">
<value>현재 로드된 System.Transactions.dll은 전역 트랜잭션을 지원하지 않습니다. .NET Framework 4.6.1 이상으로 업그레이드하세요.</value>
<value>현재 로드된 System.Transactions.dll은 전역 트랜잭션을 지원하지 않습니다. .NET Framework 4.6.2 이상으로 업그레이드하세요.</value>
</data>
<data name="SQL_BatchedUpdatesNotAvailableOnContextConnection" xml:space="preserve">
<value>컨텍스트 연결에서는 일괄 처리 업데이트가 지원되지 않습니다.</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2872,7 +2872,7 @@
<value>As Transações Globais não estão habilitadas para esse Banco de Dados SQL do Azure. Entre em contato com o suporte do Banco de Dados SQL do Azure para obter assistência.</value>
</data>
<data name="GT_UnsupportedSysTxVersion" xml:space="preserve">
<value>O System.Transactions.dll carregado no momento não dá suporte a Transações Globais. Atualize para o .NET Framework 4.6.1 ou posterior.</value>
<value>O System.Transactions.dll carregado no momento não dá suporte a Transações Globais. Atualize para o .NET Framework 4.6.2 ou posterior.</value>
</data>
<data name="SQL_BatchedUpdatesNotAvailableOnContextConnection" xml:space="preserve">
<value>Não há suporte para as atualizações em lote na conexão de contexto.</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2872,7 +2872,7 @@
<value>Global Transactions are not enabled for this Azure SQL Database. Please contact Azure SQL Database support for assistance.</value>
</data>
<data name="GT_UnsupportedSysTxVersion" xml:space="preserve">
<value>The currently loaded System.Transactions.dll does not support Global Transactions. Please upgrade to .NET Framework 4.6.1 or later.</value>
<value>The currently loaded System.Transactions.dll does not support Global Transactions. Please upgrade to .NET Framework 4.6.2 or later.</value>
</data>
<data name="SQL_BatchedUpdatesNotAvailableOnContextConnection" xml:space="preserve">
<value>Batching updates is not supported on the context connection.</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2872,7 +2872,7 @@
<value>Для этой базы данных SQL Azure глобальные транзакции не включены. Обратитесь за помощью в службу поддержки по базам данных SQL Azure.</value>
</data>
<data name="GT_UnsupportedSysTxVersion" xml:space="preserve">
<value>Загруженная библиотека System.Transactions.dll не поддерживает глобальные транзакции. Перейдите на .NET Framework 4.6.1 или более позднюю версию.</value>
<value>Загруженная библиотека System.Transactions.dll не поддерживает глобальные транзакции. Перейдите на .NET Framework 4.6.2 или более позднюю версию.</value>
</data>
<data name="SQL_BatchedUpdatesNotAvailableOnContextConnection" xml:space="preserve">
<value>Группировка обновлений для контекстного подключения не поддерживается.</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2872,7 +2872,7 @@
<value>尚未为此 Azure SQL 数据库启用全局事务。若要获取帮助,请联系 Azure SQL 数据库支持人员。</value>
</data>
<data name="GT_UnsupportedSysTxVersion" xml:space="preserve">
<value>当前加载的 System.Transactions.dll 不支持全局事务。请升级到 .NET Framework 4.6.1 或更高版本。</value>
<value>当前加载的 System.Transactions.dll 不支持全局事务。请升级到 .NET Framework 4.6.2 或更高版本。</value>
</data>
<data name="SQL_BatchedUpdatesNotAvailableOnContextConnection" xml:space="preserve">
<value>在上下文连接上不支持批处理更新。</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2872,7 +2872,7 @@
<value>此 Azure SQL Database 未啟用全域交易。請連絡 Azure SQL Database 支援以取得協助。</value>
</data>
<data name="GT_UnsupportedSysTxVersion" xml:space="preserve">
<value>目前載入的 System.Transactions.dll 不支援全域交易。請升級為 .NET Framework 4.6.1 或更新版本。</value>
<value>目前載入的 System.Transactions.dll 不支援全域交易。請升級為 .NET Framework 4.6.2 或更新版本。</value>
</data>
<data name="SQL_BatchedUpdatesNotAvailableOnContextConnection" xml:space="preserve">
<value>內容連接上並不支援批次更新。</value>
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.Data.SqlClient/tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<!--These properties can be modified locally to target .NET version of choice to build and test entire test suite-->
<PropertyGroup>
<TargetNetFxVersion Condition="'$(TargetNetFxVersion)' == ''">net461</TargetNetFxVersion>
<TargetNetFxVersion Condition="'$(TargetNetFxVersion)' == ''">net462</TargetNetFxVersion>
<TargetNetCoreVersion Condition="'$(TargetNetCoreVersion)' == ''">netcoreapp3.1</TargetNetCoreVersion>
</PropertyGroup>

Expand Down
Loading

0 comments on commit a0af306

Please sign in to comment.