-
-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
THIS001 warning on F# project #259
Comments
Yes, this is a C# only warning, but unfortunately, NuGet does not allow you to selectively take dependencies pivoting on the consuming project language. So I'd suggest just adding a |
Thanks, I already did that as a test, but it's good to have it confirmed as the "official" solution/workaround. I now have
in my |
Yeah, in thinking that perhaps the warning could check the language too and just skip it for F#... |
Turns out that Roslyn doesn't surface the `CompilerApiVersion` property in F# projects. See https://github.com/dotnet/sdk/blob/main/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.PackageDependencyResolution.targets#L214 Fixes devlooped/GitInfo#259
Turns out that Roslyn doesn't surface the `CompilerApiVersion` property in F# projects. See https://github.com/dotnet/sdk/blob/main/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.PackageDependencyResolution.targets#L214 Fixes devlooped/GitInfo#259
Turns out that Roslyn doesn't surface the `CompilerApiVersion` property in F# projects. See https://github.com/dotnet/sdk/blob/main/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.PackageDependencyResolution.targets#L214 Fixes devlooped/GitInfo#259
Describe the Bug
When GitInfo is installed in an F# project, the following warning is emitted when the project is built:
C:\Users\<username>\.nuget\packages\thisassembly.prerequisites\1.2.9\build\netstandard2.0\ThisAssembly.Prerequisites.targets(16,5): warning THIS001: ThisAssembly requires Compiler API (Roslyn) version 4.0 or greater.
Steps to Reproduce
Expected Behavior
Build without any warnings.
Version Info
Additional Info
This seems to be specific to F# projects. When following the "Steps to Reproduce", but creating a C# Class Library project instead, this warning is not emitted.
Edit: I've added some debug messages to the file from which the
THIS001
warning originates. For the C# projectRoslynVersion
is4.4
, but for the F# projectRoslynVersion
ends up at0.0
.The text was updated successfully, but these errors were encountered: