IIS Express allows you to debug a project, but IIS does not, without publishing it first.
What I don't understand is why IIS cannot work in the same way as IIS Express.
Historically, we have been able to point IIS to our project directory and then build the application. When the website is requested, IIS serves it without a problem. Then, if we wanted to debug the application in Visual Studio, we could just attach the debugger to the w3wp.exe process.
We now have to point IIS to the location of the published website and we have to keep publishing the website when we make a change which requires a build. After we have done that we then need to visit the website so that we can attach the Visual Studio debugger to the dotnet.exe process. This means we can't debug the first request made to IIS.
If you look at the questions asked on Stack Overflow, you can see there are a number of people asking why you have to publish first, expecting things to work as they did previously. It seems like a step back to me.
I get that you should be using IIS Express to debug when developing in Visual Studio, but it is untrue to say that IIS and IIS Express work the same because there are subtle differences which can catch you out, and end up wasting hours of your time, trying to work out why something works in one and not the other.
The problem I have is it takes so long to publish a website, because you have to stop IIS, publish the website and start IIS again, that developers will ultimately get frustrated. Builds take long enough, so we shouldn't have to wait to publish too in order to test.
Therefore, can you clarify why IIS Express allows you to debug the project and IIS doesn't?
Looks to be a dup of either/both:
https://github.com/aspnet/Tooling/issues/734
https://github.com/aspnet/Tooling/issues/912
Indeed. VS tooling for developing directly in IIS will be available eventually, but we've got to deal with some more fundamental things first like the project.json -> csproj transition.
Are there plans to have it available for the release of Visual Studio 2017?
No
Are there any updates on this?
@BillHiebert how's the IIS tooling coming along?
Well, the feature was released in VS 2017 15.3
https://www.visualstudio.com/en-us/news/releasenotes/vs2017-preview-relnotes
(ASP.NET Core : In addition to IIS Express, we now also support F5 with IIS for ASP.NET Core projects.)
But it's pretty buggy. When I use it, VS freezes from time to time and detaches debugger.
Sometimes debugging doesn't start and only iisreset
or the PC rebooting helps.
Thanks for making me aware of this. I didn't hear about this as I've not been keeping a close eye on things.
15.3 is a preview release so I don't think the feature is ready for production yet.
You might be best off logging a bug for the issue you are having then it can be tracked otherwise it might be lost in the discussion taking place in regards to this issue.
Hmm, it seems like a release.
https://blogs.msdn.microsoft.com/visualstudio/2017/08/14/visual-studio-2017-version-15-3-released/
If you download the installer from https://www.visualstudio.com/ it will install 15.3
Upd. I posted a wrong link in the previous comment, here is the correct one:
https://www.visualstudio.com/en-us/news/releasenotes/vs2017-relnotes
Yup the first link you sent confused me, is it the preview release you installed and are having problems with or the production release?
I installed the production release from https://www.visualstudio.com/
I can't see how to debug directly in IIS without publishing first, are you getting IIS mixed up with IIS Express?
You don't need to publish an app or use IIS Express.
https://blogs.msdn.microsoft.com/webdev/2017/07/13/development-time-iis-support-for-asp-net-core-applications/
Ah cool thanks for this additional information, I just tested and it does indeed work, I am not having problems so you should log a new bug at https://developercommunity.visualstudio.com/spaces/8/index.html
Most helpful comment
@BillHiebert how's the IIS tooling coming along?