fsx script referencing a dll referencing many dll

爷,独闯天下 提交于 2019-12-18 13:10:03

问题


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:


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.



来源:https://stackoverflow.com/questions/9998144/fsx-script-referencing-a-dll-referencing-many-dll

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!