Closed IRooc closed 8 years ago
This is the desired behavior and indeed what is in our default templates now. Apps are free to change the code to point to whatever they want, but this code is optimized for working with the project in VS, from the command line in the project root, and after the project is published.
In the Main startup you use
Directory.GetCurrentDirectory()
to set the contentroot of the webserver, but this will fail if you start the application from a different folder likedotnet run -p src\live.asp.net
It would be better to use
PlatformServices.Default.Application.ApplicationBasePath
to always have the correct path right? It's inMicrosoft.Extensions.PlatformAbstractions