Getting an F# project working with Rider

  • I’d like to go through GitHub - CompositionalIT/SAFE-Dojo: An introductory dojo to learn how to develop full stack web applications in F# using Rider, but I’m struggling to get Rider working.
  • I have dotnet-sdk_5 specified in my configuration.nix.
  • I’m able to run the project using dotnet tool restoredotnet run on the command line. http://localhost:8080/ then works as expected.
  • When trying to load the solution in Rider I was asked to provide the path to mono (which I set to /home/stian/.nix-profile/bin/mono), dotnet (which I set to /run/current-system/sw/bin/dotnet), and msbuild (which I had to add to my configuration.nix in order to get available at /run/current-system/sw/bin/msbuild). Rider seems happy with these paths, but something is wrong because when I try to load the solution I get the errors:
    3:23 PM	Project 'Shared' load failed: Value cannot be null. (Parameter 'input')
    3:23 PM	Project 'Server' load failed: Value cannot be null. (Parameter 'input')
    3:23 PM	Project 'Client' load failed: Value cannot be null. (Parameter 'input')
    3:23 PM	Project 'Build' load failed: Value cannot be null. (Parameter 'input')
    

Any hints that could help me would be appreciated - thanks!

Update: I found out that the msbuild has to point to is a .dll file inside the dotnet folder. I have dotnet at /nix/store/1wiwgdrvg1nlrvplhyp1ls9dav2lq88y-dotnet-sdk-3.1.101/bin/dotnet, and so I have msbuild at /nix/store/1wiwgdrvg1nlrvplhyp1ls9dav2lq88y-dotnet-sdk-3.1.101/sdk/3.1.101/MSBuild.dll. That made things work in Rider.