Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Visual Studio 2017 support a _references.js file?

my JavaScript Intellisense is broken in Visual Studio 2017. I know my _references.js file is correct as JS Intellisense works fine in VS2015.

Any help is greatly appreciated!

like image 892
webbersmak Avatar asked Mar 08 '17 00:03

webbersmak


People also ask

What is _references js file?

This _references. js JavaScript file provides IntelliSense supports based on script references available in a file.

How do I add a .JS file to Visual Studio?

With your project open in Visual Studio, right-click on a folder or your project node in Solution Explorer (right pane), and choose Add > New Item. In the New File dialog box, under the General category, choose the file type that you want to add, such as JavaScript File, and then choose Open.

Does Visual Studio support JS?

Visual Studio 2019 provides rich support for JavaScript development, both using JavaScript directly, and also using the TypeScript programming language, which was developed to provide a more productive and enjoyable JavaScript development experience, especially when developing projects at scale.

How do I reference a JavaScript file in aspx?

Just add the script tags in the master page or content page and the javascripts can be included in them. If you want to add a JavaScript file to them, you can use src attribute in the script tag.


1 Answers

You no longer need a _references.js file. IntelliSense in VS 2017 works a little differently than it used to.

Are you trying to use a specific library or just get IntelliSense from your own code? If it's a library, it needs to have a .d.ts file. If it is your own code, it might depend on if you are using a module system or not.

You can read more about how it works here: https://docs.microsoft.com/en-us/visualstudio/ide/javascript-intellisense

like image 85
Bowden Kelly Avatar answered Sep 19 '22 05:09

Bowden Kelly