fsx 脚本引用一个引用许多 dll 的 dll [英] fsx script referencing a dll referencing many dll

查看:22
本文介绍了fsx 脚本引用一个引用许多 dll 的 dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于以下问题,我有什么样的策略.我想在 dll 中使用一个简单的类,该类链接到各种 dll、各种版本等.

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.

作为一个 fsx 文件,我的脚本没有显示错误.但是在 fsharp 交互中运行它时,它告诉我

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'.

当然引用了程序集,所以我想我需要添加对它引用自身的 dll 的引用.

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

有什么办法可以指向一个编译项目的 dll 环境,它会递归地引用脚本中的关联 dll 吗?

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 ?

最终解决方案

刘涛写了一个插件,如果你可以使用它,来同步.可在此处获得

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.

推荐答案

这是最近写的一个脚本由 Gustavo Guerra 提供,它将 fsproj 文件中的所有 dllfs 文件加载到 F# Interactive 中.

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

您唯一需要做的就是确保在您的项目中正确引用了所有需要的 dll 文件.

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

这篇关于fsx 脚本引用一个引用许多 dll 的 dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆