You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 13, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 13, 2026. It is now read-only.
System.ArgumentNullException while running basic Suave web server #7756
I've been trying to come up with a basic web server using Suave + CoreRT. Check this repo for source code and error analysis. When I start the generated executable, it yields the following exception:
Unhandled Exception: System.ArgumentNullException: Value cannot be null. Parameter name: path1
at System.IO.Path.Combine(String, String) + 0x53
at Suave.Web.startWebServerAsync(SuaveConfig, FSharpFunc\`2) + 0x46
at Suave.Web.startWebServer(SuaveConfig, FSharpFunc\`2) + 0x17
at Program.main(String[]) + 0x28
at Simple-Web!<BaseAddress>+0x7d639d
Aborted
Activity
MichalStrehovsky commentedon Aug 30, 2019
It's a bug in Suave: https://github.com/SuaveIO/suave/blob/f3e9ef4147ea9b386afaeb0286d08c8a4ca53896/src/Suave/ParsingAndControl.fs#L125
Assembly.Location is documented to return an empty string sometime and they don't handle it. They really should use AppContext.BaseDirectory instead.
Try adding:
To an itemgroup in your csproj to work around.
MichalStrehovsky commentedon Aug 30, 2019
Related: SuaveIO/suave#664
lpeixotoo commentedon Sep 2, 2019
It worked fine @MichalStrehovsky! Thank you! I opened SuaveIO/suave#735 on Suave to track it within CoreRT.
lpeixotoo commentedon Sep 18, 2019
Fixed in SuaveIO/suave#735.