I suggest you ...

Support a JavaScript Project type in Visual Studio

Please provide a new project type in Visual Studio for developing JavaScript components.

The new project type could have the following features:

- Contains .js, .css, and .html files.
- Represents a complete UI component - i.e. a module or widget.
- Runs JSLint or JSHint on build and reports any errors and violations.
- The build ouput is minified JavaScript and CSS; there should be options for specifying a minifier.
- The build output should also output any HTML files (as ASP.Net partial views).
- The new project type permits adding references to other JavaScript projects.
- Intellisense is provided based on the referenced projects.
- ASP.Net MVC projects should also permit referencing of these new JavaScript projects.
- ASP.Net MVC should provide razor @Script/@Style syntax to include the minified bundles with reference to their project names.
- ASP.Net MVC should permit referencing the partial views from the build output.
- Similarly a JavaScript test project should also be provided; this project type permits referencing the new JavaScript projects.
- Test methods in the test projects are picked up and displayed in the Test Runner - the same as any C# test method.
- The test projects include a built-in assertion library, or permit external libraries, such as QUnit.
- The JavaScript project should be viewable in Page Inspector, since it includes HTML, CSS and JavaScript.
- It should also be possible to debug the project via Page Inspector.

1,007 votes
Vote
Sign in
(thinking…)
Password icon
Signed in as (Sign out)
You have left! (?) (thinking…)
Noel Abrahams shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

In reviewing this feedback item and discussing with individuals who voted, we’ve decided that this item is too old and out of date to guide our product development.

If you’re still interested in the idea of the JavaScript project type, please vote on this new suggestion here: https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/31368127-create-a-javascript-project-type

It would also be great to hear your personal feedback on what you would like to see in such a project. Please feel free to email me back directly.

Regards,
Bowden Kelly
JavaScript & TypeScript Program Manager

15 comments

Sign in
(thinking…)
Password icon
Signed in as (Sign out)
Submitting...
  • Anonymous commented  ·   ·  Flag as inappropriate

    In fact Visual studio 13, 15 did a good job supporting javascript. Why VS 17 went backwards is beyond me. Sad.

  • Tom commented  ·   ·  Flag as inappropriate

    Adding a transpiler from Visual Basic (a language based on VB6 programming and VBA programming) to JavaScript would really make this worthwhile.

  • Joe commented  ·   ·  Flag as inappropriate

    Well it looks like it is now in the making. Checkout Visual Studio Code. I can guarantee that this cross-platform tool will get folded into the main VS at some point.

  • Anonymous commented  ·   ·  Flag as inappropriate

    Still under review? Any progress? What about a simple project system with Task Runner Explorer, Bower and NPM?

  • Joy commented  ·   ·  Flag as inappropriate

    Typically Bower and grunt support should be more than enough for this kind of project .

  • Konstantin Tarkus commented  ·   ·  Flag as inappropriate

    I'd really like to see a JavaScript project type which would NOT contain 'bin' / 'obj' folders and similar artefacts. Plus I need a command window with Node.js tools enabled in it. So you could use Grunt (or Gulp.js) to compile your JavaScript projects. Also developers without Visual Studio, could work on the same project as well (with WebStrom for example).

  • Noel Abrahams commented  ·   ·  Flag as inappropriate

    Thanks for considering this idea for review.

    Since this idea was floated, the biggest change that has occurred in the JavaScript world is TypeScript.

    There is already a TypeScript project type in VS whose output is compiled JavaScript. Furthermore the TypeScript language service provides excellent intellisense.

    What is currently lacking there is the integration with ASP.Net. TypeScript approaches the problem from a purely JavaScript perspective.

    It would be great if we are able to reference a TypeScript project file (that has HTML and CSS as well) from an ASP.Net Web Application and use it to render a website.

    Here are a couple of related discussions from the TypeScript codeplex site:

    http://typescript.codeplex.com/discussions/404012
    http://typescript.codeplex.com/workitem/571

  • Admin commented  ·   ·  Flag as inappropriate

    Chris Ammerman commented · December 19, 2012 8:14 p.m

    The node.js community is currently offering up the only mature toolsets for JavaScript projects. It would be fantastic to be able to have JavaScript projects in VS and TFS with support for a "JavaScript build" that can merge and minify, and kick off automated tests.

    Noel Abrahams commented · November 22, 2012 2:11 p.m.

    With the advent of TypeScript, the major change in the above is from "Runs JSLint or JSHint on build and reports any errors and violations" to using the TypeScript compiler instead.

    There is now a TypeScript project type and this suggestion is to develop that project type so that it can be referenced from an ASP.Net Web Application.

  • Jordan Matthiesen commented  ·   ·  Flag as inappropriate

    @ericb - Would it be fair to change the title of this idea to "JavaScript Library Project Template" to remove some ambiguity?

    Jordan Matthiesen
    Program Manager, Microsoft Visual Studio

  • ericb commented  ·   ·  Flag as inappropriate

    If you could provide a "Visual Studio-ified" version of Grunt (http://gruntjs.com/), I think this would be 90% there.

    I've seen quite a few (including myself) creating W8 apps using the JavaScript App Project Template, and then adding a grunt.js file to it in order to handle their JS build process.

    Using Grunt in a JavaScript App Project works, but it still doesn't allow me to easily build re-usable JavaScript libs (or allow me to have a JavaScript project like a "MyApp.Core" that is separate from my actual "MyApp.UI" project.)

  • Borek Bernard commented  ·   ·  Flag as inappropriate

    Fully agree, sometimes JS library needs to be shared amongst more projects in a solution and currently, there is no straightforward way to do it. Also, you may want to compile it using Closure, minify, obfuscate etc. and this all could be built-in.

    In VS 11, JavaScript is supposed to be a first-class language so it should have a first-class support on the project level I believe.

Feedback and Knowledge Base