MVC5捆绑网址版本和内容丢失 [英] MVC5 bundle url version and content are missing

查看:113
本文介绍了MVC5捆绑网址版本和内容丢失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的MVC5 Web应用程序中,我为页面使用了两个包,一个包含所有页面的常用JavaScript文件,另一个包含特定于页面的包。这在开发环境中工作正常,但页面特定的包不会在暂存中加载。渲染的脚本标签如下所示。

In my MVC5 web application I use two bundles for a page, one contains the common JavaScript files for all the pages and the other bundle is specific for the page. This works fine in development environment but the page specific bundle does not load in the staging. The Rendered script tags are as below.

<script src="/bundles/jsAll?v=72eJMPeVrT1mvbZw1VAU7y6r7vodOImt5NOMq4Gcp581"></script>    
<script src="/bundles/my-page?v="></script>

无法弄清楚为什么会发生这种情况......

Could not figure out why this happens...

推荐答案

本地问题是可行的,因为所有文件都可用,但部署后无效,因为脚本文件未包含在项目中,因此文件无法获取部署到目的地。由于文件丢失,捆绑包无法提供服务,因此不会有版本或内容。

The problem was locally this works because all the files are available, but did not work after deployment because the script file was not included to the project, hence the file does not get deployed to the destination. Since the file is missing the bundle has nothing to serve, so there won't be a version nor content.

这篇关于MVC5捆绑网址版本和内容丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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