Matthew MacFarland
Matthew MacFarland

Reputation: 2731

How can VS Code be configured to run and debug with IIS Express and ASP.NET core?

I have been able to run ASP.NET core applications with Visual Studio 2017. Visual Studio has the integration of IIS Express and ASP.NET core all setup and it works with F5.

I would like to get this same functionality in VS Code. I have found and tried the IIS extensions for VS code. They serve the files without launching the dotnet.exe process.

How can I configure my VS Code project to provide similar run/debug functionality as Visual Studio 2017?

Upvotes: 22

Views: 24267

Answers (2)

Lex Li
Lex Li

Reputation: 63289

Instead of leaving this question open and incorrect answers posted between 2018-2022, I am offering an answer with hints to guide whoever wants this.

Unfortunately, ASP.NET Core on IIS Express require VS tricks like I wrote a long while ago. Thus, if you want the same functionality, you would have to implement it yourself.

Note that this rules out all kinds of simple IIS Express extensions for VS Code as none of them attempted to go this far.

If you have both VS and VS Code installed on the same machine, then the new IIS/IIS Express extension for VS Code might help a little bit. By integrating with Jexus Manager and VS, it can start/stop the web apps (but still need a lot of further tuning).

You should consider alternative ways to set up your development workflow, and dotnet watch is one of them.

Upvotes: 2

yenkay
yenkay

Reputation: 104

There is an extension available in visual studio market place which can be used to configure and host web applications in IIS Express from VS Code. Check it our here. https://marketplace.visualstudio.com/items?itemName=warren-buckley.iis-express

Upvotes: 1

Related Questions