Skip to content

Commit

Permalink
Don't warn compiler API version for F# projects
Browse files Browse the repository at this point in the history
  • Loading branch information
kzu committed Mar 20, 2023
1 parent 3ac2da4 commit e6bbe15
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
<RoslynVersion Condition="'$(RoslynVersion)' == ''">0.0</RoslynVersion>
</PropertyGroup>

<!-- -->
<!-- Don't enforce compiler version for F#, since it's not surfacing the CompilerApiversion at all.
See https://github.com/dotnet/sdk/blob/main/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.PackageDependencyResolution.targets#L214 -->
<Warning Code="THIS001"
Text="ThisAssembly requires Compiler API (Roslyn) version $(ThisAssemblyMinimumRoslynVersion) or greater."
Condition="$([MSBuild]::VersionLessThan('$(RoslynVersion)', '$(ThisAssemblyMinimumRoslynVersion)'))" />
Condition="$([MSBuild]::VersionLessThan('$(RoslynVersion)', '$(ThisAssemblyMinimumRoslynVersion)')) and
('$(Language)' == 'C#' Or '$(Language)' == 'VB')" />
</Target>

</Project>

0 comments on commit e6bbe15

Please sign in to comment.