Skip to content

Commit 945535e

Browse files
nuspec for the Microsoft.Data.SqlClient version, separate build output folders, adjust build script NuGet target to handle both packages
1 parent 65eb881 commit 945535e

16 files changed

Lines changed: 89 additions & 42 deletions

build/build.fs

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ let systemSqlProject = {|
3434
testProjectsSlnPath = makeRootPath "TestProjects.sln"
3535
testSlnPath = makeRootPath "Tests.sln"
3636
testProjectPath = makeRootPath "tests/SqlClient.Tests/SqlClient.Tests.fsproj"
37-
37+
nugetSpec = "nuget/SqlClient.nuspec"
3838
|}
3939
let microsoftSqlProject = {|
4040
runtime = "FSharp.Data.MicrosoftSqlClient"
@@ -43,6 +43,7 @@ let microsoftSqlProject = {|
4343
testProjectsSlnPath = makeRootPath "MicrosoftTestProjects.sln"
4444
testSlnPath = makeRootPath "MicrosoftTests.sln"
4545
testProjectPath = makeRootPath "tests/SqlClient.Tests/MicrosoftSqlClient.Tests.fsproj"
46+
nugetSpec = "nuget/MicrosoftSqlClient.nuspec"
4647
|}
4748

4849
let projects = [systemSqlProject;microsoftSqlProject]
@@ -351,21 +352,22 @@ Target.create "NuGet" (fun _ ->
351352
let description = description.Replace("\r", "").Replace("\n", "").Replace(" ", " ")
352353
let nugetPath = "packages/build/NuGet.CommandLine/tools/NuGet.exe"
353354

354-
Fake.DotNet.NuGet.NuGet.NuGet (fun p ->
355-
{ p with
356-
Authors = authors
357-
Project = systemSqlProject.runtime
358-
Summary = summary
359-
Description = description
360-
Version = version
361-
ReleaseNotes = releaseNotes
362-
Tags = tags
363-
OutputPath = "nuget"
364-
ToolPath = nugetPath
365-
AccessKey = Fake.Core.Environment.environVarOrDefault "nugetkey" ""
366-
Publish = Fake.Core.Environment.hasEnvironVar "nugetkey"
367-
Dependencies = [] })
368-
"nuget/SqlClient.nuspec"
355+
for entry in projects do
356+
Fake.DotNet.NuGet.NuGet.NuGet (fun p ->
357+
{ p with
358+
Authors = authors
359+
Project = entry.runtime
360+
Summary = summary
361+
Description = description
362+
Version = version
363+
ReleaseNotes = releaseNotes
364+
Tags = tags
365+
OutputPath = "nuget"
366+
ToolPath = nugetPath
367+
AccessKey = Fake.Core.Environment.environVarOrDefault "nugetkey" ""
368+
Publish = Fake.Core.Environment.hasEnvironVar "nugetkey"
369+
Dependencies = [] })
370+
entry.nugetSpec
369371
)
370372

371373
// --------------------------------------------------------------------------------------

nuget/MicrosoftSqlClient.nuspec

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
3+
<metadata>
4+
<id>@project@</id>
5+
<version>@build.number@</version>
6+
<authors>@authors@</authors>
7+
<owners>@authors@</owners>
8+
<licenseUrl>http://github.com/fsprojects/FSharp.Data.SqlClient/blob/master/LICENSE.md</licenseUrl>
9+
<projectUrl>http://fsprojects.github.io/FSharp.Data.SqlClient/</projectUrl>
10+
<iconUrl>https://raw.githubusercontent.com/fsprojects/FSharp.Data.SqlClient/master/docs/files/img/logo.png</iconUrl>
11+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
12+
<description>@description@</description>
13+
<summary>@summary@</summary>
14+
<releaseNotes>@releaseNotes@</releaseNotes>
15+
<copyright>Copyright 2015</copyright>
16+
<tags>@tags@</tags>
17+
<frameworkAssemblies>
18+
<frameworkAssembly assemblyName="System.Data" targetFramework="net462" />
19+
<frameworkAssembly assemblyName="System.Xml" targetFramework="net462" />
20+
</frameworkAssemblies>
21+
<references>
22+
<reference file="FSharp.Data.MicrosoftSqlClient.dll" />
23+
</references>
24+
<dependencies>
25+
<group targetFramework="net462">
26+
<dependency id="FSharp.Core" version="8.0.301" />
27+
</group>
28+
<group targetFramework="netstandard2.0">
29+
<dependency id="FSharp.Core" version="8.0.301" />
30+
<dependency id="Microsoft.Data.SqlClient" version="6.1.4" />
31+
<dependency id="System.Configuration.ConfigurationManager" version="9.0.4" />
32+
</group>
33+
<group targetFramework="net8.0">
34+
<dependency id="FSharp.Core" version="8.0.301" />
35+
<dependency id="Microsoft.Data.SqlClient" version="6.1.4" />
36+
<dependency id="System.Configuration.ConfigurationManager" version="9.0.4" />
37+
</group>
38+
</dependencies>
39+
</metadata>
40+
<files>
41+
<file src="..\bin\microsoftsqlclient\**\*.*" exclude="**\*.deps.json" target="lib" />
42+
</files>
43+
</package>

nuget/SqlClient.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@
3838
</dependencies>
3939
</metadata>
4040
<files>
41-
<file src="..\bin\**\*.*" exclude="**\*.deps.json" target="lib" />
41+
<file src="..\bin\sqlclient\**\*.*" exclude="**\*.deps.json" target="lib" />
4242
</files>
4343
</package>

src/SqlClient.DesignTime/MicrosoftSqlClient.DesignTime.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
1010
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
1111
<NoWarn>$(NoWarn);101;44</NoWarn>
12-
<OutputPath>..\..\bin\typeproviders\fsharp41</OutputPath>
12+
<OutputPath>..\..\bin\microsoftsqlclient\typeproviders\fsharp41</OutputPath>
1313

1414
<!--
1515
note: TypeProvider SDK comes with few warnings

src/SqlClient.DesignTime/SqlClient.DesignTime.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
1010
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
1111
<NoWarn>$(NoWarn);101</NoWarn>
12-
<OutputPath>..\..\bin\typeproviders\fsharp41</OutputPath>
12+
<OutputPath>..\..\bin\sqlclient\typeproviders\fsharp41</OutputPath>
1313

1414
<!--
1515
note: TypeProvider SDK comes with few warnings

src/SqlClient.TestProjects/Lib/Lib.fsproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
<ItemGroup>
2121
<Reference Include="netstandard" />
2222
<Reference Condition="'$(TargetFramework)' == 'net8.0'" Include="FSharp.Data.SqlClient">
23-
<HintPath>..\..\..\bin\net8.0\FSharp.Data.SqlClient.dll</HintPath>
23+
<HintPath>..\..\..\bin\sqlclient\net8.0\FSharp.Data.SqlClient.dll</HintPath>
2424
</Reference>
2525
<Reference Condition="'$(TargetFramework)' == 'netstandard2.0'" Include="FSharp.Data.SqlClient">
26-
<HintPath>..\..\..\bin\netstandard2.0\FSharp.Data.SqlClient.dll</HintPath>
26+
<HintPath>..\..\..\bin\sqlclient\netstandard2.0\FSharp.Data.SqlClient.dll</HintPath>
2727
</Reference>
2828
<Reference Condition="'$(TargetFramework)' == 'net471'" Include="FSharp.Data.SqlClient">
29-
<HintPath>..\..\..\bin\net462\FSharp.Data.SqlClient.dll</HintPath>
29+
<HintPath>..\..\..\bin\sqlclient\net462\FSharp.Data.SqlClient.dll</HintPath>
3030
</Reference>
3131
</ItemGroup>
3232
<Import Project="..\..\..\.paket\Paket.Restore.targets" />

src/SqlClient.TestProjects/SqlClient.Tests.NET40/SqlClient.Tests.NET40.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<Reference Include="System.Data" />
2424
<Reference Include="System.Xml" />
2525
<Reference Include="FSharp.Data.SqlClient">
26-
<HintPath>..\..\..\bin\net462\FSharp.Data.SqlClient.dll</HintPath>
26+
<HintPath>..\..\..\bin\sqlclient\net462\FSharp.Data.SqlClient.dll</HintPath>
2727
</Reference>
2828
</ItemGroup>
2929
<Import Project="..\..\..\.paket\Paket.Restore.targets" />

src/SqlClient.TestProjects/SqlClient.Tests.NetCoreApp/SqlClient.Tests.NetCoreApp.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99
<ItemGroup>
1010
<Reference Include="FSharp.Data.SqlClient">
11-
<HintPath>..\..\..\bin\net8.0\FSharp.Data.SqlClient.dll</HintPath>
11+
<HintPath>..\..\..\bin\sqlclient\net8.0\FSharp.Data.SqlClient.dll</HintPath>
1212
</Reference>
1313
</ItemGroup>
1414
<ItemGroup>

src/SqlClient/MicrosoftSqlClient.fsproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<DefineConstants>$(DefineConstants);DEBUG;TRACE</DefineConstants>
1919
</PropertyGroup>
2020
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
21-
<DocumentationFile>..\..\bin\$(TargetFramework)\FSharp.Data.MicrosoftSqlClient.XML</DocumentationFile>
21+
<DocumentationFile>..\..\bin\microsoftsqlclient\$(TargetFramework)\FSharp.Data.MicrosoftSqlClient.XML</DocumentationFile>
2222
</PropertyGroup>
2323
<ItemGroup>
2424
<PackageReference Include="FSharp.Core" Version="8.0.301" />
@@ -43,6 +43,6 @@
4343
<ItemGroup>
4444
<RuntimeAssemblies Include="$(OutputPath)\FSharp.Data.MicrosoftSqlClient.*" />
4545
</ItemGroup>
46-
<Copy SourceFiles="@(RuntimeAssemblies)" DestinationFolder="..\..\bin\$(TargetFramework)" />
46+
<Copy SourceFiles="@(RuntimeAssemblies)" DestinationFolder="..\..\bin\microsoftsqlclient\$(TargetFramework)" />
4747
</Target>
4848
</Project>

src/SqlClient/SqlClient.fsproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<DefineConstants>$(DefineConstants);DEBUG;TRACE</DefineConstants>
1919
</PropertyGroup>
2020
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
21-
<DocumentationFile>..\..\bin\net462\FSharp.Data.SqlClient.XML</DocumentationFile>
21+
<DocumentationFile>..\..\bin\sqlclient\$(TargetFramework)\FSharp.Data.SqlClient.XML</DocumentationFile>
2222
</PropertyGroup>
2323
<ItemGroup>
2424
<PackageReference Include="FSharp.Core" Version="8.0.301" />
@@ -43,6 +43,6 @@
4343
<ItemGroup>
4444
<RuntimeAssemblies Include="$(OutputPath)\FSharp.Data.SqlClient.*" />
4545
</ItemGroup>
46-
<Copy SourceFiles="@(RuntimeAssemblies)" DestinationFolder="..\..\bin\$(TargetFramework)" />
46+
<Copy SourceFiles="@(RuntimeAssemblies)" DestinationFolder="..\..\bin\sqlclient\$(TargetFramework)" />
4747
</Target>
4848
</Project>

0 commit comments

Comments
 (0)