razor - Bundling scripts are not getting rendered -


I am having problems with script bundling and minimization with ASP.NET, I try all the popular solutions found on the internet But still the same problem.

Looks like my BundleConfig.cs

  name space MYPROJ {public class BundleConfig {public static void AddDefaultIgnorePatterns (IgnoreList ignoreList) {if (Ignore list == empty) return; IgnoreList.Ignore ("* intellisense.js."); IgnoreList.Ignore ("* - vsdoc.js"); Ignore list ("* .debug.js", optimization mode. When enabled); Ignore list ("*. Min.js", optimization mode. When disabled); Ignore list ("* .min.css", optimization mode. When disabled); } Public Static Zero Register Bundle (Bundle Collection Bundle) {Bundle. Unknown list Clear (); AddDefaultIgnorePatterns (bundles.IgnoreList); Add bundle (add new scriptbundle ("~ / bundle / jquery"). ("~ / Scripts / jquery- {version} .js")); One ?? | Â ?? |. //bundles.Add(new ScriptBundle ("~ / script") ("~ / script / jquery.unobtrusive-ajax.min.js" "~ / script / kendoui / kendo .all.min.js" "~ / Script / kendoui / kendo.combobox.min.js "" ~ ~ / script / kendoui / kendo.grid.min.js ")); Include //bundles.Add (new scriptbundle ("~ / script"). ("~ / / Scripts / kendui / kendo.lm.in"); Include //bundles.Add (new scriptbundle ("~ / script"). ("~ / Scripts / kandui / kendo.com .bobox.man")); Include //bundles.Add (new scriptbundle ("~ / script"). Include ("~ / script / kandui / kendo.grid.money.js")); IncludeDirectory ("~ / script / kendoui", "* .js") ..); bundles.Add (New ScriptBundle ("~ / script") IncludeDirectory ("~ / script" "* .js");); One ?? | | ?? | | Bundledable.config optimization = true; }}}   

and in the master view:

  @ scripts.Render ("~ / scripts")   

After all this when I run I get this tag: "? / Script V = ZnxC8Dcoc3fJ-hfKQHLiTe19PjJFHwPhwHPUncuBtzE1"

  & lt script src = & gt; & Lt; / Script & gt;   

And using Chrome Code Inspector I have found that the status code for the above resource is status code: 302 found and scripts / < / Code> this is the status code: 404 not found

and I can not even see the script file by clicking on the view source, it seems that nothing is loading But all files and directories are kept correctly, just for information, make my stylesheet Sex is working fine.

Please help Thanks.

"itemprop =" text ">

You can not give your bundle a name which is also the name of the current directory. Rename the bundle or add / js to make it work properly: Add bundles (new scriptbundle ("~ / scripts / js"). Include directory ("~ / script", "* .js"). Include directory ("~ / scripts / kendui", "* .js"));

and

  @ Scripts.Render ("~ / scripts / js")   

any other name Does not exist, like

  bundles. Include directory ("~ / script / kandui", "* .js"); Add (New scriptbundle ("~ / ScriptMonkey") directory ("~ / scripts", "* .js"));   

... assume that you do not have the / ScriptMonkey directory.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -