Open TheGoddessInari opened 6 years ago
Fails in what way? Fails to embed?
The type initializer for '<StartupCode$canopy>.$canopy.configuration' threw an exception. ---> System.ArgumentException: The path is not of a legal form.
at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.InternalGetDirectoryName(String path)
at <StartupCode$canopy>.$canopy.configuration..cctor() in C:\projects\canopy\src\canopy\configuration.fs:line 7
--- End of inner exception stack trace ---
At runtime. It raises an exception when embedded.
It looks like the location of the assembly is lost because it is embedded.
If you embed canopy into the resulting assembly (such as with Fody.Costura), it fails on line 7 of configuration.fs, when it takes the reference assembly location.
This fairly well violates the principle of least surprise, as you'd expect canopy to be embeddable and only need two executables (the application executable and the webdriver).