The title should be self-explanitory, but just in case. I am trying to build an angular application which will be hosted on azure. Currently I am having some issues with using kestrel, so I would like to build the application in visual studio but without using any .net code (so no startup.cs or program.cs). If the answer is plainly no, then I guess I will need to find another IDE that will do what I require.
-
4Can't recommend enough `Visual Studio Code` for this type of projects. :) – GG. Dec 21 '16 at 10:11
-
try http://tutorialzine.com/2015/02/single-page-app-without-a-framework/ – Umakant Dubey Feb 22 '17 at 06:10
-
3Am I the only one looking at these questions and answers and asking what's going on here? If you don't want to use .net then just create an index.html file and you have a website. Visual Studio is an editor not a framework. – MindingData Feb 23 '17 at 05:24
5 Answers
Yep. Just create a website project instead of a web application project.
https://msdn.microsoft.com/en-us/library/dd547590.aspx
Scenarios in which Web site projects are the preferred choice include the following:
You do not want to have to explicitly compile the project in order to deploy it.

- 5,919
- 10
- 49
- 84
-
doesn't appear to work, can't get bower to install packages and can't get grunt to work – r3plica Dec 21 '16 at 16:35
-
How are you using grunt and bower? Through the nodeJS command line? Visual Studio should not be interfering. – Kye Dec 21 '16 at 22:27
-
bower was working through visual studio (same for grunt). Using it from the command line seems to not put the libraries into wwwroot/lib folder. I tried adding the directory to bower.json but it didn't work. – r3plica Dec 22 '16 at 10:34
Yes it is very much possible with visual studio to develop a SPA in angular without using .net framework. Below are the steps you can follow to getting started with a SPA in angular using visual studio.
Goto: File > New > Project
From the below screen selecet ASP.NET Web Application
Provide Name, Location, Solution click OK will get the below popup
From the above Popup select Empty and Press OK to create your project. Now add an html file say index.html to the project. Write the below code in index.html
<head>
<title></title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.min.js"></script>
</head>
<body>
<div ng-app>
Message:<input type="text" ng-model="message" />
<hr>
<div>Entered Message:{{message}}</div>
</div>
</body>
</html>
And you are good to go. Right click on index.html
and select View In Browser
you will see the output in your browser something like this.
Now You can can create a directory structure accordingly. Below are few link that can help you with the directory structure.
Angular App Structure Guideliines
Or you can follow the steps as stated on official Angular website for getting started with an angular project in Visual Studio
VISUAL STUDIO 2015 QUICKSTART ANGULAR
Hope this Helps :)
Yes you can develop a SPA application without .net code in visual studio. Visual studio code is another IDE for cross platform development.
Check out the example at pluralsight

- 146
- 1
- 16

- 3,334
- 3
- 23
- 50
My Assumption here: You are ok to work on your website offline without actually firing it off thru the Azure hosted location.
I will try to address how to have a website opened up in Visual Studio which has nothing to do with project based on .NET Framework.
Steps to follow:
a. Create a physical folder on your drive and keep your SPA related files in it or let's say keep a simple "HelloWorld.html" file which just display some plain text.
b. Go to VS > File > Open > Website (Four or more options will be present) - choose the simplest "File System" and point to the folder created in step a.
VS will open the folder as website and add a solution file to it but no other .NET Code is associated to it. This way you can use the IDE as I think you intend to use.

- 280
- 2
- 11
If you using node toolings to build you project you may want to try Node.js Tools for Visual Studio
It does have support for gulp/grunt tasks as well as it has integration with azure. The support is provided via custom project types.

- 905
- 11
- 26