Skip to content

Commit 90e5cda

Browse files
committed
Add SponsorLink to ensure ongoing development and maintenance
See https://github.com/devlooped/SponsorLink and https://www.cazzulino.com/sponsorlink.html.
1 parent 7acc406 commit 90e5cda

File tree

5 files changed

+47
-1
lines changed

5 files changed

+47
-1
lines changed

NuGetizer.sln

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{
3333
.github\workflows\release.yml = .github\workflows\release.yml
3434
EndProjectSection
3535
EndProject
36+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeAnalysis", "src\CodeAnalysis\CodeAnalysis.csproj", "{8D400518-0FF9-4180-8D2A-D152D7A59075}"
37+
EndProject
3638
Global
3739
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3840
Debug|Any CPU = Debug|Any CPU
@@ -51,6 +53,10 @@ Global
5153
{53B47B9E-212F-420D-9E9A-68EC3B44D39E}.Debug|Any CPU.Build.0 = Debug|Any CPU
5254
{53B47B9E-212F-420D-9E9A-68EC3B44D39E}.Release|Any CPU.ActiveCfg = Release|Any CPU
5355
{53B47B9E-212F-420D-9E9A-68EC3B44D39E}.Release|Any CPU.Build.0 = Release|Any CPU
56+
{8D400518-0FF9-4180-8D2A-D152D7A59075}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
57+
{8D400518-0FF9-4180-8D2A-D152D7A59075}.Debug|Any CPU.Build.0 = Debug|Any CPU
58+
{8D400518-0FF9-4180-8D2A-D152D7A59075}.Release|Any CPU.ActiveCfg = Release|Any CPU
59+
{8D400518-0FF9-4180-8D2A-D152D7A59075}.Release|Any CPU.Build.0 = Release|Any CPU
5460
EndGlobalSection
5561
GlobalSection(SolutionProperties) = preSolution
5662
HideSolutionNode = FALSE
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<AssemblyName>NuGetizer.CodeAnalysis</AssemblyName>
5+
<TargetFramework>netstandard2.0</TargetFramework>
6+
<IsPackable>false</IsPackable>
7+
<PackFolder>analyzers/dotnet</PackFolder>
8+
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
9+
</PropertyGroup>
10+
11+
<ItemGroup>
12+
<PackageReference Include="ThisAssembly.AssemblyInfo" Version="1.2.5" PrivateAssets="all" />
13+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.1" Pack="false" />
14+
<PackageReference Include="Devlooped.SponsorLink" Version="0.9.2" />
15+
</ItemGroup>
16+
17+
</Project>

src/CodeAnalysis/SponsorLinker.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using System;
2+
using Microsoft.CodeAnalysis;
3+
using Microsoft.CodeAnalysis.Diagnostics;
4+
5+
namespace Devlooped.CredentialManager;
6+
7+
[Generator]
8+
[DiagnosticAnalyzer(LanguageNames.CSharp, LanguageNames.VisualBasic, LanguageNames.FSharp)]
9+
class SponsorLinker : SponsorLink
10+
{
11+
public SponsorLinker() : base(SponsorLinkSettings.Create(
12+
"devlooped", "NuGetizer",
13+
version: new Version(ThisAssembly.Info.Version).ToString(2)
14+
#if DEBUG
15+
, quietDays: 0
16+
#endif
17+
))
18+
{ }
19+
}

src/Directory.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<Import Project="$(MSBuildThisFileDirectory)NuGetizer.Tasks\$(OutputPath)NuGetizer.targets"
10-
Condition="'$(IsPackable)' == 'true' AND '$(NuGetize)' == 'true'" />
10+
Condition="($(IsPackable) == 'true' OR $(PackFolder) != '') AND $(NuGetize) == 'true'" />
1111

1212
<PropertyGroup>
1313
<PackFolderKindFile>$(IntermediateOutputPath)PackFolderKind.g$(DefaultLanguageSourceExtension)</PackFolderKindFile>

src/NuGetizer.Tasks/NuGetizer.Tasks.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030
<None Include="..\..\readme.md" PackagePath="readme.md" />
3131
</ItemGroup>
3232

33+
<ItemGroup>
34+
<ProjectReference Include="..\CodeAnalysis\CodeAnalysis.csproj" ReferenceOutputAssembly="false" />
35+
</ItemGroup>
36+
3337
<ItemGroup>
3438
<EmbeddedResource Update="Resources.resx" Generator="" />
3539
</ItemGroup>

0 commit comments

Comments
 (0)