I have ASP.NET Core app running Piranha CMS with some custom controllers. The project itself is working perfectly fine in debugging. It used to publish fine but since a VS update, the views for my custom controllers do not get published anymore. When I publish the project, no Views directory is created and therefore when publishing the app, I get a view not found error on any custom controller action. Pirahna CMS however is working flawlessly. When I copy the Views folder (which exists in debugging) to the output directory, also my custom controllers work perfectly fine.

I’ve checked my project and my publishing file, none of which exclude any views from publishing. Build type for the views is content.

Sure copying the views is a workaround, but it’s annoying…

I’ve tried:

  • creating a new publishing profile to local disk
  • checking project and publishing files for excludes
  • checking build type of .cshtml files
  • tried setting “copy to output directory” to “always” -> no change, now back to “do not copy”

Anything else I might want to check in order to get the publishing process working again?