@@ -43,6 +43,8 @@ let tags = "nuget, bundler, F#"
4343let solutionFile = " Paket.sln"
4444
4545// Pattern specifying assemblies to be tested using NUnit
46+ let testAssemblies = " tests/**/bin/Release/net461/*Tests*.dll"
47+ let integrationTestAssemblies = " integrationtests/Paket.IntegrationTests/bin/Release/net461/*Tests*.dll"
4648
4749// Git configuration (used for publishing documentation in gh-pages branch)
4850// The profile where the project is posted
@@ -64,8 +66,10 @@ let mutable dotnetExePath = "dotnet"
6466// --------------------------------------------------------------------------------------
6567
6668let buildDir = " bin"
69+ let buildDirNet461 = buildDir @@ " net461"
6770let buildDirNet = buildDir @@ " net8"
6871let buildDirBootstrapper = " bin_bootstrapper"
72+ let buildDirBootstrapperNet461 = buildDirBootstrapper @@ " net461"
6973let buildDirBootstrapperNet = buildDirBootstrapper @@ " net8"
7074let tempDir = " temp"
7175let buildMergedDir = buildDir @@ " merged"
@@ -110,8 +114,11 @@ Target "InstallDotNetCore" (fun _ ->
110114Target " Clean" ( fun _ ->
111115 !! " src/**/bin"
112116 ++ " tests/**/bin"
117+ ++ buildDir
118+ ++ buildDirNet461
113119 ++ buildDirNet
114120 ++ buildDirBootstrapper
121+ ++ buildDirBootstrapperNet461
115122 ++ buildDirBootstrapperNet
116123 ++ tempDir
117124 |> CleanDirs
@@ -180,6 +187,15 @@ Target "Publish" (fun _ ->
180187 ] // since no build, we have to ensure that the build sets assemblyinfo correctly, especially because the publish output of this step
181188 // is used in the ILRepack of the .net executable
182189
190+ DotNetCli.Publish ( fun c ->
191+ { c with
192+ Project = " src/Paket"
193+ Framework = " net461"
194+ Output = FullName ( currentDirectory </> buildDirNet461)
195+ ToolPath = dotnetExePath
196+ AdditionalArgs = publishArgs
197+ })
198+
183199 DotNetCli.Publish ( fun c ->
184200 { c with
185201 Project = " src/Paket"
@@ -189,6 +205,15 @@ Target "Publish" (fun _ ->
189205 AdditionalArgs = publishArgs
190206 })
191207
208+ DotNetCli.Publish ( fun c ->
209+ { c with
210+ Project = " src/Paket.Bootstrapper"
211+ Framework = " net461"
212+ Output = FullName ( currentDirectory </> buildDirBootstrapperNet461)
213+ ToolPath = dotnetExePath
214+ AdditionalArgs = publishArgs
215+ })
216+
192217 DotNetCli.Publish ( fun c ->
193218 { c with
194219 Project = " src/Paket.Bootstrapper"
@@ -222,8 +247,10 @@ Target "RunTests" (fun _ ->
222247 ToolPath = dotnetExePath
223248 })
224249
250+ runTest " net" " Paket.Tests" " net461"
225251 runTest " netcore" " Paket.Tests" " net8"
226252
253+ runTest " net" " Paket.Bootstrapper.Tests" " net461"
227254 runTest " netcore" " Paket.Bootstrapper.Tests" " net8"
228255)
229256
@@ -256,9 +283,46 @@ Target "QuickIntegrationTests" (fun _ ->
256283
257284Target " MergePaketTool" ( fun _ ->
258285 CreateDir buildMergedDir
286+ let inBuildDirNet461 ( file : string ) = buildDirNet461 @@ file
287+
288+ // syntax for ilrepack requires the 'primary' assembly to be the first positional argument, so we enforce that by not making
289+ // paket.exe part of the ordered 'component' libraries
290+ let primaryExe = inBuildDirNet461 " paket.exe"
259291
292+ let mergeLibs =
293+ [
294+ " Argu.dll"
295+ " Chessie.dll"
296+ " Fake.Core.ReleaseNotes.dll"
297+ " FSharp.Core.dll"
298+ " Mono.Cecil.dll"
299+ " Newtonsoft.Json.dll"
300+ " NuGet.Common.dll"
301+ " NuGet.Configuration.dll"
302+ " NuGet.Frameworks.dll"
303+ " NuGet.Packaging.dll"
304+ " NuGet.Versioning.dll"
305+ " Paket.Core.dll"
306+ " System.Buffers.dll"
307+ " System.Configuration.ConfigurationManager.dll"
308+ " System.Memory.dll"
309+ " System.Net.Http.WinHttpHandler.dll"
310+ " System.Numerics.Vectors.dll"
311+ " System.Runtime.CompilerServices.Unsafe.dll"
312+ " System.Security.Cryptography.Cng.dll"
313+ " System.Security.Cryptography.Pkcs.dll"
314+ " System.Threading.Tasks.Extensions.dll"
315+ ]
316+ |> List.map inBuildDirNet461
317+ |> separated " "
260318
261- () // no more ILRepack
319+ let result =
320+ ExecProcess ( fun info ->
321+ info.FileName <- currentDirectory </> " packages" </> " build" </> " ILRepack" </> " tools" </> " ILRepack.exe"
322+ info.Arguments <- sprintf " /copyattrs /lib:%s /ver:%s /out:%s %s %s " buildDirNet461 release.AssemblyVersion paketFile primaryExe mergeLibs
323+ ) ( TimeSpan.FromMinutes 5. )
324+
325+ if result <> 0 then failwithf " Error during ILRepack execution."
262326)
263327" Publish" ==> " MergePaketTool"
264328
@@ -271,7 +335,7 @@ Target "RunIntegrationTestsNet" (fun _ ->
271335 DotNetCli.Test ( fun c ->
272336 { c with
273337 Project = " integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.fsproj"
274- Framework = " net8 "
338+ Framework = " net461 "
275339 AdditionalArgs =
276340 [ " --filter" ; ( if testSuiteFilterFlakyTests then " TestCategory=Flaky" else " TestCategory!=Flaky" )
277341 sprintf " --logger:trx;LogFileName=%s " ( " tests_result/net/Paket.IntegrationTests/TestResult.trx" |> Path.GetFullPath) ]
@@ -406,7 +470,7 @@ Target "PublishNuGet" (fun _ ->
406470// --------------------------------------------------------------------------------------
407471// Generate the documentation
408472
409- let disableDocs = true // https://github.com/fsprojects/FSharp.Formatting/issues/461
473+ let disableDocs = false // https://github.com/fsprojects/FSharp.Formatting/issues/461
410474
411475let fakePath = __ SOURCE_ DIRECTORY__ @@ " packages" @@ " build" @@ " FAKE" @@ " tools" @@ " FAKE.exe"
412476let fakeStartInfo fsiargs script workingDirectory args environmentVars =
@@ -593,6 +657,7 @@ Target "ReleaseGitHub" (fun _ ->
593657 |> uploadFile " ./bin/merged/paket.exe"
594658 |> uploadFile " ./bin/merged/paket-sha256.txt"
595659 |> uploadFile " ./src/FSharp.DependencyManager.Paket/bin/Release/netstandard2.0/FSharp.DependencyManager.Paket.dll"
660+ |> uploadFile " ./bin_bootstrapper/net461/paket.bootstrapper.exe"
596661 |> uploadFile " .paket/paket.targets"
597662 |> uploadFile " .paket/Paket.Restore.targets"
598663 |> uploadFile ( tempDir </> sprintf " Paket.%s .nupkg" ( release.NugetVersion))
0 commit comments