Skip to content

Commit

Permalink
Use netstandard20 for both lib and designtime
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellittledev committed Apr 4, 2021
1 parent 55ff37f commit 9feb156
Show file tree
Hide file tree
Showing 7 changed files with 740 additions and 569 deletions.
13 changes: 7 additions & 6 deletions paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ group Library

group DesignTime
source https://www.nuget.org/api/v2/
framework: >= netcoreapp2.2
framework: >= netstandard20
storage: none


nuget System.Runtime 4.3.1
nuget FSharp.Core = 4.5.2
nuget System.Configuration.ConfigurationManager
nuget System.Data.Common
nuget System.Runtime.Caching
nuget Microsoft.Data.SqlClient
nuget System.Configuration.ConfigurationManager 5.0.0
nuget System.Data.Common 4.3.0
nuget System.Runtime.Caching 5.0.0
nuget Microsoft.Data.SqlClient 2.1.2
nuget Microsoft.SqlServer.TransactSql.ScriptDom 150.4897.1
#nuget Microsoft.SqlServer.Types

Expand Down
1,281 changes: 723 additions & 558 deletions paket.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/SqlClient.DesignTime/SqlClient.DesignTime.fsproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp2.2</TargetFrameworks>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<AssemblyName>FSharp.Data.SqlClient.DesignTime</AssemblyName>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
Expand Down
1 change: 1 addition & 0 deletions src/SqlClient.DesignTime/paket.references
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
group DesignTime

System.Runtime
FSharp.Core
System.Configuration.ConfigurationManager
System.Data.Common
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ open FSharp.Data

[<Literal>]
let Cnx = "Data Source=.;Initial Catalog=AdventureWorks2012;Integrated Security=True"

(*
type SingleColumnSelect = SqlEnumProvider<"SELECT Name FROM Purchasing.ShipMethod", Cnx>
type TinyIntEnum = SqlEnumProvider<"SELECT * FROM (VALUES(('One'), CAST(1 AS tinyint)), ('Two', CAST(2 AS tinyint))) AS T(Tag, Value)", Cnx, Kind = SqlEnumKind.CLI>
type CurrencyCodeUOM =
Expand All @@ -12,13 +12,17 @@ type CurrencyCodeUOM =
FROM Sales.Currency
WHERE CurrencyCode IN ('USD', 'EUR', 'GBP')
", Cnx, Kind = SqlEnumKind.UnitsOfMeasure>

*)
[<EntryPoint>]
let main _ =
let get42 = new SqlCommandProvider<"SELECT 42", Cnx>(Cnx)
get42.Execute() |> Seq.toArray |> printfn "SqlCommandTest: %A"


(*
printfn "SqlEnum default test: %A" SingleColumnSelect.``CARGO TRANSPORT 5``
printfn "SqlEnum CLI enum test: %A" TinyIntEnum.One
printfn "SqlEnum UOM test: %A" 1m<CurrencyCodeUOM.USD>
*)

0
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</ItemGroup>
<ItemGroup>
<Reference Include="FSharp.Data.SqlClient.DesignTime">
<HintPath>..\..\bin\typeproviders\netcoreapp2.2\FSharp.Data.SqlClient.DesignTime.dll</HintPath>
<HintPath>..\..\bin\typeproviders\netstandard2.0\FSharp.Data.SqlClient.DesignTime.dll</HintPath>
</Reference>
</ItemGroup>
<Import Project="..\..\.paket\Paket.Restore.targets" />
Expand Down
2 changes: 1 addition & 1 deletion tests/SqlClient.Tests/SqlClient.Tests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</ItemGroup>
<ItemGroup>
<Reference Include="FSharp.Data.SqlClient">
<HintPath>..\..\bin\netcoreapp2.2\FSharp.Data.SqlClient.dll</HintPath>
<HintPath>..\..\bin\netstandard2.0\FSharp.Data.SqlClient.dll</HintPath>
</Reference>
</ItemGroup>
<Target Name="CopyCustomContent" AfterTargets="AfterBuild">
Expand Down

0 comments on commit 9feb156

Please sign in to comment.