简体   繁体   English

我无法在C#应用程序上添加using引用

[英]I can't add a using reference on my C# application

I'm using Visual Studio 2010 Beta2 and I can't add a reference to: system.drawing 我正在使用Visual Studio 2010 Beta2,无法添加对以下文件的引用: system.drawing

I've tried right click on the solution explorer but I can't find it there. 我尝试在解决方案资源管理器上单击鼠标右键,但在那里找不到它。

What gives? 是什么赋予了?

Here is all you need to do in VS 2010: 这是您在VS 2010中需要做的所有事情:

  1. In Solution Explorer right click on the References folder of your project Solution Explorer右键单击项目的“ References文件夹
  2. Select Add Reference . 选择Add Reference
  3. Under the Assemblies category there is a sub category of Framework . 在“ Assemblies类别下,有一个“ Framework子类别。 If that is selected you should see a list of all of the Microsoft .NET Framework libraries 如果选择了该选项,则应该看到所有Microsoft .NET Framework库的列表。
  4. Find System.Drawing and double click it. 找到System.Drawing并双击它。

Then your project will have the reference added to it! 然后,您的项目将添加参考!

In VS2010 Beta 2 the references list may not be automatically sorted because it loads asynchronously. 在VS2010 Beta 2中,引用列表可能不会自动排序,因为它是异步加载的。 You may need to wait for it to finish loading then click the column header to sort. 您可能需要等待它完成加载,然后单击列标题进行排序。

Solution explorer is for adding references to external libraries. 解决方案资源管理器用于向外部库添加引用。

It sounds like you just want to add the line 听起来您只想添加行

using System.Drawing;

to the top of one particular file. 到一个特定文件的顶部。

I have in VS2010 a class library and a console app, is possible add reference in console but arent possible add [using .....] pointed in comment above, in library there is public class whith public methods. 我在VS2010中有一个类库和一个控制台应用程序,可以在控制台中添加引用,但不能添加以上使用注释中指出的[using .....],在库中有公共类和公共方法。

Why can't I reference my class library? 为什么我不能引用我的班级图书馆?

Thanks 谢谢

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在C#应用程序中添加对基于C的DLL的引用? - How can I add a reference to a C-based DLL in my C# application? 无法在我的c#应用程序中添加静态端口映射 - Can't add a static port mapping in my c# application 如何使用XAML在C#应用程序中添加动态组合框 - How can I add Dynamic combobox in my c# application using xaml 我无法在 wpf c# 应用程序中使用 firesharp 库检索 firebase 数据 - I can't retrieve firebase data using firesharp library in my wpf c# application C#控制台应用程序properties.resources无法正常工作? 我可以使用什么参考来解决此问题? - C# Console application properties.resources isn't working? What reference can I use to fix this? 如何添加将类引用数据返回到我的C#类中的函数? - How can I add a function that returns class reference data into my c# class? 如何在我的 C# Visual Studio 项目中添加 VC++ DLL 作为参考? - How can I add a VC++ DLL as a reference in my C# Visual Studio project? 如何将应用程序资源添加到应用程序的 C# 后端而不是 XAML 文件中? - How can I add application resources to my C# backend for the application instead of in the XAML file? 无法将MySql添加到C#程序中(已添加引用和“使用”) - Can't add MySql to C# program (reference and “using” already added) C# UWP - 无法在同一解决方案中添加对项目的引用 - C# UWP - Can't add reference to project in same solution
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM