如何添加装配参考? [英] How to add Assembly reference?

查看:82
本文介绍了如何添加装配参考?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Microsoft.VisualBasic 添加了到我的代码中,但是编译器报告错误CS0234:

I added using Microsoft.VisualBasic to my code but compiler reports error CS0234:


名称空间 Microsoft.VisualBasic中不存在类型或名称空间名称 FileSystem(您是否缺少程序集引用?)

The type or namespace name 'FileSystem' does not exist in the namespace 'Microsoft.VisualBasic' (are you missing an assembly reference?)

此程序集引用是什么,以及如何添加它?

What is this "assembly reference" and how to add one?

错误还显示在图片中
http://img16.imageshack.us/img16/6517/errorcup.jpg

推荐答案

您已经为 Microsoft.VisualBasic使用了 using 指令命名空间,但实际上您已经完全限定了名称 Microsoft.VisualBasic.FileSystem 使其无关紧要。

You've got a using directive for the Microsoft.VisualBasic namespace, but the fact that you're fully-qualifying the name Microsoft.VisualBasic.FileSystem makes that irrelevant.

我怀疑您只是没有添加参考到 Microsoft.VisualBasi c.dll 程序集。 (程序集和名称空间是完全不同的东西。)

I suspect you just haven't added a reference to the Microsoft.VisualBasic.dll assembly. (Assemblies and namespaces are very different things.)

老实说,我个人会尽量避免特定于VB的程序集。

Personally I would attempt to avoid VB-specific assemblies in the first place, to be honest.

这篇关于如何添加装配参考?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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