Skip to content

Commit

Permalink
Warn users when they use an unsupported SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
bash committed Feb 4, 2025
1 parent a92c2a3 commit 947f60f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
</ItemGroup>
<ItemGroup>
<None Update="tools\*.ps1" CopyToOutputDirectory="Always" Pack="true" PackagePath="" />
<None Update="buildTransitive\$(PackageId).targets" Pack="true" PackagePath="%(Identity)" />
</ItemGroup>
<!-- Adapted from https://github.com/dotnet/runtime/blob/4bd597ffde128555b4ff017e87c60adc2fedd178/eng/packaging.targets#L136 -->
<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="_Funcky_Analyzers_WarnAboutUnsupportedRoslynVersion"
Condition="'$(SupportsRoslynComponentVersioning)' != 'true'"
AfterTargets="ResolvePackageDependenciesForBuild;ResolveNuGetPackageAssets">
<Warning Code="λ.BUILD.0001"
Text="Funcky.Analyzers requires at least Roslyn 4.x i.e. Visual Studio 2022 / .NET 6.0" />
<ItemGroup>
<Analyzer Remove="@(Analyzer->WithMetadataValue('NuGetPackageId', 'Funcky.Analyzers'))" />
</ItemGroup>
</Target>
</Project>

0 comments on commit 947f60f

Please sign in to comment.