安装了.NET 4.5,但不能在Visual C#中使用的ZipFile类 [英] Installed .Net 4.5 but can't use ZipFile class in Visual C#

查看:498
本文介绍了安装了.NET 4.5,但不能在Visual C#中使用的ZipFile类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是怎样的一个新手到Visual Studio编程。

I'm kind of a newbie to Visual Studio programming.

我最近升级的.Net 4.0到4.5,以使用zip文件类下System.IO.Com pression,但安装完成时,Visual Studio(我用2012)仍然无法识别的ZipFile为后类名。

I recently upgraded .Net 4.0 to 4.5 in order to use the ZipFile class under System.IO.Compression, but after the installation completed, Visual Studio (I'm using 2012) still cannot recognize ZipFile as a class name.

我做了肯定的.Net 4.5出现在控制面板的程序列表和我的C#的解决方案集。NET框架4作为目标框架。

I've made sure that .Net 4.5 appears in Control Panel programs list and my C# solution sets .Net Framework 4 as the target framework.

有人能帮助我这一点?

推荐答案

见的的ZipFile类的MSDN上。它显示了所需的框架版本是4.5。一旦框架的版本是固定的检查已经添加了一个参考 System.IO.Com pression.FileSystem.dll 组件,并增加了使用 System.IO.Com pression 指令到你的类。

See ZipFile Class on MSDN. It shows the required framework version is 4.5. Once the framework version is fixed check you have added a reference to the System.IO.Compression.FileSystem.dll assembly and added a using System.IO.Compression directive to your class.

这篇关于安装了.NET 4.5,但不能在Visual C#中使用的ZipFile类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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