Body:
I’m trying to use OmniSharp on NixOS with a .NET Framework 4.8 project, but it fails with MSBuild errors.
Setup:
- NixOS with
omnisharp-roslynpackage installed - .NET Framework 4.8 web application project
The Problem:
When OmniSharp tries to load the project, it throws:
Microsoft.Build.Exceptions.InvalidProjectFileException: The imported project "/nix/store/ycrx2bz5b4l7ylgafkz11ll74nxx5g3l-dotnet-sdk-8.0.413/share/dotnet/sdk/8.0.413/Microsoft/VisualStudio/v17.0/WebApplications/Microsoft.WebApplication.targets" was not found.
Analysis:
- The NixOS
omnisharp-roslynpackage appears to be the .NET 6+ version - It’s looking for .NET SDK paths that don’t exist for .NET Framework projects
- .NET Framework 4.8 projects need different MSBuild tooling
Questions:
- Does the NixOS
omnisharp-roslynpackage include the net472 build needed for .NET Framework projects? - How can I configure OmniSharp to use Mono and appropriate MSBuild tools for .NET Framework 4.8?
- Should I manually install the
omnisharp-mono.tar.gzvariant instead? - What’s the recommended approach for .NET Framework development on NixOS?
Any pointers?![]()