Skip to content

Instantly share code, notes, and snippets.

@PiotrFerenc
Created December 12, 2024 09:49
Show Gist options
  • Save PiotrFerenc/6b8ba7ef24394912c9cf85b3e898ec06 to your computer and use it in GitHub Desktop.
Save PiotrFerenc/6b8ba7ef24394912c9cf85b3e898ec06 to your computer and use it in GitHub Desktop.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<IncludeBuildOutput>false</IncludeBuildOutput>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageId>MyAnalyzerPackage</PackageId>
<PackageVersion>1.0.0</PackageVersion>
<Authors>Your Name</Authors>
<Company>Your Company</Company>
<Description>Provides a Roslyn analyzer to ensure class has [DoTestu] attribute.</Description>
<PackageTags>roslyn;analyzer;csharp</PackageTags>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.8.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.2" PrivateAssets="all" />
</ItemGroup>
<!-- Make sure the analyzer dll is included in the NuGet package -->
<ItemGroup>
<Analyzer Include="$(OutputPath)$(AssemblyName).dll" />
</ItemGroup>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment