Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
remove legacy namespace compatibility, adjust release notes
  • Loading branch information
smoothdeveloper committed May 7, 2026
commit fbfba0cb22259630b36de35503c7aae977b2632d
5 changes: 5 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#### 2.9.99-alpha April 30, 2024

* Issue #482 Support for Microsoft.Data.SqlClient in FSharp.Data.MicrosoftSqlClient package
* Contributor: Daniel Little (https://github.com/daniellittledev), Gauthier Segay (https://github.com/smoothdeveloper)

#### 2.1.3 April 30, 2024

* Issue #440 Toolchain and SDK adjustments, deprecated runtime support for net40
Expand Down
8 changes: 4 additions & 4 deletions src/SqlClient.DesignTime/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ open System.Runtime.CompilerServices
[<assembly: AssemblyTitleAttribute("SqlClient.DesignTime")>]
[<assembly: AssemblyProductAttribute("FSharp.Data.SqlClient.DesignTime")>]
[<assembly: AssemblyDescriptionAttribute("SqlClient F# type providers")>]
[<assembly: AssemblyVersionAttribute("2.1.3")>]
[<assembly: AssemblyFileVersionAttribute("2.1.3")>]
[<assembly: AssemblyVersionAttribute("2.9.99")>]
[<assembly: AssemblyFileVersionAttribute("2.9.99")>]
[<assembly: InternalsVisibleToAttribute("SqlClient.Tests")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] AssemblyTitle = "SqlClient.DesignTime"
let [<Literal>] AssemblyProduct = "FSharp.Data.SqlClient.DesignTime"
let [<Literal>] AssemblyDescription = "SqlClient F# type providers"
let [<Literal>] AssemblyVersion = "2.1.3"
let [<Literal>] AssemblyFileVersion = "2.1.3"
let [<Literal>] AssemblyVersion = "2.9.99"
let [<Literal>] AssemblyFileVersion = "2.9.99"
let [<Literal>] InternalsVisibleTo = "SqlClient.Tests"
8 changes: 4 additions & 4 deletions src/SqlClient.DesignTime/MicrosoftAssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ open System.Runtime.CompilerServices
[<assembly: AssemblyTitleAttribute("MicrosoftSqlClient.DesignTime")>]
[<assembly: AssemblyProductAttribute("FSharp.Data.MicrosoftSqlClient.DesignTime")>]
[<assembly: AssemblyDescriptionAttribute("SqlClient F# type providers")>]
[<assembly: AssemblyVersionAttribute("2.1.3")>]
[<assembly: AssemblyFileVersionAttribute("2.1.3")>]
[<assembly: AssemblyVersionAttribute("2.9.99")>]
[<assembly: AssemblyFileVersionAttribute("2.9.99")>]
[<assembly: InternalsVisibleToAttribute("MicrosoftSqlClient.Tests")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] AssemblyTitle = "MicrosoftSqlClient.DesignTime"
let [<Literal>] AssemblyProduct = "FSharp.Data.MicrosoftSqlClient.DesignTime"
let [<Literal>] AssemblyDescription = "SqlClient F# type providers"
let [<Literal>] AssemblyVersion = "2.1.3"
let [<Literal>] AssemblyFileVersion = "2.1.3"
let [<Literal>] AssemblyVersion = "2.9.99"
let [<Literal>] AssemblyFileVersion = "2.9.99"
let [<Literal>] InternalsVisibleTo = "MicrosoftSqlClient.Tests"
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<DisableImplicitSystemValueTupleReference>true</DisableImplicitSystemValueTupleReference>
<DefineConstants>$(DefineConstants);MICROSOFT_DATA_SQLCLIENT</DefineConstants>
<DefineConstants>$(DefineConstants);DESIGNTIME_CODE_ONLY;IS_DESIGNTIME;WITH_LEGACY_NAMESPACE</DefineConstants>
<DefineConstants>$(DefineConstants);DESIGNTIME_CODE_ONLY;IS_DESIGNTIME</DefineConstants>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<ItemGroup>
<!--
Expand Down
3 changes: 2 additions & 1 deletion src/SqlClient.DesignTime/SqlClient.DesignTime.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<DisableImplicitSystemValueTupleReference>true</DisableImplicitSystemValueTupleReference>
<DefineConstants>$(DefineConstants);SYSTEM_DATA_SQLCLIENT</DefineConstants>
<DefineConstants>$(DefineConstants);DESIGNTIME_CODE_ONLY;IS_DESIGNTIME;WITH_LEGACY_NAMESPACE</DefineConstants>
<DefineConstants>$(DefineConstants);DESIGNTIME_CODE_ONLY;IS_DESIGNTIME</DefineConstants>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<ItemGroup>
<!--
Expand Down
8 changes: 4 additions & 4 deletions src/SqlClient/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ open System.Runtime.CompilerServices
[<assembly: AssemblyTitleAttribute("SqlClient")>]
[<assembly: AssemblyProductAttribute("FSharp.Data.SqlClient")>]
[<assembly: AssemblyDescriptionAttribute("SqlClient F# type providers")>]
[<assembly: AssemblyVersionAttribute("2.1.3")>]
[<assembly: AssemblyFileVersionAttribute("2.1.3")>]
[<assembly: AssemblyVersionAttribute("2.9.99")>]
[<assembly: AssemblyFileVersionAttribute("2.9.99")>]
[<assembly: InternalsVisibleToAttribute("SqlClient.Tests")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] AssemblyTitle = "SqlClient"
let [<Literal>] AssemblyProduct = "FSharp.Data.SqlClient"
let [<Literal>] AssemblyDescription = "SqlClient F# type providers"
let [<Literal>] AssemblyVersion = "2.1.3"
let [<Literal>] AssemblyFileVersion = "2.1.3"
let [<Literal>] AssemblyVersion = "2.9.99"
let [<Literal>] AssemblyFileVersion = "2.9.99"
let [<Literal>] InternalsVisibleTo = "SqlClient.Tests"
8 changes: 4 additions & 4 deletions src/SqlClient/MicrosoftAssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ open System.Runtime.CompilerServices
[<assembly: AssemblyTitleAttribute("MicrosoftSqlClient")>]
[<assembly: AssemblyProductAttribute("FSharp.Data.MicrosoftSqlClient")>]
[<assembly: AssemblyDescriptionAttribute("SqlClient F# type providers")>]
[<assembly: AssemblyVersionAttribute("2.1.3")>]
[<assembly: AssemblyFileVersionAttribute("2.1.3")>]
[<assembly: AssemblyVersionAttribute("2.9.99")>]
[<assembly: AssemblyFileVersionAttribute("2.9.99")>]
[<assembly: InternalsVisibleToAttribute("MicrosoftSqlClient.Tests")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] AssemblyTitle = "MicrosoftSqlClient"
let [<Literal>] AssemblyProduct = "FSharp.Data.MicrosoftSqlClient"
let [<Literal>] AssemblyDescription = "SqlClient F# type providers"
let [<Literal>] AssemblyVersion = "2.1.3"
let [<Literal>] AssemblyFileVersion = "2.1.3"
let [<Literal>] AssemblyVersion = "2.9.99"
let [<Literal>] AssemblyFileVersion = "2.9.99"
let [<Literal>] InternalsVisibleTo = "MicrosoftSqlClient.Tests"
3 changes: 1 addition & 2 deletions src/SqlClient/MicrosoftSqlClient.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
<NoWarn>101;44</NoWarn>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<DisableImplicitSystemValueTupleReference>true</DisableImplicitSystemValueTupleReference>
<WithLegacyNamespaces>true</WithLegacyNamespaces>
<DefineConstants>$(DefineConstants);MICROSOFT_DATA_SQLCLIENT</DefineConstants>
<DefineConstants Condition="'$(WithLegacyNamespaces)'=='true'">$(DefineConstants);WITH_LEGACY_NAMESPACE</DefineConstants>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
Expand Down
23 changes: 0 additions & 23 deletions src/SqlClient/Shared.fs
Original file line number Diff line number Diff line change
Expand Up @@ -269,26 +269,3 @@ module RuntimeInternals =
[<AutoOpen>]
module Shared =
let DbNull = box DBNull.Value


#if WITH_LEGACY_NAMESPACE
namespace FSharp.Data
open System
[<Obsolete("use open 'FSharp.Data.SqlClient' namespace instead")>]
type ResultType = FSharp.Data.SqlClient.ResultType
[<Obsolete("use open 'FSharp.Data.SqlClient' namespace instead")>]
type SqlEnumKind = FSharp.Data.SqlClient.SqlEnumKind
[<Obsolete("use open 'FSharp.Data.SqlClient.Internals' namespace instead");AutoOpen>]
module Obsolete =

//module Encoding = FSharp.Data.SqlClient.Internals.Encoding
//module RuntimeInternals = FSharp.Data.SqlClient.Internals.RuntimeInternals
//module Shared = FSharp.Data.SqlClient.Internals.Shared

type ResultRank = FSharp.Data.SqlClient.Internals.ResultRank
type Mapper = FSharp.Data.SqlClient.Internals.Mapper
type Column = FSharp.Data.SqlClient.Internals.Column
type TypeInfo = FSharp.Data.SqlClient.Internals.TypeInfo
type Parameter = FSharp.Data.SqlClient.Internals.Parameter
type TempTableLoader = FSharp.Data.SqlClient.Internals.TempTableLoader
#endif
3 changes: 1 addition & 2 deletions src/SqlClient/SqlClient.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
<NoWarn>101</NoWarn>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<DisableImplicitSystemValueTupleReference>true</DisableImplicitSystemValueTupleReference>
<WithLegacyNamespaces>true</WithLegacyNamespaces>
<DefineConstants>$(DefineConstants);SYSTEM_DATA_SQLCLIENT</DefineConstants>
<DefineConstants Condition="'$(WithLegacyNamespaces)'=='true'">$(DefineConstants);WITH_LEGACY_NAMESPACE</DefineConstants>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
Expand Down
1 change: 0 additions & 1 deletion tests/SqlClient.Tests/MicrosoftSqlClient.Tests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<AssemblyName>MicrosoftSqlClient.Tests</AssemblyName>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<DefineConstants>$(DefineConstants);WITH_LEGACY_NAMESPACE</DefineConstants>
<DefineConstants>$(DefineConstants);MICROSOFT_DATA_SQLCLIENT</DefineConstants>
<NoWarn>$(NoWarn);101</NoWarn>
<!--
Expand Down
1 change: 0 additions & 1 deletion tests/SqlClient.Tests/SqlClient.Tests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<AssemblyName>SqlClient.Tests</AssemblyName>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<DefineConstants>$(DefineConstants);WITH_LEGACY_NAMESPACE</DefineConstants>
<NoWarn>$(NoWarn);101</NoWarn>
<!--
disable error FS0044: This construct is deprecated. use 'FSharp.Data.SqlClient.Internals.ISqlCommand' instead
Expand Down
13 changes: 7 additions & 6 deletions tests/SqlClient.Tests/TypeProviderTest.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module FSharp.Data.SqlClient.Tests.TypeProviderTest
open FSharp.Data
open FSharp.Data.SqlClient
open FSharp.Data.SqlClient.Tests
open FSharp.Data.SqlClient.Internals
open System
open System.Data
#if SYSTEM_DATA_SQLCLIENT
Expand Down Expand Up @@ -348,17 +349,17 @@ let ResultsetRuntimeVerificationLessThanExpectedColumns() =
SELECT * FROM XS
"

Assert.False(SqlClient.Configuration.Current.ResultsetRuntimeVerification)
Assert.False(FsharpDataSqlClientConfiguration.Current.ResultsetRuntimeVerification)

try
SqlClient.Configuration.Current <- { ResultsetRuntimeVerification = true }
FsharpDataSqlClientConfiguration.Current <- { ResultsetRuntimeVerification = true }
let err = Assert.Throws<InvalidOperationException>(fun() -> cmd.Execute() |> Seq.toArray |> ignore)
Assert.Equal<string>(
"Expected at least 3 columns in result set but received only 2.",
err.Message
)
finally
SqlClient.Configuration.Current <- { ResultsetRuntimeVerification = false}
FsharpDataSqlClientConfiguration.Current <- { ResultsetRuntimeVerification = false}

let err = Assert.Throws<IndexOutOfRangeException>(fun() -> cmd.Execute() |> Seq.toArray |> ignore)
Assert.Equal<string>(
Expand Down Expand Up @@ -393,18 +394,18 @@ let ResultsetRuntimeVerificationDiffColumnTypes() =
SELECT * FROM XS
"

Assert.False(Configuration.Current.ResultsetRuntimeVerification)
Assert.False(FsharpDataSqlClientConfiguration.Current.ResultsetRuntimeVerification)

try
Configuration.Current <- { ResultsetRuntimeVerification = true }
FsharpDataSqlClientConfiguration.Current <- { ResultsetRuntimeVerification = true }

let err = Assert.Throws<InvalidOperationException>(fun() -> cmd.Execute() |> Seq.toArray |> ignore)
Assert.Equal<string>(
"""Expected column [Total] of type "System.Int32" at position 1 (0-based indexing) but received column [Now] of type "System.DateTime".""",
err.Message
)
finally
Configuration.Current <- { ResultsetRuntimeVerification = false}
FsharpDataSqlClientConfiguration.Current <- { ResultsetRuntimeVerification = false}

let err = Assert.Throws<InvalidCastException>(fun() -> cmd.Execute() |> Seq.toArray |> ignore)

Expand Down
Loading