I'm migrating my WebAPI to .Net Core, the project contains razor files (.cshtml) which I'll compile at runtime when a method is called and return an HTML file.
Before migrating, all files were accessible to use, after that, I can only access the files under "wwwroot", excluding file types like .cshtml which are always hidden when deployed on Azure.
It's working perfectly on my machine, the issue is when it's deployed live.
I've tried adding and removing app.UseStaticFiles().
I'm using Razorlight to access the razor templates, it's throwing an error saying that the file doesn't exist.
cshtmlfiles included when you deploy to azure? If you are using Azure WebApp you can navigate to <your-web-app-name>.scm.azurewebsites.net and browse the file system of your web app. Can you confirm that the files have been deployed?