Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2015 - Can I make a project for client side-only development that has support for bower, and AngularJS intellisense?

I would like to do some client side-only web development using VS 2015. I don't need any server-side code, and I don't need any .net code compilation going on. However, I would like javascript intellisense, specifically in this case for angularjs (presumably using the _references.js file) and bower support.

How could I achieve this in Visual Studio 2015? I have been looking at the ASP.net 5 templates:

enter image description here The closest-looking thing I can see is the 'Empty' option, which has no controllers. This also has the little 'dependencies' arrow visible in the tree, and it seems trivial to add bower.json and _references.js (which according to my limited understanding, is what gets the intellisense working properly.)

enter image description here

However, it also has 'Startup.cs' that sets up various services that I don't need for my use case. Removing this file 'naïvely' gives Error CS5001 Program does not contain a static 'Main' method suitable for an entry point when I build the xproj. Unlike with a .csproj, there's no ability to change the output type of the project, and in any case, I don't want to be creating a .dll. I guess the next step might be to use a custom version of Microsoft.DNX.targets, but at this point I seem to be wandering off the beaten track a bit.

So, a 'Web Site'...

enter image description here ...doesn't have the 'Startup.cs', but it doesn't seem to be able to do anything with bower either.

enter image description here

I'd be interested to know how to do this in projects/templates for earlier versions of ASP.net too, if they could offer the same capabilities.

like image 280
Нет войне Avatar asked Nov 08 '22 23:11

Нет войне


1 Answers

Startup class is useful for static file service. It what actually boots up your 'server'. ASPNET5 empty template is perfect for the job.

like image 120
Bart Calixto Avatar answered Mar 09 '23 00:03

Bart Calixto