From 94d305f9f29ca12f921b7db8c7014f7bff7a8d6e Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Tue, 18 Jun 2024 17:30:33 -0300 Subject: [PATCH] Incorporate SponsorLink v2 Read more at https://www.devlooped.com/SponsorLink/ --- src/Directory.props | 3 ++ src/Directory.targets | 52 ++++++++++++++++++- src/Shared/Shared.projitems | 10 +--- src/Shared/Shared.shproj | 6 --- src/Shared/ThisAssembly.Prerequisites.targets | 33 ------------ .../ThisAssembly.AssemblyInfo.csproj | 5 +- .../ThisAssembly.AssemblyInfo.targets | 2 +- .../ConstantsGenerator.cs | 3 +- .../ThisAssembly.Constants.csproj | 9 +--- .../ThisAssembly.Constants.targets | 2 +- src/ThisAssembly.Git/ThisAssembly.Git.csproj | 4 +- src/ThisAssembly.Git/ThisAssembly.Git.targets | 13 +++-- .../ThisAssembly.Metadata.csproj | 4 +- .../ThisAssembly.Metadata.targets | 1 - .../ThisAssembly.Project.csproj | 5 +- .../ThisAssembly.Project.targets | 2 +- .../ThisAssembly.Resources.csproj | 7 +-- .../ThisAssembly.Resources.targets | 2 +- .../ThisAssembly.Strings.csproj | 6 +-- .../ThisAssembly.Strings.targets | 2 +- .../ThisAssembly.Tests.csproj | 32 +++++++++++- src/ThisAssembly/ThisAssembly.csproj | 1 - 22 files changed, 109 insertions(+), 95 deletions(-) delete mode 100644 src/Shared/ThisAssembly.Prerequisites.targets diff --git a/src/Directory.props b/src/Directory.props index fe3cc80f..2cdb13a9 100644 --- a/src/Directory.props +++ b/src/Directory.props @@ -4,6 +4,7 @@ dotnet roslyn true + true 4.0 analyzers/dotnet/roslyn$(ThisAssemblyMinimumRoslynVersion)/cs false @@ -18,6 +19,8 @@ true MSB3277;$(NoWarn) + + ThisAssembly diff --git a/src/Directory.targets b/src/Directory.targets index 357eaef1..7e31a87f 100644 --- a/src/Directory.targets +++ b/src/Directory.targets @@ -1,4 +1,4 @@ - + @@ -9,4 +9,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Shared/Shared.projitems b/src/Shared/Shared.projitems index fe0ecc79..b46cbc63 100644 --- a/src/Shared/Shared.projitems +++ b/src/Shared/Shared.projitems @@ -6,8 +6,7 @@ - - + @@ -21,11 +20,4 @@ %(RecursiveDir)%(Filename)%(Extension) - - - - PreserveNewest - build\$(TargetFramework)\%(Filename)%(Extension) - - \ No newline at end of file diff --git a/src/Shared/Shared.shproj b/src/Shared/Shared.shproj index 21876c3d..d4c63bdd 100644 --- a/src/Shared/Shared.shproj +++ b/src/Shared/Shared.shproj @@ -7,10 +7,4 @@ - - - - - - \ No newline at end of file diff --git a/src/Shared/ThisAssembly.Prerequisites.targets b/src/Shared/ThisAssembly.Prerequisites.targets deleted file mode 100644 index ed7f095e..00000000 --- a/src/Shared/ThisAssembly.Prerequisites.targets +++ /dev/null @@ -1,33 +0,0 @@ - - - - - 4.0 - - - - - - - - - - $(CompilerApiVersion.Substring(6)) - 0.0 - - - - - - - - true - - - diff --git a/src/ThisAssembly.AssemblyInfo/ThisAssembly.AssemblyInfo.csproj b/src/ThisAssembly.AssemblyInfo/ThisAssembly.AssemblyInfo.csproj index 5efdb13f..0b2ba473 100644 --- a/src/ThisAssembly.AssemblyInfo/ThisAssembly.AssemblyInfo.csproj +++ b/src/ThisAssembly.AssemblyInfo/ThisAssembly.AssemblyInfo.csproj @@ -1,9 +1,10 @@ - + netstandard2.0 latest true + $(MSBuildThisFileDirectory)..\SponsorLink\SponsorLink.targets @@ -27,9 +28,7 @@ on the `ThisAssembly.Info` class. - - diff --git a/src/ThisAssembly.AssemblyInfo/ThisAssembly.AssemblyInfo.targets b/src/ThisAssembly.AssemblyInfo/ThisAssembly.AssemblyInfo.targets index dfbda1ea..a4d408b5 100644 --- a/src/ThisAssembly.AssemblyInfo/ThisAssembly.AssemblyInfo.targets +++ b/src/ThisAssembly.AssemblyInfo/ThisAssembly.AssemblyInfo.targets @@ -1,4 +1,5 @@ + - diff --git a/src/ThisAssembly.Constants/ThisAssembly.Constants.targets b/src/ThisAssembly.Constants/ThisAssembly.Constants.targets index 329a601e..2ff4dbcc 100644 --- a/src/ThisAssembly.Constants/ThisAssembly.Constants.targets +++ b/src/ThisAssembly.Constants/ThisAssembly.Constants.targets @@ -1,4 +1,5 @@ + @@ -53,5 +54,4 @@ - diff --git a/src/ThisAssembly.Git/ThisAssembly.Git.csproj b/src/ThisAssembly.Git/ThisAssembly.Git.csproj index bc98c892..f4fa769a 100644 --- a/src/ThisAssembly.Git/ThisAssembly.Git.csproj +++ b/src/ThisAssembly.Git/ThisAssembly.Git.csproj @@ -1,4 +1,4 @@ - + netstandard2.0 @@ -30,9 +30,7 @@ - - diff --git a/src/ThisAssembly.Git/ThisAssembly.Git.targets b/src/ThisAssembly.Git/ThisAssembly.Git.targets index 0b36ec16..e34ada87 100644 --- a/src/ThisAssembly.Git/ThisAssembly.Git.targets +++ b/src/ThisAssembly.Git/ThisAssembly.Git.targets @@ -63,7 +63,7 @@ @(_ThisAssemblyGitSourceRoot -> '%(SourceLinkUrl)') - + @@ -81,11 +81,11 @@ [pending build] - - - - - + + + + + @@ -96,5 +96,4 @@ - diff --git a/src/ThisAssembly.Metadata/ThisAssembly.Metadata.csproj b/src/ThisAssembly.Metadata/ThisAssembly.Metadata.csproj index b6165a6f..e451f8f1 100644 --- a/src/ThisAssembly.Metadata/ThisAssembly.Metadata.csproj +++ b/src/ThisAssembly.Metadata/ThisAssembly.Metadata.csproj @@ -1,4 +1,4 @@ - + netstandard2.0 @@ -44,9 +44,7 @@ C#: - - diff --git a/src/ThisAssembly.Metadata/ThisAssembly.Metadata.targets b/src/ThisAssembly.Metadata/ThisAssembly.Metadata.targets index 66c7fc9f..98cfd342 100644 --- a/src/ThisAssembly.Metadata/ThisAssembly.Metadata.targets +++ b/src/ThisAssembly.Metadata/ThisAssembly.Metadata.targets @@ -14,5 +14,4 @@ - \ No newline at end of file diff --git a/src/ThisAssembly.Project/ThisAssembly.Project.csproj b/src/ThisAssembly.Project/ThisAssembly.Project.csproj index be579583..4499d370 100644 --- a/src/ThisAssembly.Project/ThisAssembly.Project.csproj +++ b/src/ThisAssembly.Project/ThisAssembly.Project.csproj @@ -1,9 +1,10 @@ - + netstandard2.0 latest true + $(MSBuildThisFileDirectory)..\SponsorLink\SponsorLink.targets @@ -38,9 +39,7 @@ C#: - - diff --git a/src/ThisAssembly.Project/ThisAssembly.Project.targets b/src/ThisAssembly.Project/ThisAssembly.Project.targets index 82cbcc72..eae8d76d 100644 --- a/src/ThisAssembly.Project/ThisAssembly.Project.targets +++ b/src/ThisAssembly.Project/ThisAssembly.Project.targets @@ -1,4 +1,5 @@ + ThisAssembly.Resource + $(MSBuildThisFileDirectory)..\SponsorLink\SponsorLink.targets @@ -19,13 +20,7 @@ - - - - - - diff --git a/src/ThisAssembly.Resources/ThisAssembly.Resources.targets b/src/ThisAssembly.Resources/ThisAssembly.Resources.targets index e5d57d8a..746f8659 100644 --- a/src/ThisAssembly.Resources/ThisAssembly.Resources.targets +++ b/src/ThisAssembly.Resources/ThisAssembly.Resources.targets @@ -1,4 +1,5 @@ + - @@ -41,6 +40,7 @@ such as "Hello {name}". + diff --git a/src/ThisAssembly.Strings/ThisAssembly.Strings.targets b/src/ThisAssembly.Strings/ThisAssembly.Strings.targets index 3a05199b..a0f9cc85 100644 --- a/src/ThisAssembly.Strings/ThisAssembly.Strings.targets +++ b/src/ThisAssembly.Strings/ThisAssembly.Strings.targets @@ -1,4 +1,5 @@ + + + + + + + + + + + + diff --git a/src/ThisAssembly/ThisAssembly.csproj b/src/ThisAssembly/ThisAssembly.csproj index abf203db..62fe3ba3 100644 --- a/src/ThisAssembly/ThisAssembly.csproj +++ b/src/ThisAssembly/ThisAssembly.csproj @@ -15,7 +15,6 @@ -