Skip to content

Unable to find view '~/Views/Mail/Example.cshtml' #449

@neman

Description

@neman

Describe the bug
I am using Coravel with Worker Service, .NET 9.
When I try to use example, downloaded with Coravel CLI, I got the following error:

 System.InvalidOperationException: Unable to find view '~/Views/Mail/Example.cshtml'. The following locations were searched:
      ~/Views/Mail/Example.cshtml
         at Coravel.Mailer.Mail.Renderers.RazorRenderer.FindView(ActionContext actionContext, String viewName)
         at Coravel.Mailer.Mail.Renderers.RazorRenderer.RenderViewToStringAsync[TModel](String viewName, TModel model)
         at Coravel.Mailer.Mail.Mailable`1.BuildMessage(RazorRenderer renderer, IMailer mailer)
         at Coravel.Mailer.Mail.Mailable`1.SendAsync(RazorRenderer renderer, IMailer mailer)
         at Coravel.Mailer.Mail.Mailers.SmtpMailer.SendAsync[T](Mailable`1 mailable)

This is project type
<Project Sdk="Microsoft.NET.Sdk.Worker">

This is my structure

Image

Affected Coravel Feature
Mailing

Expected behaviour
I expect app to find aprropriate View for email.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions