Я создаю приложение для обслуживания .net 5, которое смотрит несколько других приложений и отправляет электронную почту при необходимости. Я использую FluenTemail для отправки этих электронных писем, и все работает нормально, пока я не развернут приложение.
RazorLight.Compilation.TemplateCompilationException: Failed to compile generated Razor template:
- (3:35) The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
- (3:10) The type 'Type' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
- (35:37) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
- (38:66) 'GeneratedTemplate.ExecuteAsync()': return type must be 'Task' to match overridden member 'TemplatePageBase.ExecuteAsync()'
- (38:66) The type 'Task' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
- (40:12) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
- (41:12) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
- (42:12) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
- (43:12) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
- (53:12) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
- (69:12) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
- (84:12) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
- (44:19) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
- (92:12) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
- (47:20) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
- (100:12) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
- (50:20) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
- (108:12) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
- (53:19) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
- (116:12) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
- (124:12) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
See CompilationErrors for detailed information
at RazorLight.Compilation.RoslynCompilationService.CompileAndEmit(IGeneratedRazorTemplate razorTemplate)
at RazorLight.Compilation.RazorTemplateCompiler.CompileAndEmit(RazorLightProjectItem projectItem)
at RazorLight.Compilation.RazorTemplateCompiler.OnCacheMissAsync(String templateKey)
--- End of stack trace from previous location ---
at RazorLight.EngineHandler.CompileTemplateAsync(String key)
at RazorLight.EngineHandler.CompileRenderAsync[T](String key, T model, ExpandoObject viewBag)
at CallSite.Target(Closure , CallSite , Object )
at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
at FluentEmail.Razor.RazorRenderer.ParseAsync[T](String template, T model, Boolean isHtml)
at FluentEmail.Razor.RazorRenderer.FluentEmail.Core.Interfaces.ITemplateRenderer.Parse[T](String template, T model, Boolean isHtml)
at FluentEmail.Core.Email.UsingTemplateFromFile[T](String filename, T model, Boolean isHtml)
at WatchDog.Services.NotificationService.SendEmailAsync[TModel](String subject, String fileName, TModel model) in C:\Users\SomeOne\source\repos\WatchDog\WatchDog\Services\NotificationService.cs:line 41
< /code>
Моя настройка выглядит следующим образом: < /p>
< /th>
< /th>
< /tr>
< /th> < /br /> < /tr> />
Views Folder
< /table> < /div>
Я добавил папку Views и обратите внимание, что это проект .net 5 Worker Service < /code> (если это важно вместо того, чтобы какой-то веб-проект). < /p>
Внутри конфигурации, я добавил Razorrenderer
Я создаю приложение для обслуживания .net 5, которое смотрит несколько других приложений и отправляет электронную почту при необходимости. Я использую FluenTemail для отправки этих электронных писем, и все работает нормально, пока я не развернут приложение.[code]RazorLight.Compilation.TemplateCompilationException: Failed to compile generated Razor template: - (3:35) The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'. - (3:10) The type 'Type' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'. - (35:37) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'. - (38:66) 'GeneratedTemplate.ExecuteAsync()': return type must be 'Task' to match overridden member 'TemplatePageBase.ExecuteAsync()' - (38:66) The type 'Task' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'. - (40:12) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'. - (41:12) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'. - (42:12) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'. - (43:12) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'. - (53:12) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'. - (69:12) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'. - (84:12) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'. - (44:19) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'. - (92:12) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'. - (47:20) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'. - (100:12) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'. - (50:20) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'. - (108:12) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'. - (53:19) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'. - (116:12) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'. - (124:12) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'. See CompilationErrors for detailed information at RazorLight.Compilation.RoslynCompilationService.CompileAndEmit(IGeneratedRazorTemplate razorTemplate) at RazorLight.Compilation.RazorTemplateCompiler.CompileAndEmit(RazorLightProjectItem projectItem) at RazorLight.Compilation.RazorTemplateCompiler.OnCacheMissAsync(String templateKey) --- End of stack trace from previous location --- at RazorLight.EngineHandler.CompileTemplateAsync(String key) at RazorLight.EngineHandler.CompileRenderAsync[T](String key, T model, ExpandoObject viewBag) at CallSite.Target(Closure , CallSite , Object ) at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0) at FluentEmail.Razor.RazorRenderer.ParseAsync[T](String template, T model, Boolean isHtml) at FluentEmail.Razor.RazorRenderer.FluentEmail.Core.Interfaces.ITemplateRenderer.Parse[T](String template, T model, Boolean isHtml) at FluentEmail.Core.Email.UsingTemplateFromFile[T](String filename, T model, Boolean isHtml) at WatchDog.Services.NotificationService.SendEmailAsync[TModel](String subject, String fileName, TModel model) in C:\Users\SomeOne\source\repos\WatchDog\WatchDog\Services\NotificationService.cs:line 41 < /code> Моя настройка выглядит следующим образом: < /p>
< /th> < /th> < /tr>
< /th> < /br /> < /tr> />
Views Folder
< /table> < /div> Я добавил папку Views и обратите внимание, что это проект .net 5 Worker Service < /code> (если это важно вместо того, чтобы какой-то веб-проект). < /p>
Внутри конфигурации, я добавил Razorrenderer [/code] as: [code]//Set email service using FluentEmail services.AddFluentEmail("appname@domain.com") .AddRazorRenderer(@$"{Directory.GetCurrentDirectory()}/Views/") .AddSmtpSender("smtp.somesmtp.com", 25) .AddSmtpSender(new System.Net.Mail.SmtpClient() { }); < /code>
th> somereport.cshtml: < /th> < /tr> < /thead> < /table> < /div> SomeReport.cshtml[/code] находится внутри представлений \ emails \ somereport.cshtml , что выглядит следующим образом: [code]@using System.Collections.Generic; @using WatchDog.Models;
th>_layout.cshtml Файл: < /th> < /tr> < /thead> < /table> < /div> _Layout.cshtml[/code] находится внутри представлений \ shared \ _layout.cshtml , что выглядит так: [code]@* Some common layout styles here *@ @RenderBody() < /code>
Я создаю приложение рабочей службы .NET 5, которое отслеживает несколько других приложений и при необходимости отправляет электронную почту. Я использую FluentEmail для отправки этих писем, и все работает нормально, пока я не разверну приложение....
Пожалуйста, помогите мне удалить/скрыть кредит нижнего колонтитула в моем шаблоне сайта Blogger. Я смог скрыть это, но все же, когда кто -то видит мышь в нижнем колонтитуле, он показывает кликабельный знак, и если кто -то нажимает там, он все еще...
С Android Studio v0.8.2 я заблокирован со следующим исключением. С бета -релизом это работало очень хорошо. Я обновил свою IDE до 0,8,2 и удалил свой целевой каталог и пытался построить снова. Я сейчас поражен....
Я новичок с Flutter на коде Visual Studio. Я пытаюсь преобразовать приложение титана, чтобы трепетать. Во время этого я добрался до того, что мне нужно было добавить 2 пакета, а именно ared_preferences и device_info_plus. После добавления их я...