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

发布于 2025-02-10 20:21:29 字数 207 浏览 1 评论 0原文

我正在研究一个项目(ASP.NET MVC)。当我在调试模式下运行它时,它会在没有任何错误的情况下运行,但是如果我在发布模式下运行它(无需调试)会产生以下错误。有什么问题。

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

I'm working on a project (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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

半﹌身腐败 2025-02-17 20:21:29

我找到了解决方案。我已经将min.js文件放在捆绑文件中。我删除了它们,并直接链接到CSHTML页面。现在它运行顺利。

I found the solution. I have put min.js files in bundle config file. I removed them and linked directly to cshtml page. Now it's working smoothly.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文