From def8424f7d81ffb68bb6245d73a40cc5ffa8c8d4 Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Tue, 22 Feb 2022 08:36:03 -0600 Subject: [PATCH] add net472 build, use separate FSharp.Core for VS targeting? --- CHANGELOG.md | 6 ++++ .../Ionide.KeepAChangelog.Tasks.fsproj | 33 +++++++++++++++---- src/Ionide.KeepAChangelog.Tasks/Library.fs | 6 ++-- .../build/Ionide.KeepAChangelog.Tasks.targets | 8 ++++- .../Ionide.KeepAChangelog.Tasks.targets | 7 +++- .../Ionide.KeepAChangelog.fsproj | 9 +++-- src/Ionide.KeepAChangelog/Library.fs | 10 +++--- 7 files changed, 59 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 592a503..5f1ac60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [0.1.3] - 2022.02.21 + +### Added + +- Now supports running in Visual Studio thanks to a net472-targeted build and packaging + ## [0.1.2] - 2022.02.13 ### Added diff --git a/src/Ionide.KeepAChangelog.Tasks/Ionide.KeepAChangelog.Tasks.fsproj b/src/Ionide.KeepAChangelog.Tasks/Ionide.KeepAChangelog.Tasks.fsproj index bd52d89..d3ba85a 100644 --- a/src/Ionide.KeepAChangelog.Tasks/Ionide.KeepAChangelog.Tasks.fsproj +++ b/src/Ionide.KeepAChangelog.Tasks/Ionide.KeepAChangelog.Tasks.fsproj @@ -1,18 +1,18 @@  - netstandard2.0 + netstandard2.0;net472 true $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage embedded true MSBuild Tasks and Targets that set your Assembly Version, Package Version, and Package Release Notes from your KeepAChangelog-compatible Changelogs. - 0.1.2 + 0.1.3 ### Added -- Now supports multiTargeted builds and packs by the addition of the buildMultiTargeting folder. The outer build is hooked at the GenerateNuspec target. +- Now supports running in Visual Studio thanks to a net472-targeted build and packaging @@ -21,26 +21,45 @@ - + + - + + + + + all + runtime; build; native; contentfiles; analyzers + - + + + + + + + + + + + - + + + diff --git a/src/Ionide.KeepAChangelog.Tasks/Library.fs b/src/Ionide.KeepAChangelog.Tasks/Library.fs index 4fc8095..debb8fd 100644 --- a/src/Ionide.KeepAChangelog.Tasks/Library.fs +++ b/src/Ionide.KeepAChangelog.Tasks/Library.fs @@ -21,7 +21,7 @@ module Util = let section name items = match items with | [] -> [] - | items -> $"### {name}" :: items @ [ "" ] + | items -> sprintf "### %s" name :: items @ [ "" ] String.concat System.Environment.NewLine @@ -70,7 +70,7 @@ type ParseChangelogs() = let file = this.ChangelogFile |> FileInfo if not file.Exists then - this.Log.LogError($"The file {file.FullName} could not be found.") + this.Log.LogError(sprintf "The file %s could not be found." file.FullName) false else match Parser.parseChangeLog file with @@ -111,7 +111,7 @@ type ParseChangelogs() = | Error (formatted, msg) -> this.Log.LogError( - $"Error parsing Changelog at {file.FullName}. The error occurred at {msg.Position}.{System.Environment.NewLine}{formatted}" + sprintf "Error parsing Changelog at %s. The error occurred at %O.%s%s" file.FullName msg.Position System.Environment.NewLine formatted ) false diff --git a/src/Ionide.KeepAChangelog.Tasks/build/Ionide.KeepAChangelog.Tasks.targets b/src/Ionide.KeepAChangelog.Tasks/build/Ionide.KeepAChangelog.Tasks.targets index ccbdfc7..4fe15fc 100644 --- a/src/Ionide.KeepAChangelog.Tasks/build/Ionide.KeepAChangelog.Tasks.targets +++ b/src/Ionide.KeepAChangelog.Tasks/build/Ionide.KeepAChangelog.Tasks.targets @@ -1,5 +1,10 @@ - + + $([System.IO.Path]::GetFullPath("$(MSBuildThisFileDirectory)..\..\")) + $(Ionide_KeepAChangelog_PackageRoot)lib\netstandard2.0\ + $(Ionide_KeepAChangelog_PackageRoot)lib\net472\ + + + diff --git a/src/Ionide.KeepAChangelog/Library.fs b/src/Ionide.KeepAChangelog/Library.fs index ae144b3..204c5fd 100644 --- a/src/Ionide.KeepAChangelog/Library.fs +++ b/src/Ionide.KeepAChangelog/Library.fs @@ -95,25 +95,25 @@ module Parser = | Some parts -> String.concat " " (f :: parts)) "line item" - pipe2 bullet content (fun bullet text -> $"{bullet} {text}") + pipe2 bullet content (fun bullet text -> sprintf "%c %s" bullet text) let pCustomSection: Parser = let sectionName = skipString "###" >>. spaces1 >>. restOfLine true // TODO: maybe not the whole line? - $"custom section header" + "custom section header" sectionName - .>>. (many pEntry $"{sectionName} entries") + .>>. (many pEntry "custom section entries") .>> attempt (opt newline) let pSection sectionName : Parser = (skipString "###" >>. spaces1 >>. skipString sectionName) - $"{sectionName} section header" + sprintf "%s section header" sectionName >>. many1 newline - >>. (many pEntry $"{sectionName} entries") + >>. (many pEntry sprintf "%s entries" sectionName) .>> attempt (opt newline) let pAdded = pSection "Added"