Tổng Bài đăng:
13
Karma:
113
Đã tham gia:
01/07/2009
Vị trí:
Italy
Hi everybody I'm trying to develop a plugin for nopcommerce 4. I started development by copy and paste existing module and renaming class and folders. But now i have a strungly problem. Inside view i receive for @T("<someresource>") the error "@T doesn't exist in current context" inside other modules this error doesn't occur and i can see derived class public abstract class NopRazorPage<TModel> : Microsoft.AspNetCore.Mvc.Razor.RazorPage<TModel> properly. What is wrong in my scenario ? Another problem is also that debug are not working and break point are unreachable. Thanks in advance
MVP
Đối tác giải pháp Vàng
Các lập trình viên được chứng nhận
Tổng Bài đăng:
767
Karma:
10904
Đã tham gia:
06/05/2016
Vị trí:
India
Hi Ceaser, Makes sure you have view file "_ViewImports.cshtml" under views folder. If it not exist than copy from "Presentation > Nop.Web > Views" and paste it. It'll work.
Tổng Bài đăng:
13
Karma:
113
Đã tham gia:
01/07/2009
Vị trí:
Italy
Problem solved doing as you said. Thanks very much !
Tổng Bài đăng:
7
Karma:
35
Đã tham gia:
28/05/2018
Vị trí:
India
can somebody tell that, what exactly is @T() what it does
Tổng Bài đăng:
16
Karma:
80
Đã tham gia:
15/08/2013
Vị trí:
Switzerland
Hi , i have the same problem as cesare.marasco in nopcommerce 4.4 in a plugin in Configure.cshtml "@T doesn't exist in current context" the _ViewImports.cshtm is here : @inherits Nop.Web.Framework.Mvc.Razor.NopRazorPage<TModel> @inject Nop.Services.Common.IGenericAttributeService genericAttributeService @inject IWorkContext workContext @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers @addTagHelper *, Nop.Web.Framework @using System.Text.Encodings.Web @using Microsoft.AspNetCore.Mvc.ViewFeatures @using Microsoft.AspNetCore.Routing @using Microsoft.Extensions.Primitives @using Nop.Core @using Nop.Core.Domain.Common @using Nop.Core.Infrastructure @using Nop.Services.Events @using Nop.Web.Framework @using Nop.Web.Framework.Models @using Nop.Web.Framework.Events @using Nop.Web.Framework.Extensions @using Nop.Web.Framework.Infrastructure @using Nop.Web.Framework.Models.DataTables @using Nop.Web.Framework.Security.Captcha @using Nop.Web.Framework.Security.Honeypot @using Nop.Web.Framework.Themes @using Nop.Web.Framework.UI any ideas?
Tổng Bài đăng:
16
Karma:
80
Đã tham gia:
15/08/2013
Vị trí:
Switzerland
_ViewImports.cshtml was missing in outputdirectory. Now it works. Thanks very much !