Skip to content

Commit

Permalink
Merge pull request #388 from smoothdeveloper/use-global-json
Browse files Browse the repository at this point in the history
use global.json rather than hardcoded dotnet sdk version in build.fsx
  • Loading branch information
smoothdeveloper authored Nov 15, 2020
2 parents a92db69 + 5454f49 commit 8dd0898
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ let release =
let version = release.AssemblyVersion
let releaseNotes = release.Notes |> String.concat "\n"

let install = lazy DotNet.install DotNet.Versions.Release_2_1_402
let install = lazy DotNet.install DotNet.Versions.FromGlobalJson
let inline dnDefault arg = DotNet.Options.lift install.Value arg

// --------------------------------------------------------------------------------------
Expand Down Expand Up @@ -249,8 +249,8 @@ open Fake.Core.TargetOperators // for ==>
"Clean"
==> "AssemblyInfo"
==> "Build"
==> "BuildTestProjects"
==> "DeployTestDB"
==> "BuildTestProjects"
==> "RunTests"
==> "All"

Expand Down
1 change: 1 addition & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "sdk": { "version": "2.1.402" } }
2 changes: 1 addition & 1 deletion src/SqlClient.TestProjects/Lib/App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<add name="AdventureWorks" connectionString="Data Source=mhknbn2kdz.database.windows.net;Initial Catalog=AdventureWorks2012;Integrated Security=False;User ID=sqlfamily;Password=sqlf@m1ly" />
<add name="AdventureWorks" connectionString="Data Source=localhost;Initial Catalog=AdventureWorks2012;Integrated Security=True" />
</connectionStrings>
</configuration>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
open FSharp.Data

[<Literal>]
let connectionString = "Data Source=mhknbn2kdz.database.windows.net;Initial Catalog=AdventureWorks2012;Integrated Security=False;User ID=sqlfamily;Password=sqlf@m1ly"
let connectionString = "Data Source=localhost;Initial Catalog=AdventureWorks2012;Integrated Security=True"

[<EntryPoint>]
let main _ =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
open FSharp.Data

[<Literal>]
let Cnx = "Data Source=mhknbn2kdz.database.windows.net;Initial Catalog=AdventureWorks2012;Integrated Security=False;User ID=sqlfamily;Password=sqlf@m1ly"
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>
Expand Down

0 comments on commit 8dd0898

Please sign in to comment.