使用System.IO.Compression.FileSystem V4.0.0.0的先决条件 [英] Prerequisites for using System.IO.Compression.FileSystem Version 4.0.0.0

查看:504
本文介绍了使用System.IO.Compression.FileSystem V4.0.0.0的先决条件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hai All,



我在Visual Studio 2008中开发了一个项目。然后我安装了.NET Framework 4.5以使用System.IO.Compression.FileSystem。当我发布我的项目并在我的系统中安装它工作正常。但是当安装在其他系统中时它会显示



无法安装或运行应用程序。应用程序需要程序集System.IO.Compression.FileSystem版本4.0.0.0首先安装在全局程序集缓存(GAC)中。

请联系您的系统管理员。



我该怎么做才能恢复这个问题?





谢谢。

Hai All,

I have developed a project in Visual Studio 2008. Then I installed .NET Framework 4.5 for using System.IO.Compression.FileSystem. When I publish my project and install in my system it works fine. But when when installed in other system it shows

"Unable to install or run the application. The application requires that assembly System.IO.Compression.FileSystem Version 4.0.0.0 be installed in the Global Assembly Cache (GAC) first.
Please contact your system administrator."

What should I do to recover this problem?


Thank you.

推荐答案

请尝试以下方法。 ..



在解决方案资源管理器的参考部分中,单击您对System.IO.Compression.FileSystem的引用,并确认您具有正确的版本作为参考(命中) F4看看属性是否不可见)。如果没有,则删除参考并重新添加。



确保属性复制本地设置为 True



确保在发布项目时将bin文件夹中的所有内容复制到目标计算机。



我假设目标机器也安装了.NET 4.5 - 如果没有,那么将其作为安装的先决条件包括在内。



编辑:

System.IO.Compression.FileSystem仅适用于.NET 4.5+,现在我已经意识到这个问题(非常清楚地)被标记为Visual Studio 2008 。您将不得不使用VS2012(或可能是VS2010)来构建项目或找到另一种进行文件压缩的​​方法。
Try the following...

In the references section of Solution Explorer click on your reference to System.IO.Compression.FileSystem and confirm that you have the right version as a reference (hit F4 to see the properties if they are not visible). If not then remove the reference and re-add it.

Make sure property Copy Local is set to True

Make sure when you publish your project that everything from the bin folder is copied to the target machine.

I have assumed that the target machine also has .NET 4.5 installed - if not then include that as a pre-requisite for your install.


System.IO.Compression.FileSystem is only available in .NET 4.5+ and I've now realised that the question is (quite clearly) tagged with Visual Studio 2008. You will either have to use VS2012 (or possibly VS2010) to build your project or find an alternative means of doing file compression.


这篇关于使用System.IO.Compression.FileSystem V4.0.0.0的先决条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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