Hej,
w projekcie webapi utworzyłem sobie folder "Mail Templates", w którym trzymam sobie templatki. Potem robie coś takiego:
public class MailTemplateParser : IMailTemplateParser
{
public string Read(string templateName)
{
var html = "";
var template = Path.Combine(Directory.GetCurrentDirectory(), "MailTemplates", templateName);
using (StreamReader stream = System.IO.File.OpenText(template))
{
html = stream.ReadToEnd();
}
return html;
}
}
na lokalu spod VS mi to działa, po buildzie brakuje mi zarówno katalogu MailTemplates jak i samego pliku html.
Co robię nie tak?
moja struktura
- projekt.webapi
-
- config
-
- controllers
-
- entities
-
- exceptions
-
- mailTemplates
- -- mojTemplateMail.html
-
- middleware
-
- migrations
-
- models
-
- services