javascript – server and client code in different projects, but in the same solution

Question:

I would like to make it so that in one solution there are two projects, one is an asp.net webapi, and the other is just an html page with a set of js scripts, and so that when you press f5, all this will run together, and an html page opens in the browser. How to implement this in visual studio?

Answer:

  1. In Visual Studio, open the context menu of the Solution, select Add | Existing Web Site... Select directory with site files.
  2. Call the context menu of the Solution, select Properties . In the dialog that appears, select Common Properties | Startup Project . Select Multiple startup projects . Select Action Start for WebApi, Start without debugging for the site.
  3. To prevent the page for the WebApi application from opening in the browser, you need to call the context menu of the WebApi project. Select Properties . Web tab. Start Action -> Don't open a page. Wait from a request an external application .
Scroll to Top