fsx script referencing a dll referencing many dll

2020-02-26 07:57发布

What kind of strategy do I have for the following problem. I want to use a simple class inside a dll, which has link to various dlls, of various versions etc.

As a fsx file, my script show no error. but upon running it in fsharp interactive, it tells me

error FS0074: The type referenced through 'theTypeIWantToUse' 
is defined in an assembly that is not referenced. 
You must add a reference to assembly 'Assembly'.

Of course the assembly is referenced, so I imagine I need to add references to dlls it references itself.

Are there any way I could point to a compiling project's dll environment, and it recursively references the associated dlls inside the script ?

Do I have any other strategy but to do this by hand ?

Final solution

Tao Liu has written an add-on, if you can use it, to synchronize. It is available here

An updated script also exists here The loading still needs topological loading if one feels like doing it.

1条回答
孤傲高冷的网名
2楼-- · 2020-02-26 08:24

This is a script recently written by Gustavo Guerra, which loads all dll and fs files in fsproj files into F# Interactive.

The only thing you need to do is making sure that all needed dll files are referenced correctly in your projects.

查看更多
登录 后发表回答