Skip to content
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

Project system displays the C# warning levels mechanism for F# project #13714

Open
vsfeedback opened this issue Aug 17, 2022 · 9 comments · Fixed by dotnet/project-system#9511
Assignees
Labels
Area-ProjectsAndBuild MSBuild tasks, project files, framework resolution Area-VS VS support for F# not covered elsewhere Bug Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code. Resolution-External Tracking-External
Milestone

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


[severity:It bothers me. A fix would be nice]
I have an project for fsharp, it is Microsoft.NET.Sdk with targetframework net6.0-windows. When I right click the project in the solution explorer, and click properties, I can scroll down to the "Errors and warnings". The Warning level is default set to 3. From the dropdown menu, it gives the option to set it to "7 - Warnings from C# 11". When I select this option, and build the project, it wails with an error:
Severity Code Description Project File Line Suppression State
Error FS1050 Invalid warning level '7' ProjectName C:\Users\username\foldername\Documents\foldername\Products\projectname\src\solutionname\projectnamei\FSC 1 Active


Original Comments

Feedback Bot on 6/10/2022, 10:26 AM:

(private comment, text removed)


Original Solutions

(no solutions)

@KevinRansom
Copy link
Member

@vzarytovskii
The project system displays the C# warning levels mechanism for F# project, we should look at this.

image

@vzarytovskii vzarytovskii added this to the September-2022 milestone Sep 9, 2022
@vzarytovskii vzarytovskii moved this to Not Planned in F# Compiler and Tooling Sep 9, 2022
@vzarytovskii vzarytovskii modified the milestones: September-2022, Backlog Sep 9, 2022
@vzarytovskii vzarytovskii added the Area-VS VS support for F# not covered elsewhere label Sep 9, 2022
@dsyme dsyme changed the title It is possible to select Warn level 7 for an f# project but it is not possible to build the project with it. Project system displays the C# warning levels mechanism for F# project Sep 23, 2022
@T-Gro T-Gro added Area-ProjectsAndBuild MSBuild tasks, project files, framework resolution Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code. and removed Needs-Triage labels Nov 14, 2022
@MatthijsPrent
Copy link

I originally reported this bug because we noticed that the builderver using Build tools MSBuild reported more warnings then visual studio on the local machine. When I stated investigating this issue, I noticed that the C# warning level is being used for f# projects and I was hoping that this could be cause solution of my problem.

Is there any known workaround or fix available to see all the warnings for my f# solution in visual studio?

@abelbraaksma
Copy link
Contributor

@vzarytovskii I'd love to tackle this. Do you happen to know off-hand where this is located? Otherwise, I'll search around a bit.

@vzarytovskii
Copy link
Member

@vzarytovskii I'd love to tackle this. Do you happen to know off-hand where this is located? Otherwise, I'll search around a bit.

I don't think it's part of this repository. Probably it's in dotnet/proj-info

@abelbraaksma
Copy link
Contributor

abelbraaksma commented May 15, 2024

Found it, and reported: dotnet/project-system#9469.

This changed was introduced in 2022 without any mention of F# in dotnet/project-system#7982 and dotnet/project-system#8004.

@abelbraaksma
Copy link
Contributor

abelbraaksma commented May 15, 2024

Is there any known workaround or fix available to see all the warnings for my f# solution in visual studio?

Yes @MatthijsPrent. Set the warning level to 5 (you can ignore the description of that level).

@drewnoakes
Copy link
Member

A fix is in PR here: dotnet/project-system#9511

@drewnoakes
Copy link
Member

drewnoakes commented Jul 24, 2024

@vzarytovskii @abelbraaksma @KevinRansom are there other properties in the VS Project Properties UI that don't work, or are missing? It's very easy to adjust these properties now, so let me know if changes are needed. At least, keep it in mind for future.

@vzarytovskii
Copy link
Member

@vzarytovskii @abelbraaksma @KevinRansom are there other properties in the VS Project Properties UI that don't work, or are missing? It's very easy to adjust these properties now, so let me know if changes are needed.

Not from the top of my head now. We will probably update them later to support nullable references. Thanks for fixing it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-ProjectsAndBuild MSBuild tasks, project files, framework resolution Area-VS VS support for F# not covered elsewhere Bug Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code. Resolution-External Tracking-External
Projects
Status: New
Development

Successfully merging a pull request may close this issue.

7 participants