Skip to content

Commit

Permalink
Rename analyzer targets to make scenario more explicit
Browse files Browse the repository at this point in the history
We might have sample targets for dotnet tools, for example.
  • Loading branch information
kzu committed Jul 9, 2024
1 parent 17fcb73 commit 7407f5b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion samples/dotnet/Analyzer/Analyzer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<MergeAnalyzerAssemblies>false</MergeAnalyzerAssemblies>
<MergeAnalyzerAssemblies Condition="'$(CI)' == 'true'">true</MergeAnalyzerAssemblies>
<CustomAfterMicrosoftCSharpTargets>$(MSBuildThisFileDirectory)..\SponsorLink.targets</CustomAfterMicrosoftCSharpTargets>
<CustomAfterMicrosoftCSharpTargets>$(MSBuildThisFileDirectory)..\SponsorLink.Analyzer.targets</CustomAfterMicrosoftCSharpTargets>
<ImplicitUsings>disable</ImplicitUsings>
<FundingPackageId>SponsorableLib</FundingPackageId>
</PropertyGroup>
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion samples/dotnet/SponsorLink/SponsorLink.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</ItemGroup>

<ItemGroup>
<None Include="..\SponsorLink.targets" Link="SponsorLink.targets" />
<None Include="..\SponsorLink.Analyzer.targets" Link="SponsorLink.Analyzer.targets" />
</ItemGroup>

<Target Name="EmitFunding" BeforeTargets="GenerateMSBuildEditorConfigFileShouldRun" Inputs="$(MSBuildAllProjects)" Outputs="$(IntermediateOutputPath)SponsorLink.g.cs">
Expand Down
4 changes: 2 additions & 2 deletions samples/dotnet/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ A project can include all the necessary files by using the [dotnet-file](https:/
tool and sync all files to a folder, such as:

```shell
dotnet file add https://github.com/devlooped/SponsorLink/tree/main/samples/dotnet src/SponsorLink/
dotnet file add https://github.com/devlooped/SponsorLink/tree/main/samples/dotnet/ src/SponsorLink/
```

Including the analyzer and targets in a project involves two steps.
Expand All @@ -23,7 +23,7 @@ Including the analyzer and targets in a project involves two steps.
```xml
<PropertyGroup>
...
<CustomAfterMicrosoftCSharpTargets>$(MSBuildThisFileDirectory)..\SponsorLink\SponsorLink.targets</CustomAfterMicrosoftCSharpTargets>
<CustomAfterMicrosoftCSharpTargets>$(MSBuildThisFileDirectory)..\SponsorLink\SponsorLink.Analyzer.targets</CustomAfterMicrosoftCSharpTargets>
</PropertyGroup>
```

Expand Down

0 comments on commit 7407f5b

Please sign in to comment.