In Visual Studio 2017, you can disable JavaScript build errors by changing the project’s build settings. Here’s how:
- Open your project in Visual Studio 2017.
- In the Solution Explorer, right-click on the project and select “Properties”.
- In the Properties window, navigate to the “TypeScript Build” section.
- Uncheck the “Enable TypeScript build” option.
This will disable the TypeScript build for your project, and TypeScript errors will no longer appear in the Error List. However, please keep in mind that disabling the TypeScript build will also disable the TypeScript IntelliSense, syntax checking and other TypeScript related features that can help you during the development process.
Another approach to avoid this issue is to install the JavaScript Language Service, you can do this by going to the “Extensions and Updates” window, searching for “JavaScript Language Service” and installing it. This extension can be a great help with development and debugging, and it can help you to fix the code.
This extension will allow Visual Studio to identify JavaScript as a language, and it will be able to provide IntelliSense, error checking and other features. It’s important to notice that this feature is not installed by default, so you may need to check whether you have it installed or not.
It’s important to note that the error messages displayed during the build can help you to identify and fix issues, so disabling the build may not be the best option. It’s also a good idea to check if there’s a way to address the root cause of the error.