ASPNETBOILERPLATE - MVC 包内存不足错误
ASPNETBOILERPLATE - MVC Bundle out of memory error
我将以下方法添加到 MpaBundleConfig.cs 文件中。我还为 JS 文件添加了类似的方法。
private static void EXLNTAddMpaCssLibs(BundleCollection bundles, bool isRTL)
{
bundles.Add(
new StyleBundle("~/Bundles/Common/EXLNT/css" + (isRTL ? "RTL" : ""))
.Include(StylePaths.Bootstrap_DatePicker)
.Include(StylePaths.Bootstrap_DateTimePicker)
.Include(StylePaths.Bootstrap_DataTables)
.Include(StylePaths.DataTables)
.Include(StylePaths.Select2)
.Include(StylePaths.Select2_Bootstrap)
.ForceOrdered()
);
}
当我运行应用程序登录后,我得到错误:
Exception of type 'System.OutOfMemoryException' was thrown.
我想要做的就是添加一些 JS/CSS 文件,这些文件是我从 ASPNETZERO 下载的解决方案后添加到解决方案中的。关于如何解决此错误的任何想法?
@hikalkan - 感谢您的回复,我仔细查看了我的问题并找到了根本原因。当我进行代码合并以升级到 V4.2 时,当我从现有代码库复制过来时,我错误地将 "StylePaths.cs" 文件中的 JS 文件路径和 CSS 文件路径复制到 "ScriptPaths.cs" 文件!!
我将以下方法添加到 MpaBundleConfig.cs 文件中。我还为 JS 文件添加了类似的方法。
private static void EXLNTAddMpaCssLibs(BundleCollection bundles, bool isRTL)
{
bundles.Add(
new StyleBundle("~/Bundles/Common/EXLNT/css" + (isRTL ? "RTL" : ""))
.Include(StylePaths.Bootstrap_DatePicker)
.Include(StylePaths.Bootstrap_DateTimePicker)
.Include(StylePaths.Bootstrap_DataTables)
.Include(StylePaths.DataTables)
.Include(StylePaths.Select2)
.Include(StylePaths.Select2_Bootstrap)
.ForceOrdered()
);
}
当我运行应用程序登录后,我得到错误:
Exception of type 'System.OutOfMemoryException' was thrown.
我想要做的就是添加一些 JS/CSS 文件,这些文件是我从 ASPNETZERO 下载的解决方案后添加到解决方案中的。关于如何解决此错误的任何想法?
@hikalkan - 感谢您的回复,我仔细查看了我的问题并找到了根本原因。当我进行代码合并以升级到 V4.2 时,当我从现有代码库复制过来时,我错误地将 "StylePaths.cs" 文件中的 JS 文件路径和 CSS 文件路径复制到 "ScriptPaths.cs" 文件!!