diff --git a/AltCover.Api.Tests/AltCover.Api.Tests.fsproj b/AltCover.Api.Tests/AltCover.Api.Tests.fsproj index eba07c59..30796da0 100644 --- a/AltCover.Api.Tests/AltCover.Api.Tests.fsproj +++ b/AltCover.Api.Tests/AltCover.Api.Tests.fsproj @@ -71,6 +71,22 @@ contentfiles + + + ..\ThirdParty\cecil\Mono.Cecil.dll + + + ..\ThirdParty\cecil\Mono.Cecil.Rocks.dll + + + ..\ThirdParty\cecil\Mono.Cecil.Mdb.dll + + + ..\ThirdParty\cecil\Mono.Cecil.Pdb.dll + + + ..\ThirdParty\Unquote.dll + diff --git a/AltCover.Engine/AltCover.Engine.fsproj b/AltCover.Engine/AltCover.Engine.fsproj index ad48dc82..1ff7febe 100644 --- a/AltCover.Engine/AltCover.Engine.fsproj +++ b/AltCover.Engine/AltCover.Engine.fsproj @@ -81,7 +81,19 @@ all runtime; build; native; contentfiles; analyzers - + + + ..\ThirdParty\cecil\Mono.Cecil.dll + + + ..\ThirdParty\cecil\Mono.Cecil.Rocks.dll + + + ..\ThirdParty\cecil\Mono.Cecil.Mdb.dll + + + ..\ThirdParty\cecil\Mono.Cecil.Pdb.dll + contentfiles diff --git a/AltCover.PowerShell/AltCover.PowerShell.fsproj b/AltCover.PowerShell/AltCover.PowerShell.fsproj index ce90ef0a..014c999b 100644 --- a/AltCover.PowerShell/AltCover.PowerShell.fsproj +++ b/AltCover.PowerShell/AltCover.PowerShell.fsproj @@ -35,6 +35,19 @@ contentfiles + + + ..\ThirdParty\cecil\Mono.Cecil.dll + + + ..\ThirdParty\cecil\Mono.Cecil.Rocks.dll + + + ..\ThirdParty\cecil\Mono.Cecil.Mdb.dll + + + ..\ThirdParty\cecil\Mono.Cecil.Pdb.dll + diff --git a/AltCover.Toolkit/AltCover.Toolkit.fsproj b/AltCover.Toolkit/AltCover.Toolkit.fsproj index 9bf75d2d..e9760e77 100644 --- a/AltCover.Toolkit/AltCover.Toolkit.fsproj +++ b/AltCover.Toolkit/AltCover.Toolkit.fsproj @@ -48,6 +48,22 @@ contentfiles + + + ..\ThirdParty\cecil\Mono.Cecil.dll + + + ..\ThirdParty\cecil\Mono.Cecil.Rocks.dll + + + ..\ThirdParty\cecil\Mono.Cecil.Mdb.dll + + + ..\ThirdParty\cecil\Mono.Cecil.Pdb.dll + + + ..\ThirdParty\Unquote.dll + diff --git a/AltCover.ValidateGendarmeEmulation/AltCover.ValidateGendarmeEmulation.fsproj b/AltCover.ValidateGendarmeEmulation/AltCover.ValidateGendarmeEmulation.fsproj index 8d8c9a99..3568ba5e 100644 --- a/AltCover.ValidateGendarmeEmulation/AltCover.ValidateGendarmeEmulation.fsproj +++ b/AltCover.ValidateGendarmeEmulation/AltCover.ValidateGendarmeEmulation.fsproj @@ -25,7 +25,19 @@ $(GendarmeToolDir)Gendarme.Rules.Maintainability.dll - + + + ..\ThirdParty\cecil\Mono.Cecil.dll + + + ..\ThirdParty\cecil\Mono.Cecil.Rocks.dll + + + ..\ThirdParty\cecil\Mono.Cecil.Mdb.dll + + + ..\ThirdParty\cecil\Mono.Cecil.Pdb.dll + ..\ThirdParty\Unquote.dll diff --git a/AltCover.Visualizer.Tests/AltCover.Visualizer.Tests.fsproj b/AltCover.Visualizer.Tests/AltCover.Visualizer.Tests.fsproj index 6ee7202f..7e9837aa 100644 --- a/AltCover.Visualizer.Tests/AltCover.Visualizer.Tests.fsproj +++ b/AltCover.Visualizer.Tests/AltCover.Visualizer.Tests.fsproj @@ -33,10 +33,25 @@ - contentfiles + + + ..\ThirdParty\cecil\Mono.Cecil.dll + + + ..\ThirdParty\cecil\Mono.Cecil.Rocks.dll + + + ..\ThirdParty\cecil\Mono.Cecil.Mdb.dll + + + ..\ThirdParty\cecil\Mono.Cecil.Pdb.dll + + + ..\ThirdParty\Unquote.dll + diff --git a/Build/targets.fs b/Build/targets.fs index aa739c92..e2ac8ef4 100644 --- a/Build/targets.fs +++ b/Build/targets.fs @@ -1,4 +1,10 @@ // Downloads/docker-machine-Windows-x86_64 create --driver virtualbox + +//copy ..\cecil\bin\Release\netstandard2.0\Mono.Cecil.dll .\ThirdParty\cecil\ -force +//copy ..\cecil\rocks\bin\Release\netstandard2.0\Mono.Cecil.Rocks.dll .\ThirdParty\cecil\ -force +//copy ..\cecil\symbols\mdb\bin\Release\netstandard2.0\Mono.Cecil.Mdb.dll .\ThirdParty\cecil\ -force +//copy ..\cecil\symbols\pdb\bin\Release\netstandard2.0\Mono.Cecil.Pdb.dll .\ThirdParty\cecil\ -force + namespace AltCover module Targets = @@ -33,6 +39,21 @@ module Targets = let mutable Copyright = String.Empty let mutable Version = String.Empty + let localCecil = + let xml = + "./Directory.Build.props" + |> Path.getFullName + |> XDocument.Load + + xml.Descendants() + |> Seq.filter (fun (e: XElement) -> + e.Name.LocalName.Equals("LocalCecil", StringComparison.OrdinalIgnoreCase)) + |> Seq.map (fun x -> x.Value |> Boolean.TryParse |> snd) + |> Seq.tryLast + |> Option.defaultValue false + + printfn "Local Cecil = %A" localCecil + let currentBranch = "." |> Path.getFullName @@ -579,7 +600,13 @@ module Targets = let dotnetBuildDebug proj = DotNet.build (fun p -> - { p.WithCommon(dotnetOptions >> dotnetOptionsWithSkipGtkInstall) with + { p.WithCommon( + dotnetOptions + >> dotnetOptionsWithSkipGtkInstall + >> (fun o -> + { o with + Verbosity = Some DotNet.Verbosity.Minimal }) + ) with Configuration = DotNet.BuildConfiguration.Debug } |> buildWithCLIArguments) (Path.GetFullPath proj) @@ -1425,10 +1452,13 @@ module Targets = @@ "gtksharp/" + (ddItem "gtksharp") + "/lib/netstandard2.0" - nugetCache - @@ "mono.cecil/" - + (ddItem "mono.cecil") - + "/lib/netstandard2.0" + if localCecil then + Path.GetFullPath "./ThirdParty/cecil" + else + nugetCache + @@ "mono.cecil/" + + (ddItem "mono.cecil") + + "/lib/netstandard2.0" nugetCache @@ "mono.options/" + (ddItem "mono.options") @@ -1477,10 +1507,20 @@ module Targets = |> Path.getFullName |> XDocument.Load + let skip = + if localCecil then + "mono.cecil" + else + "$$$$$$$" + let packages = xml.Descendants(XName.Get("PackageReference")) |> Seq.filter (_.Attribute(XName.Get("Include")) >> isNull >> not) |> Seq.map _.Attribute(XName.Get("Include")).Value + |> Seq.filter ( + _.Equals(skip, StringComparison.OrdinalIgnoreCase) + >> not + ) //CECIL |> Seq.toList let dirs = @@ -4572,10 +4612,12 @@ module Targets = "AltCover.Fake" "AltCover.Cake" "Recorder" + "Mono" "DataCollector" "FSharp" ] InPlace = false ReportFormat = "OpenCover" + LocalSource = true Save = true VisibleBranches = true } ) @@ -8080,6 +8122,8 @@ module Targets = "AltCover.Tests/OpenCoverWithPartials.xml" "AltCover.Tests/Sample4FullTracking.xml" "_Reports/AltCoverAsyncAwaitTests.xml" + "_Reports/Pester.xml" + "_Reports/RawPester.xml" "RegressionTesting/issue37/coverage.xml" "Samples/Sample16/Test/_Issue72/combined.Test.xml" "Samples/Sample16/Test/_Issue72/original.Test.xml" diff --git a/Directory.Build.props b/Directory.Build.props index ba06705f..fd228be7 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -6,11 +6,12 @@ true false + true - + all diff --git a/Directory.Packages.props b/Directory.Packages.props index bfdca6e3..3de35cd1 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -55,7 +55,7 @@ - + diff --git a/MCS/MCS.fsproj b/MCS/MCS.fsproj index 71fd8d85..515b0445 100644 --- a/MCS/MCS.fsproj +++ b/MCS/MCS.fsproj @@ -23,7 +23,19 @@ - + + + ..\ThirdParty\cecil\Mono.Cecil.dll + + + ..\ThirdParty\cecil\Mono.Cecil.Rocks.dll + + + ..\ThirdParty\cecil\Mono.Cecil.Mdb.dll + + + ..\ThirdParty\cecil\Mono.Cecil.Pdb.dll + diff --git a/ThirdParty/Mono.Options.txt b/ThirdParty/Mono.Options.txt index d22a1b4c..09e7660c 100644 --- a/ThirdParty/Mono.Options.txt +++ b/ThirdParty/Mono.Options.txt @@ -1,2 +1,8 @@ ildasm /all /out=Mono.Options.il Mono.Options.dll -ilasm /dll /output=..\ThirdParty\Mono.Options.dll /key=..\ThirdParty\ThirdParty.snk /resource=Mono.Options.res Mono.Options.il \ No newline at end of file +ilasm /dll /output=..\ThirdParty\Mono.Options.dll /key=..\ThirdParty\ThirdParty.snk /resource=Mono.Options.res Mono.Options.il + + +ildasm /all /out=Mono.Cecil.il .\cecil\Mono.Cecil.dll + + var sha1 = new SHA1CryptoServiceProvider (); +ilasm /dll /output=Mono.Cecil.dll /key=.\cecil.snk /resource=.\Mono.Cecil.res .\Mono.Cecil.il \ No newline at end of file diff --git a/ThirdParty/cecil.snk b/ThirdParty/cecil.snk new file mode 100644 index 00000000..c0380d19 Binary files /dev/null and b/ThirdParty/cecil.snk differ diff --git a/ThirdParty/cecil/Mono.Cecil.Mdb.dll b/ThirdParty/cecil/Mono.Cecil.Mdb.dll new file mode 100644 index 00000000..d2bde99b Binary files /dev/null and b/ThirdParty/cecil/Mono.Cecil.Mdb.dll differ diff --git a/ThirdParty/cecil/Mono.Cecil.Mdb.pdb b/ThirdParty/cecil/Mono.Cecil.Mdb.pdb new file mode 100644 index 00000000..402cc402 Binary files /dev/null and b/ThirdParty/cecil/Mono.Cecil.Mdb.pdb differ diff --git a/ThirdParty/cecil/Mono.Cecil.Pdb.dll b/ThirdParty/cecil/Mono.Cecil.Pdb.dll new file mode 100644 index 00000000..86d3e3a8 Binary files /dev/null and b/ThirdParty/cecil/Mono.Cecil.Pdb.dll differ diff --git a/ThirdParty/cecil/Mono.Cecil.Pdb.pdb b/ThirdParty/cecil/Mono.Cecil.Pdb.pdb new file mode 100644 index 00000000..c13394b6 Binary files /dev/null and b/ThirdParty/cecil/Mono.Cecil.Pdb.pdb differ diff --git a/ThirdParty/cecil/Mono.Cecil.Rocks.dll b/ThirdParty/cecil/Mono.Cecil.Rocks.dll new file mode 100644 index 00000000..a958ff9a Binary files /dev/null and b/ThirdParty/cecil/Mono.Cecil.Rocks.dll differ diff --git a/ThirdParty/cecil/Mono.Cecil.Rocks.pdb b/ThirdParty/cecil/Mono.Cecil.Rocks.pdb new file mode 100644 index 00000000..146d3fb7 Binary files /dev/null and b/ThirdParty/cecil/Mono.Cecil.Rocks.pdb differ diff --git a/ThirdParty/cecil/Mono.Cecil.dll b/ThirdParty/cecil/Mono.Cecil.dll new file mode 100644 index 00000000..afac212f Binary files /dev/null and b/ThirdParty/cecil/Mono.Cecil.dll differ diff --git a/ThirdParty/cecil/Mono.Cecil.pdb b/ThirdParty/cecil/Mono.Cecil.pdb new file mode 100644 index 00000000..16e9b414 Binary files /dev/null and b/ThirdParty/cecil/Mono.Cecil.pdb differ