levininja levininja - 1 year ago 119
Vb.net Question

ASP.NET project with VS Code and using npm-lite for local server

I have a VB ASP.NET project that I'm trying to setup on my Mac. VS Code is a version of Visual Studio that works on the Mac so this SHOULD work...

The problem is that it doesn't have any local server, no IIS or anything.

I found this post that says hey, just use npm to make a local server.

I did all the steps of installing node and npm, but when I run

npm start
, when it opens http://localhost:3000/ in the browser, the page just says
Cannot GET /
on a blank page.

I notice in the post I linked to, it says "(assuming you have an index.html)". This project has default.aspx instead; how do I indicate that?

Since npm-lite is the server it seems like there should be a way to tell it what the start file is. I've been looking here and here but can't figure it out so far.

  1. How do I tell npm-lite that when I go to localhost:3000/ that should load up the Default.aspx file?

  2. Is there anything else that I'm doing wrong, or anything else I should know about if I'm trying to get npm and npm-lite to work as my web server for a ASP.NET project?

Answer Source

Visual Basic is not yet supported on .NET Core.

See the Future Work section of the ASP.NET Core roadmap:

The following features unfortunately won't make it into the initial RTM release. We are tentatively planning on shipping them in the initial feature release after RTM, during Q3* of 2016:

  • Visual Basic support

Once it's supported, you'll be able to start up your project by simply executing dotnet run inside your project folder. That'll start up the web server defined in your Startup.cs file and allow you to browse the site locally.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download