简体   繁体   English

在没有调试器的情况下运行 ASP.NET MVC JQuery 错误

[英]ASP.NET MVC JQuery error when run without debugger

I'm working on a project (asp.net mvc).我正在开发一个项目(asp.net mvc)。 When I run it in debug mode it runs without any error, but if I runs it in release mode (run without debugging) it gives following errors.当我在调试模式下运行它时,它运行没有任何错误,但如果我在发布模式下运行它(不调试运行),它会给出以下错误。 What could be the issue.可能是什么问题。

Uncaught SyntaxError: Unexpected token 'const'
Uncaught ReferenceError: $ is not defined

I found the solution.我找到了解决方案。 I have put min.js files in bundle config file.我已将 min.js 文件放在捆绑配置文件中。 I removed them and linked directly to cshtml page.我删除了它们并直接链接到 cshtml 页面。 Now it's working smoothly.现在它工作顺利。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM