Skip to content

Commit c96a2e2

Browse files
Merge pull request fsprojects#399 from smoothdeveloper/legacy-namespace-cleanup
Legacy namespace cleanup
2 parents b4ee827 + c45a266 commit c96a2e2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1075
-734
lines changed

.github/workflows/dotnet-core.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ jobs:
2222
env:
2323
FSHARP_DATA_SQLCLIENT_USE_SQLLOCALDB_FOR_TESTS: 1
2424
run: |
25-
call "C:\Program Files\Microsoft SQL Server\130\Tools\Binn\SqlLocalDB.exe" info
26-
./build.cmd
25+
"C:/Program Files/Microsoft SQL Server/130/Tools/Binn/SqlLocalDB.exe" info
26+
./build.cmd

build.fsx

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,35 @@ let slnPath = "SqlClient.sln"
7575
let testProjectsSlnPath = "TestProjects.sln"
7676
let testSlnPath = "Tests.sln"
7777
let testProjectPath = "tests/SqlClient.Tests/SqlClient.Tests.fsproj"
78+
let runMsBuild project =
79+
Fake.DotNet.MSBuild.build
80+
(fun args ->
81+
let toolPath =
82+
[
83+
@"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin"
84+
@"C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\current\Bin"
85+
@"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\current\Bin"
86+
@"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\current\Bin"
87+
@"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin"
88+
@"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin"
89+
@"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin"
90+
@"C:\Program Files (x86)\MSBuild\15.0\Bin"
91+
@"\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin"
92+
args.ToolPath
93+
]
94+
|> List.map (fun p -> Path.Combine(p, "MSBuild.exe"))
95+
|> List.find File.Exists
96+
let properties =
97+
[ yield "Configuration", "Release"
98+
for n,v in args.Properties do
99+
if n <> "Configuration" then
100+
yield n,v
101+
]
102+
{ args
103+
with ToolPath = toolPath
104+
Properties = properties
105+
} ) project
106+
78107

79108
Target.create "Clean" (fun _ ->
80109
Shell.cleanDirs ["bin"; "temp"]
@@ -165,21 +194,17 @@ Target.create "DeployTestDB" (fun _ ->
165194
)
166195

167196
Target.create "BuildTestProjects" (fun _ ->
168-
DotNet.build
169-
(fun args ->
170-
{
171-
args with
172-
Configuration = DotNet.Release
173-
//Common = { args.Common with Verbosity = Some DotNet.Verbosity.Detailed }
174-
} |> dnDefault)
175-
testProjectsSlnPath
197+
DotNet.restore dnDefault testProjectsSlnPath
198+
runMsBuild testProjectsSlnPath
176199
)
177200

178201
// --------------------------------------------------------------------------------------
179202
// Run the unit tests
180203
Target.create "RunTests" (fun _ ->
181204
// if we don't compile the targets sequentially, we get an error with the generated types:
182205
// System.IO.IOException: The process cannot access the file 'C:\Users\foo\AppData\Local\Temp\tmpF38.dll' because it is being used by another process.
206+
DotNet.restore dnDefault testSlnPath
207+
runMsBuild testSlnPath
183208
try
184209
DotNet.test (fun args -> { args with Framework = Some "net461"; Common = args.Common |> dnDefault }) testSlnPath
185210
DotNet.test (fun args -> { args with Framework = Some "netcoreapp2.0"; Common = args.Common |> dnDefault }) testProjectPath

paket.dependencies

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
source https://www.nuget.org/api/v2/
22
generate_load_scripts: on
3-
3+
storage: none
44
github fsprojects/FSharp.TypeProviders.SDK:28a24a69ada68ebd1ad25226634f4608e4875493 src/ProvidedTypes.fs
55
github fsprojects/FSharp.TypeProviders.SDK:28a24a69ada68ebd1ad25226634f4608e4875493 src/ProvidedTypes.fsi
66
github fsprojects/FSharp.TypeProviders.SDK:28a24a69ada68ebd1ad25226634f4608e4875493 src/ProvidedTypesTesting.fs
@@ -9,7 +9,7 @@ group Build
99
source https://www.nuget.org/api/v2/
1010
framework: >= net451
1111
generate_load_scripts: on
12-
12+
1313
nuget FAKE = 5.8.4
1414
nuget Fake.Lib = 5.8.4
1515

@@ -21,8 +21,9 @@ group Build
2121

2222
group DesignTime
2323
source https://www.nuget.org/api/v2/
24-
framework: >= net461,netstandard20
25-
24+
framework: >= net461, >= netstandard20
25+
storage: none
26+
2627
nuget System.Configuration.ConfigurationManager
2728
nuget System.Data.Common
2829
nuget System.Data.SqlClient
@@ -33,9 +34,10 @@ group DesignTime
3334

3435
group Test
3536
source https://www.nuget.org/api/v2/
36-
framework: net461, netcoreapp2.0
37+
framework: >= net461, >= netcoreapp2.0
38+
storage: none
3739

38-
nuget FSharp.Core = 4.5.2 redirects:force
40+
nuget FSharp.Core = 5.0.0 redirects:force
3941
nuget System.Data.SqlClient
4042
nuget System.Configuration.ConfigurationManager
4143

@@ -47,12 +49,14 @@ group Test
4749
group Net40
4850
source https://www.nuget.org/api/v2/
4951
framework: net40
52+
storage: none
5053

5154
nuget FSharp.Core = 4.1.18
5255

5356
group TestProjects
5457
source https://www.nuget.org/api/v2/
55-
framework: >= net40, netcoreapp2.0, netstandard2.0
58+
framework: >= net40, >= netcoreapp2.0, >= netstandard2.0
59+
storage: none
5660

5761
nuget FSharp.Core = 4.3.4
5862

@@ -61,14 +65,17 @@ group TestProjects
6165

6266
group Samples
6367
source https://www.nuget.org/api/v2/
64-
framework: >= net40
65-
66-
nuget FSharp.Core = 4.5.2
68+
framework: >= net40, >= netcoreapp2.0, >= netstandard2.0
69+
redirects: on
70+
71+
nuget FSharp.Core = 4.5.2 redirects: force
6772

6873
nuget Microsoft.AspNet.WebApi
6974
nuget Microsoft.AspNet.WebApi.Client
7075
nuget Microsoft.AspNet.WebApi.Core
7176
nuget Microsoft.AspNet.WebApi.WebHost
77+
nuget Microsoft.SqlServer.Types
7278

73-
nuget Newtonsoft.Json
79+
nuget Newtonsoft.Json redirects: force
7480
nuget FSharp.Data.SqlClient
81+

0 commit comments

Comments
 (0)