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

查看:92
本文介绍了引用一个dll的fsx脚本引用多个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已编写了一个加载项(如果可以使用的话)来进行同步.它是在此处可用

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.

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

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