简体   繁体   中英

Visual Studio 2015 not executing JavaScript files

I have an MVC project that uses RequireJS. I installed VS 2015 (community edition) and opened the project, and my JS files don't appear to even be executed. No breakpoints are hit (using IE), no error messages, just brings up my project's home page and doesn't do anything that's in my JS files. It works fine in VS 2013 (which I still have installed). I'm assuming this is some type of setting or configuration issue, since it still works in VS 2013. Any ideas?

Thanks,

Andrew

So when I ran this in Chrome instead of IE, it still didn't work, but Chrome's developer panel gave me some error messages. The messages on the panel itself didn't make a lot of sense (issues about not being able to find files that I could easily verify were there), but when I clicked on the message and it opened up the more specific error page, it led me to the following lines in my web.config file:

<staticContent>
  <mimeMap fileExtension=".less" mimeType="text/css" />
</staticContent>

This was within the "system.webserver" section. Honestly, I'm not sure whether this was necessary in VS 2013, or wasn't but just didn't cause a problem. Either way, I removed the 3 lines above and everything worked fine again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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