How do I upgrade an F# project from .NET Framework 4.7.2 to .NET 5.0?

Viewed 289

I've seen this question asked for C# projects but not F#.

I have a solution that is composed of multiple C# and F# projects all using framework .NET Framework 4.7.2. I've been trying to upgrade them to .NET 5 and used the Microsoft tools to do this, the .NET API Analyzer and the .NET Upgrade assistant.

I've had no problems with the C# projects (aside from some third party dependency issues), all are now upgraded but the .NET Upgrade assistant did not touch the F# projects when I ran it against the solution and won't recognise their file type .fsproj when I try to run it against them separately. So I now have a solution containing multiple frameworks which of course throws the error

"This project target a different framework"

My question is, has anyone upgraded F# projects to .NET 5? Do you have any advice on how to do this? Are there any tools to do this? I've been searching all day and have not been able to find any advice, guidance or any tools, only information around creating new F# projects but not upgrading existing ones.

My solution I ended up using the try-convert instead of the Upgrade Assistant and that worked. I almost went with manually recreating the projects which I am sure would have worked also.

0 Answers
Related