实现捆绑和缩小 [英] To implement bundling and minification

查看:52
本文介绍了实现捆绑和缩小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好



我希望在我的项目中实施捆绑和缩小,该项目在框架4.0上运行

当我遵循指定的指导原则时在他们的网站我遇到以下错误



Hi There

I want to implement bundling and minification in my project which runs on framework 4.0
when I follow the guidelines specified in their site I am encountering the following error

PM> Install-Package Microsoft.Web.Optimization -Version 1.0.0-beta2 -Pre







Attempting to resolve dependency 'Microsoft.AspNet.Web.Optimization (≥ 1.0.0-beta2)'.
The source at nuget.org [https://www.nuget.org/api/v2/] is unreachable. Falling back to NuGet Local Cache at C:\Users\rr156547\AppData\Local\NuGet\Cache
Install-Package : Unable to find version '1.0.0-beta2' of package 'Microsoft.Web.Optimization'.
At line:1 char:16
+ Install-Package <<<<  Microsoft.Web.Optimization -Version 1.0.0-beta2 -Pre
    + CategoryInfo          : NotSpecified: (:) [Install-Package], InvalidOperationException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand





还有其他工作可以解决这个问题吗?或者有没有可用的dll?



提前谢谢



is there any other work around to go about this ? or is there any dll available for this?

Thanks in advance

推荐答案

你有什么理由吗?我试图安装这样一个旧版本和测试版本吗?



您真的应该使用以下内容来安装最新版本:



Is there a reason you are trying to install such an old version and a beta version at that?

You really should just use the following to install the latest version:

PM> Install-Package Microsoft.AspNet.Web.Optimization





看来您的网络可能存在连接问题。您可以做的是创建一个本地Nuget存储库,如此处所述。



之后,您可以下载Nuget站点并将其托管在您所创建的本地存储库中。



It appears you might have some connection issue with your network. What you can do is create a local Nuget repository as described here.

After that you can download the Nuget site and host it on the local repository you have made.


这篇关于实现捆绑和缩小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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