Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
88 changes: 88 additions & 0 deletions MicrosoftSqlClient.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 18
VisualStudioVersion = 18.2.11415.280
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".paket", ".paket", "{FD7933BD-2A90-49EB-A4B2-95F9D3076BBD}"
ProjectSection(SolutionItems) = preProject
paket.dependencies = paket.dependencies
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{7ECDF2A7-A71C-43B5-AFF2-64468098B7B6}"
ProjectSection(SolutionItems) = preProject
nuget\SqlClient.nuspec = nuget\SqlClient.nuspec
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{9E58B00A-A993-4542-B40F-C58AC1A9AA4D}"
ProjectSection(SolutionItems) = preProject
build.cmd = build.cmd
build.fsx = build.fsx
Directory.Build.props = Directory.Build.props
fsc.props = fsc.props
LICENSE.md = LICENSE.md
netfx.props = netfx.props
README.md = README.md
RELEASE_NOTES.md = RELEASE_NOTES.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{61AC061E-5824-41B7-8E09-8D3A73D564E5}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "content", "content", "{4B60BF24-D078-4950-A994-A633FBC272EB}"
ProjectSection(SolutionItems) = preProject
docs\content\comparison.fsx = docs\content\comparison.fsx
docs\content\configuration and input.fsx = docs\content\configuration and input.fsx
docs\content\data modification.fsx = docs\content\data modification.fsx
docs\content\debugging.fsx = docs\content\debugging.fsx
docs\content\faq.fsx = docs\content\faq.fsx
docs\content\index.fsx = docs\content\index.fsx
docs\content\netcore.md = docs\content\netcore.md
docs\content\output.fsx = docs\content\output.fsx
docs\content\setup.fsx = docs\content\setup.fsx
docs\content\SqlClientComparison.md = docs\content\SqlClientComparison.md
docs\content\sqlenumprovider.quickstart.fsx = docs\content\sqlenumprovider.quickstart.fsx
docs\content\transactions.fsx = docs\content\transactions.fsx
docs\content\unit-testing.fsx = docs\content\unit-testing.fsx
docs\content\whatsnew.fsx = docs\content\whatsnew.fsx
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{573DBBFB-0F97-4327-8614-6A4151CD70BF}"
ProjectSection(SolutionItems) = preProject
docs\tools\generate.fsx = docs\tools\generate.fsx
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "templates", "templates", "{CB79269B-025B-4D6A-AF84-0AD821F6A602}"
ProjectSection(SolutionItems) = preProject
docs\tools\templates\template.cshtml = docs\tools\templates\template.cshtml
EndProjectSection
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "MicrosoftSqlClient", "src\SqlClient\MicrosoftSqlClient.fsproj", "{EC8B6AB2-A73B-7E89-8114-D2A8BF40B7AD}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "MicrosoftSqlClient.DesignTime", "src\SqlClient.DesignTime\MicrosoftSqlClient.DesignTime.fsproj", "{4E5E48E3-C8C0-7AB6-C191-CA189FFA4C79}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{EC8B6AB2-A73B-7E89-8114-D2A8BF40B7AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EC8B6AB2-A73B-7E89-8114-D2A8BF40B7AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EC8B6AB2-A73B-7E89-8114-D2A8BF40B7AD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EC8B6AB2-A73B-7E89-8114-D2A8BF40B7AD}.Release|Any CPU.Build.0 = Release|Any CPU
{4E5E48E3-C8C0-7AB6-C191-CA189FFA4C79}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4E5E48E3-C8C0-7AB6-C191-CA189FFA4C79}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4E5E48E3-C8C0-7AB6-C191-CA189FFA4C79}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4E5E48E3-C8C0-7AB6-C191-CA189FFA4C79}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{4B60BF24-D078-4950-A994-A633FBC272EB} = {61AC061E-5824-41B7-8E09-8D3A73D564E5}
{573DBBFB-0F97-4327-8614-6A4151CD70BF} = {61AC061E-5824-41B7-8E09-8D3A73D564E5}
{CB79269B-025B-4D6A-AF84-0AD821F6A602} = {573DBBFB-0F97-4327-8614-6A4151CD70BF}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {82096CC6-31F2-47A5-8D46-E41C63B4DB58}
EndGlobalSection
EndGlobal
50 changes: 50 additions & 0 deletions MicrosoftTests.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 18
VisualStudioVersion = 18.2.11415.280
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".paket", ".paket", "{E35ED000-5A6C-49E1-82CF-55CB8C16C2AB}"
ProjectSection(SolutionItems) = preProject
paket.dependencies = paket.dependencies
paket.lock = paket.lock
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution items", "Solution items", "{0005CBDB-E976-46EE-89A0-CEE3F25A9365}"
ProjectSection(SolutionItems) = preProject
Directory.Build.props = Directory.Build.props
fsc.props = fsc.props
netfx.props = netfx.props
EndProjectSection
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "MicrosoftSqlClient.Tests", "tests\SqlClient.Tests\MicrosoftSqlClient.Tests.fsproj", "{46E56CE8-D338-60A6-F874-AFD549D076C0}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "MicrosoftSqlClient.DesignTime.Tests", "tests\SqlClient.DesignTime.Tests\MicrosoftSqlClient.DesignTime.Tests.fsproj", "{E7BC3763-8176-B9DB-0B4E-47E24C255A13}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "MicrosoftSqlClient.SqlServerTypes.Tests", "tests\SqlClient.SqlServerTypes.Tests\MicrosoftSqlClient.SqlServerTypes.Tests.fsproj", "{36FAFB63-20F6-A6F9-55D8-90795B3641AE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{46E56CE8-D338-60A6-F874-AFD549D076C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{46E56CE8-D338-60A6-F874-AFD549D076C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{46E56CE8-D338-60A6-F874-AFD549D076C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{46E56CE8-D338-60A6-F874-AFD549D076C0}.Release|Any CPU.Build.0 = Release|Any CPU
{E7BC3763-8176-B9DB-0B4E-47E24C255A13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E7BC3763-8176-B9DB-0B4E-47E24C255A13}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E7BC3763-8176-B9DB-0B4E-47E24C255A13}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E7BC3763-8176-B9DB-0B4E-47E24C255A13}.Release|Any CPU.Build.0 = Release|Any CPU
{36FAFB63-20F6-A6F9-55D8-90795B3641AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{36FAFB63-20F6-A6F9-55D8-90795B3641AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{36FAFB63-20F6-A6F9-55D8-90795B3641AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{36FAFB63-20F6-A6F9-55D8-90795B3641AE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BB177D8C-41D5-430D-94E8-485567A72F92}
EndGlobalSection
EndGlobal
39 changes: 33 additions & 6 deletions build/build.fs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,14 @@
Excludes = [] }

// Information about the project to be used at NuGet and in AssemblyInfo files
let project = "FSharp.Data.SqlClient"
let designTimeProject = "FSharp.Data.SqlClient.DesignTime"
let systemSqlProject = {|
runtime="FSharp.Data.SqlClient"
designTime="FSharp.Data.SqlClient.DesignTime"
|}
let microsoftSqlProject = {|
runtime="FSharp.Data.MicrosoftSqlClient"
designTime="FSharp.Data.MicrosoftSqlClient.DesignTime"
|}
let authors = ["Dmitry Morozov, Dmitry Sevastianov"]
let summary = "SqlClient F# type providers"
let description = "SqlCommandProvider provides statically typed access to input parameters and result set of T-SQL command in idiomatic F# way.\nSqlProgrammabilityProvider exposes Stored Procedures, User-Defined Types and User-Defined Functions in F# code."
Expand All @@ -50,7 +56,8 @@
// Generate assembly info files with the right version & up-to-date information

Target.create "AssemblyInfo" (fun _ ->
[ makeRootPath "src/SqlClient/AssemblyInfo.fs", "SqlClient", project, summary ]

[ makeRootPath "src/SqlClient/AssemblyInfo.fs", "SqlClient", systemSqlProject.runtime, summary ]
|> Seq.iter (fun (fileName, title, project, summary) ->
AssemblyInfoFile.createFSharp fileName
[ AssemblyInfo.Title title
Expand All @@ -60,7 +67,7 @@
AssemblyInfo.FileVersion version
AssemblyInfo.InternalsVisibleTo "SqlClient.Tests" ] )

[ makeRootPath "src/SqlClient.DesignTime/AssemblyInfo.fs", "SqlClient.DesignTime", designTimeProject, summary ]
[ makeRootPath "src/SqlClient.DesignTime/AssemblyInfo.fs", "SqlClient.DesignTime", systemSqlProject.designTime, summary ]
|> Seq.iter (fun (fileName, title, project, summary) ->
AssemblyInfoFile.createFSharp fileName
[ AssemblyInfo.Title title
Expand All @@ -69,6 +76,26 @@
AssemblyInfo.Version version
AssemblyInfo.FileVersion version
AssemblyInfo.InternalsVisibleTo "SqlClient.Tests" ] )

[ makeRootPath "src/SqlClient/MicrosoftAssemblyInfo.fs", "MicrosoftSqlClient", microsoftSqlProject.runtime, summary ]
|> Seq.iter (fun (fileName, title, project, summary) ->
AssemblyInfoFile.createFSharp fileName
[ AssemblyInfo.Title title
AssemblyInfo.Product project
AssemblyInfo.Description summary
AssemblyInfo.Version version
AssemblyInfo.FileVersion version
AssemblyInfo.InternalsVisibleTo "MicrosoftSqlClient.Tests" ] )

[ makeRootPath "src/SqlClient.DesignTime/MicrosoftAssemblyInfo.fs", "MicrosoftSqlClient.DesignTime", microsoftSqlProject.designTime, summary ]
|> Seq.iter (fun (fileName, title, project, summary) ->
AssemblyInfoFile.createFSharp fileName
[ AssemblyInfo.Title title
AssemblyInfo.Product project
AssemblyInfo.Description summary
AssemblyInfo.Version version
AssemblyInfo.FileVersion version
AssemblyInfo.InternalsVisibleTo "MicrosoftSqlClient.Tests" ] )
)

let slnPath = makeRootPath "SqlClient.sln"
Expand Down Expand Up @@ -191,12 +218,12 @@
.ConnectionString <- gitHubActionSqlConnectionString
testConfigFile.Save()
gitHubActionSqlConnectionString
SqlConnectionStringBuilder connStr

Check warning on line 221 in build/build.fs

View workflow job for this annotation

GitHub Actions / build

This construct is deprecated. Use the Microsoft.Data.SqlClient package instead.
testConnStr <- Some connStr
database <- Some connStr.InitialCatalog

Check warning on line 223 in build/build.fs

View workflow job for this annotation

GitHub Actions / build

This construct is deprecated. Use the Microsoft.Data.SqlClient package instead.
conn <-
connStr.InitialCatalog <- ""

Check warning on line 225 in build/build.fs

View workflow job for this annotation

GitHub Actions / build

This construct is deprecated. Use the Microsoft.Data.SqlClient package instead.
let cnx = new SqlConnection(string connStr)

Check warning on line 226 in build/build.fs

View workflow job for this annotation

GitHub Actions / build

This construct is deprecated. Use the Microsoft.Data.SqlClient package instead.

Check warning on line 226 in build/build.fs

View workflow job for this annotation

GitHub Actions / build

This construct is deprecated. Use the Microsoft.Data.SqlClient package instead.
cnx.Open()
Some cnx
)
Expand All @@ -208,7 +235,7 @@
//attach
let dbIsMissing =
let query = sprintf "SELECT COUNT(*) FROM sys.databases WHERE name = '%s'" database.Value
use cmd = new SqlCommand(query, conn.Value)

Check warning on line 238 in build/build.fs

View workflow job for this annotation

GitHub Actions / build

This construct is deprecated. Use the Microsoft.Data.SqlClient package instead.

Check warning on line 238 in build/build.fs

View workflow job for this annotation

GitHub Actions / build

This construct is deprecated. Use the Microsoft.Data.SqlClient package instead.
cmd.ExecuteScalar() = box 0

if dbIsMissing then
Expand All @@ -221,13 +248,13 @@
ZipFile.ExtractToDirectory(testsSourceRoot @@ (dataFileName + ".zip"), testsSourceRoot)

let dataPath =
use cmd = new SqlCommand("SELECT SERVERPROPERTY('InstanceDefaultDataPath')", conn.Value)

Check warning on line 251 in build/build.fs

View workflow job for this annotation

GitHub Actions / build

This construct is deprecated. Use the Microsoft.Data.SqlClient package instead.

Check warning on line 251 in build/build.fs

View workflow job for this annotation

GitHub Actions / build

This construct is deprecated. Use the Microsoft.Data.SqlClient package instead.
cmd.ExecuteScalar() |> string
do
let destFileName = dataPath @@ Path.GetFileName(sourceMdf)
File.Copy(sourceMdf, destFileName, overwrite = true)
File.Delete( sourceMdf)
use cmd = conn.Value.CreateCommand(CommandText = sprintf "CREATE DATABASE [%s] ON ( FILENAME = N'%s' ) FOR ATTACH" database.Value destFileName)

Check warning on line 257 in build/build.fs

View workflow job for this annotation

GitHub Actions / build

This construct is deprecated. Use the Microsoft.Data.SqlClient package instead.
cmd.ExecuteNonQuery() |> ignore
)
}
Expand Down Expand Up @@ -312,9 +339,9 @@
let nugetPath = "packages/build/NuGet.CommandLine/tools/NuGet.exe"

Fake.DotNet.NuGet.NuGet.NuGet (fun p ->
{ p with
{ p with
Authors = authors
Project = project
Project = systemSqlProject.runtime
Summary = summary
Description = description
Version = version
Expand Down
6 changes: 1 addition & 5 deletions netfx.props
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,4 @@
<DefineConstants>$(DefineConstants);USE_SQL_SERVER_TYPES_ASSEMBLY;USE_SYSTEM_DATA_COMMON_DBPROVIDERFACTORIES</DefineConstants>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Data.SqlClient" Version="4.9.0" Condition="'$(TargetFramework)' != 'net462'" />
</ItemGroup>

</Project>
</Project>
17 changes: 11 additions & 6 deletions paket.dependencies
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
source https://www.nuget.org/api/v2/
generate_load_scripts: on
storage: none
github fsprojects/FSharp.TypeProviders.SDK:23b588d06acb8e100402523abc1d4f3f06325b8a src/ProvidedTypes.fsi
github fsprojects/FSharp.TypeProviders.SDK:23b588d06acb8e100402523abc1d4f3f06325b8a src/ProvidedTypes.fs
github fsprojects/FSharp.TypeProviders.SDK:e70ad1008e5e2ff54ad286c24bd1eef915551180 src/ProvidedTypes.fsi
github fsprojects/FSharp.TypeProviders.SDK:e70ad1008e5e2ff54ad286c24bd1eef915551180 src/ProvidedTypes.fs

group Build
source https://www.nuget.org/api/v2/

storage: none

nuget Fun.Build
nuget FSharp.Core 8.0.301

Expand Down Expand Up @@ -42,21 +43,24 @@ group DesignTime
framework: >= net462, >= netstandard20, net8.0
storage: none

nuget System.Configuration.ConfigurationManager 9.0.4
nuget System.Configuration.ConfigurationManager 9.0.4
nuget System.Data.Common
nuget System.Data.SqlClient
nuget System.Runtime.Caching
nuget FSharp.Core 8.0.301
nuget FSharp.Core 8.0.301
nuget Microsoft.Data.SqlClient
nuget Microsoft.SqlServer.TransactSql.ScriptDom
nuget Microsoft.SqlServer.Types

group Test
source https://www.nuget.org/api/v2/
storage: none

nuget FSharp.Core redirects:force
nuget System.Data.SqlClient
nuget System.Configuration.ConfigurationManager

nuget Microsoft.Data.SqlClient
nuget Microsoft.SqlServer.Types ~> 12
nuget Newtonsoft.Json
nuget xunit = 2.4.1
Expand All @@ -83,7 +87,8 @@ group Samples
source https://www.nuget.org/api/v2/
framework: >= net462, >= netcoreapp2.0, >= netstandard2.0, net8.0
redirects: on

storage: none

nuget FSharp.Core = 8.0.301 redirects: force

nuget Microsoft.AspNet.WebApi
Expand Down
Loading
Loading