From 3355adf86d23f4e431175771af67460811d3aad3 Mon Sep 17 00:00:00 2001 From: Sam Hanes Date: Fri, 23 Nov 2018 14:49:21 -0500 Subject: [PATCH 1/2] Add netcore docs page --- SqlClient.sln | 1 + docs/content/netcore.md | 19 +++ docs/output/content/style.css | 189 --------------------------- docs/output/content/tips.js | 46 ------- docs/tools/templates/template.cshtml | 3 +- 5 files changed, 22 insertions(+), 236 deletions(-) create mode 100644 docs/content/netcore.md delete mode 100644 docs/output/content/style.css delete mode 100644 docs/output/content/tips.js diff --git a/SqlClient.sln b/SqlClient.sln index b7919feb..719109ad 100644 --- a/SqlClient.sln +++ b/SqlClient.sln @@ -32,6 +32,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "content", "content", "{4B60 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 diff --git a/docs/content/netcore.md b/docs/content/netcore.md new file mode 100644 index 00000000..3c6ac04a --- /dev/null +++ b/docs/content/netcore.md @@ -0,0 +1,19 @@ +Support for .NET Core +===================== + +As of version 2.0.1, a `netstandard2.0`-targeted version of FSharp.Data.SqlClient is available. +This means you should be able to reference and use the type provider from a .NET Core application, +with the following caveats and exceptions: + +* The type provider is split into two different assemblies, `FSharp.Data.SqlClient.dll` +(the runtime component or RTC) and `FSharp.Data.SqlClient.DesignTime.dll` (the design-time component or DTC). + * The RTC (and its dependencies) must be available at runtime; they end up in the bin folder + alongside your application's compiled assemblies. The FSharp.Data.SqlClient RTC is available for + both `net40` and `netstandard2.0` and is thus fully compatible with .NET Core 2.0 applications. + * The DTC is required to make the provided types available to your design-time tooling and to the + compiler. The FSharp.Data.SqlClient DTC *has .NET Framework-only dependencies* (`Microsoft.SqlServer.Types` + and `Microsoft.SqlServer.TransactSql.ScriptDom`). As such, either .NET Framework or Mono must be + installed in order to compile your .NET Core application. Additionally, you must import `fsc.props` + in your .fsproj/.csproj file - please see more detailed instructions [here](https://github.com/Microsoft/visualfsharp/issues/3303). +* As mentioned above, `Microsoft.SqlServer.Types` only targets .NET Framework, so you will not be able to use types such as [HierarchyId](http://technet.microsoft.com/en-us/library/bb677173.aspx) or +[spatial types](http://blogs.msdn.com/b/adonet/archive/2013/12/09/microsoft-sqlserver-types-nuget-package-spatial-on-azure.aspx) from your .NET Core app. diff --git a/docs/output/content/style.css b/docs/output/content/style.css deleted file mode 100644 index 76fbac2d..00000000 --- a/docs/output/content/style.css +++ /dev/null @@ -1,189 +0,0 @@ -@import url(//fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans+Mono|Gudea:400,700,400italic); - -/*-------------------------------------------------------------------------- - Formatting for F# code snippets -/*--------------------------------------------------------------------------*/ - -/* identifier */ -span.i { color:#d1d1d1; } -/* string */ -span.s { color:#d4b43c; } -/* keywords */ -span.k { color:#4e98dc; } -/* comment */ -span.c { color:#96C71D; } -/* operators */ -span.o { color:#af75c1; } -/* numbers */ -span.n { color:#96C71D; } -/* line number */ -span.l { color:#80b0b0; } - -/* inactive code */ -span.inactive { color:#808080; } -/* preprocessor */ -span.prep { color:#af75c1; } -/* fsi output */ -span.fsi { color:#808080; } - -/* omitted */ -span.omitted { - background:#3c4e52; - border-radius:5px; - color:#808080; - padding:0px 0px 1px 0px; -} -/* tool tip */ -div.tip { - background:#475b5f; - border-radius:4px; - font:11pt 'Droid Sans', arial, sans-serif; - padding:6px 8px 6px 8px; - display:none; - color:#d1d1d1; -} -table.pre pre { - padding:0px; - margin:0px; - border:none; -} -table.pre, pre.fssnip, pre { - line-height:13pt; - border:1px solid #d8d8d8; - border-collapse:separate; - white-space:pre; - font: 9pt 'Droid Sans Mono',consolas,monospace; - width:90%; - margin:10px 20px 20px 20px; - background-color:#212d30; - padding:10px; - border-radius:5px; - color:#d1d1d1; -} -table.pre pre { - padding:0px; - margin:0px; - border-radius:0px; - width: 100%; -} -table.pre td { - padding:0px; - white-space:normal; - margin:0px; -} -table.pre td.lines { - width:30px; -} - -/*-------------------------------------------------------------------------- - Formatting for page & standard document content -/*--------------------------------------------------------------------------*/ - -body { - font-family: Gudea, serif; - padding-top: 0px; - padding-bottom: 40px; -} - -pre { - word-wrap: inherit; -} - -/* Format the heading - nicer spacing etc. */ -.masthead { - overflow: hidden; -} -.masthead ul, .masthead li { - margin-bottom:0px; -} -.masthead .nav li { - margin-top: 15px; - font-size:110%; -} -.masthead h3 { - margin-bottom:5px; - font-size:170%; -} -hr { - margin:0px 0px 20px 0px; -} - -/* Make table headings and td.title bold */ -td.title, thead { - font-weight:bold; -} - -/* Format the right-side menu */ -#menu { - margin-top:50px; - font-size:11pt; - padding-left:20px; -} - -#menu .nav-header { - font-size:12pt; - color:#606060; - margin-top:20px; -} - -#menu li { - line-height:25px; -} - -/* Change font sizes for headings etc. */ -#main h1 { font-size: 26pt; margin:10px 0px 15px 0px; font-weight:400; } -#main h2 { font-size: 20pt; margin:20px 0px 0px 0px; font-weight:400; } -#main h3 { font-size: 14pt; margin:15px 0px 0px 0px; font-weight:400; } -#main p { font-size: 12pt; margin:5px 0px 15px 0px; } -#main ul { font-size: 12pt; margin-top:10px; } -#main li { font-size: 12pt; margin: 5px 0px 5px 0px; } -#main strong { font-weight:700; } - -/*-------------------------------------------------------------------------- - Formatting for API reference -/*--------------------------------------------------------------------------*/ - -.type-list .type-name, .module-list .module-name { - width:25%; - font-weight:bold; -} -.member-list .member-name { - width:35%; -} -#main .xmldoc h2 { - font-size:14pt; - margin:10px 0px 0px 0px; -} -#main .xmldoc h3 { - font-size:12pt; - margin:10px 0px 0px 0px; -} -/*-------------------------------------------------------------------------- - Additional formatting for the homepage -/*--------------------------------------------------------------------------*/ - -#nuget { - margin-top:20px; - font-size: 11pt; - padding:20px; -} - -#nuget pre { - font-size:11pt; - -moz-border-radius: 0px; - -webkit-border-radius: 0px; - border-radius: 0px; - background: #404040; - border-style:none; - color: #e0e0e0; - margin-top:15px; -} - -/* Hide snippets on the home page snippet & nicely format table */ -#hp-snippet td.lines { - display: none; -} -#hp-snippet .table { - width:80%; - margin-left:30px; -} diff --git a/docs/output/content/tips.js b/docs/output/content/tips.js deleted file mode 100644 index 2b125bad..00000000 --- a/docs/output/content/tips.js +++ /dev/null @@ -1,46 +0,0 @@ -var currentTip = null; -var currentTipElement = null; - -function hideTip(evt, name, unique) { - var el = document.getElementById(name); - el.style.display = "none"; - currentTip = null; -} - -function findPos(obj) { - // no idea why, but it behaves differently in webbrowser component - if (window.location.search == "?inapp") - return [obj.offsetLeft + 10, obj.offsetTop + 30]; - - var curleft = 0; - var curtop = obj.offsetHeight; - while (obj) { - curleft += obj.offsetLeft; - curtop += obj.offsetTop; - obj = obj.offsetParent; - }; - return [curleft, curtop]; -} - -function hideUsingEsc(e) { - if (!e) { e = event; } - hideTip(e, currentTipElement, currentTip); -} - -function showTip(evt, name, unique, owner) { - document.onkeydown = hideUsingEsc; - if (currentTip == unique) return; - currentTip = unique; - currentTipElement = name; - - var pos = findPos(owner ? owner : (evt.srcElement ? evt.srcElement : evt.target)); - var posx = pos[0]; - var posy = pos[1]; - - var el = document.getElementById(name); - var parent = (document.documentElement == null) ? document.body : document.documentElement; - el.style.position = "absolute"; - el.style.left = posx + "px"; - el.style.top = posy + "px"; - el.style.display = "block"; -} \ No newline at end of file diff --git a/docs/tools/templates/template.cshtml b/docs/tools/templates/template.cshtml index 952a55fc..a6af7c7e 100644 --- a/docs/tools/templates/template.cshtml +++ b/docs/tools/templates/template.cshtml @@ -50,8 +50,9 @@
  • What's New
  • +
  • Support for .NET Core
  • Configuration and Input
  • -
  • Output
  • +
  • Output
  • FAQ
  • Data Modification
  • From 6ad47c8c6d1cc3cff0a8704ba9f71b1edc218924 Mon Sep 17 00:00:00 2001 From: Sam Hanes Date: Fri, 23 Nov 2018 14:59:52 -0500 Subject: [PATCH 2/2] Fix broken SqlClient ref in docs --- docs/content/bulk load.fsx | 2 +- docs/content/configuration and Input.fsx | 2 +- docs/content/data modification.fsx | 2 +- docs/content/debugging.fsx | 2 +- docs/content/faq.fsx | 2 +- docs/content/index.fsx | 2 +- docs/content/output.fsx | 2 +- docs/content/setup.fsx | 2 +- docs/content/transactions.fsx | 2 +- docs/content/unit-testing.fsx | 4 ++-- docs/content/whatsnew.fsx | 2 +- src/SqlClient.TestProjects/Lib/Script.fsx | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/content/bulk load.fsx b/docs/content/bulk load.fsx index 5fcf80fc..a9d3ee66 100644 --- a/docs/content/bulk load.fsx +++ b/docs/content/bulk load.fsx @@ -1,5 +1,5 @@ (*** hide ***) -#r @"..\..\bin\FSharp.Data.SqlClient.dll" +#r @"..\..\bin\net40\FSharp.Data.SqlClient.dll" #r "System.Transactions" open FSharp.Data open System diff --git a/docs/content/configuration and Input.fsx b/docs/content/configuration and Input.fsx index f6ec5823..a21ad1d5 100644 --- a/docs/content/configuration and Input.fsx +++ b/docs/content/configuration and Input.fsx @@ -1,5 +1,5 @@ (*** hide ***) -#r @"..\..\bin\FSharp.Data.SqlClient.dll" +#r @"..\..\bin\net40\FSharp.Data.SqlClient.dll" #r "Microsoft.SqlServer.Types.dll" (** diff --git a/docs/content/data modification.fsx b/docs/content/data modification.fsx index e1b613f1..5914be03 100644 --- a/docs/content/data modification.fsx +++ b/docs/content/data modification.fsx @@ -1,5 +1,5 @@ (*** hide ***) -#r @"..\..\bin\FSharp.Data.SqlClient.dll" +#r @"..\..\bin\net40\FSharp.Data.SqlClient.dll" #r "System.Transactions" open FSharp.Data open System diff --git a/docs/content/debugging.fsx b/docs/content/debugging.fsx index 9c6ed5ea..8feed77f 100644 --- a/docs/content/debugging.fsx +++ b/docs/content/debugging.fsx @@ -1,5 +1,5 @@ (*** hide ***) -#r @"..\..\bin\FSharp.Data.SqlClient.dll" +#r @"..\..\bin\net40\FSharp.Data.SqlClient.dll" #r "System.Transactions" open FSharp.Data open System diff --git a/docs/content/faq.fsx b/docs/content/faq.fsx index bcf078cb..cf9bc1af 100644 --- a/docs/content/faq.fsx +++ b/docs/content/faq.fsx @@ -1,5 +1,5 @@ (*** hide ***) -#r @"..\..\bin\FSharp.Data.SqlClient.dll" +#r @"..\..\bin\net40\FSharp.Data.SqlClient.dll" #r "System.Transactions" open FSharp.Data diff --git a/docs/content/index.fsx b/docs/content/index.fsx index 25faeba3..f7274cf5 100644 --- a/docs/content/index.fsx +++ b/docs/content/index.fsx @@ -1,6 +1,6 @@ (*** hide ***) #r "Microsoft.SqlServer.Types.dll" -#r @"..\..\bin\FSharp.Data.SqlClient.dll" +#r @"..\..\bin\net40\FSharp.Data.SqlClient.dll" (** Not your grandfather's ORM diff --git a/docs/content/output.fsx b/docs/content/output.fsx index dccc48ea..dfb57761 100644 --- a/docs/content/output.fsx +++ b/docs/content/output.fsx @@ -1,5 +1,5 @@ (*** hide ***) -#r @"..\..\bin\FSharp.Data.SqlClient.dll" +#r @"..\..\bin\net40\FSharp.Data.SqlClient.dll" #r "Microsoft.SqlServer.Types.dll" open FSharp.Data [] diff --git a/docs/content/setup.fsx b/docs/content/setup.fsx index 72641751..21c1a751 100644 --- a/docs/content/setup.fsx +++ b/docs/content/setup.fsx @@ -1,5 +1,5 @@ #nowarn "211" -#r @"..\..\bin\FSharp.Data.SqlClient.dll" +#r @"..\..\bin\net40\FSharp.Data.SqlClient.dll" #r "System.Transactions" open FSharp.Data diff --git a/docs/content/transactions.fsx b/docs/content/transactions.fsx index 54756cdc..bda6224b 100644 --- a/docs/content/transactions.fsx +++ b/docs/content/transactions.fsx @@ -1,5 +1,5 @@ (*** hide ***) -#r @"..\..\bin\FSharp.Data.SqlClient.dll" +#r @"..\..\bin\net40\FSharp.Data.SqlClient.dll" #r "System.Transactions" open FSharp.Data diff --git a/docs/content/unit-testing.fsx b/docs/content/unit-testing.fsx index feba9dc7..2e553b1f 100644 --- a/docs/content/unit-testing.fsx +++ b/docs/content/unit-testing.fsx @@ -1,5 +1,5 @@ (*** hide ***) -#r @"..\..\bin\FSharp.Data.SqlClient.dll" +#r @"..\..\bin\net40\FSharp.Data.SqlClient.dll" #r @"..\..\packages\Test\xunit\lib\net20\xunit.dll" #r "System.Transactions" open FSharp.Data @@ -87,7 +87,7 @@ module MyTests = //unit test let ``best sales rep in Canada``() = - let expected = Some( GetSalesChampion.Record("José", "Saraiva")) + let expected = Some( GetSalesChampion.Record("José", "Saraiva")) assert (bestSalesRepInCanada mockRepository = expected) diff --git a/docs/content/whatsnew.fsx b/docs/content/whatsnew.fsx index 62314d18..f3c401ff 100644 --- a/docs/content/whatsnew.fsx +++ b/docs/content/whatsnew.fsx @@ -1,6 +1,6 @@ (*** hide ***) #r "Microsoft.SqlServer.Types.dll" -#r @"..\..\bin\FSharp.Data.SqlClient.dll" +#r @"..\..\bin\net40\FSharp.Data.SqlClient.dll" open FSharp.Data diff --git a/src/SqlClient.TestProjects/Lib/Script.fsx b/src/SqlClient.TestProjects/Lib/Script.fsx index e96d65eb..cc634497 100644 --- a/src/SqlClient.TestProjects/Lib/Script.fsx +++ b/src/SqlClient.TestProjects/Lib/Script.fsx @@ -1,4 +1,4 @@ -#r @"..\..\..\bin\FSharp.Data.SqlClient.dll" +#r @"..\..\..\bin\net40\FSharp.Data.SqlClient.dll" #r @"bin\Debug\Lib.dll" #r @"System.Configuration" #r @"System.Transactions"