Я использую VC 2017 для Mac, ксамарная версия VS не имеет Mapper Auto Area. Я вручную добавил папку области и настроил маршрутизацию должным образом, когда я добавляю ссылку на мою основную страницу CSHTML, она бросает ошибку 500 и заявляю. < /P>
System.InvalidOperationException
The view 'Billing' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/BillingMain/Billing.cshtml
~/Views/BillingMain/Billing.vbhtml
~/Views/Shared/Billing.cshtml
~/Views/Shared/Billing.vbhtml
~/Views/BillingMain/Billing.aspx
~/Views/BillingMain/Billing.ascx
~/Views/Shared/Billing.aspx
~/Views/Shared/Billing.ascx
Вместо этого он должен искать в ~/chies/billing/views/billingmaincontroller.cshtml
Я пробовал все, чтобы это было на работе, но только продолжайте застревать.
Project-
AppStart-
Areas-
Billing-
Invoice-
Controllers-
Scripts-
Views-
Global.asax
< /code>
Я пока тестирую только область счетов, ниже приведена остальная часть моего кода. < /p>
routeconfig < /p>
using System.Web.Mvc;
using System.Web.Routing;
namespace WORK_GODDAMN
{
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
//AreaRegistration.RegisterAllAreas();
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
//,namespaces: new string[] { "WORK_GODDAMN.Areas.Controllers" }
);
}
}
< /code>
} < /p>
billingarearegistration.cs
using System;
using System.Web.Mvc;
namespace WORK_GODDAMN.Areas.Billing
{
public class BillingAreaRegistration : AreaRegistration
{
public override string AreaName
{
get
{
return "Billing";
}
}
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRoute(
"Billing_Default",
"Billing/{controller}/{action}/{id}",
new {controller = "BillingMain", action = "Index", id = UrlParameter.Optional }
, namespaces: new string[] { "WORK_GODDAMN.Areas.Billing.Controllers" }
);
}
}
}
< /code>
global.asax
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using System.Web.Http;
namespace WORK_GODDAMN
{
public class Global : HttpApplication
{
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
RouteConfig.RegisterRoutes(RouteTable.Routes);
GlobalConfiguration.Configure(WebApiConfig.Register);
}
}
}
< /code>
main _layout.cshtml Это где ссылка на действие перенаправляет и считаю, что я могу сделать что -то не так, здесь, но на данный момент я понятия не имею, что может вызвать проблему. < /p>
@using System.Web.Optimization
@ViewBag.Title
@Scripts.Render("~/Scripts/modernizr.js")
{Demo}- Pluggable Modules
@Html.ActionLink("Home","Index","Home", new {Area=""}, null)
@Html.ActionLink("Invoice","Index","InvoiceMain", new {Area=""}, null)
@Html.ActionLink("Billing","Index","BillingMain", new {Area=""}, null)
@RenderBody()
@Scripts.Render("~/Scripts/jquery.js")
@RenderSection("Scripts", required: false)
Я использую VC 2017 для Mac, ксамарная версия VS не имеет Mapper Auto Area. Я вручную добавил папку области и настроил маршрутизацию должным образом, когда я добавляю ссылку на мою основную страницу CSHTML, она бросает ошибку 500 и заявляю. < /P>
[code]System.InvalidOperationException The view 'Billing' or its master was not found or no view engine supports the searched locations. The following locations were searched: ~/Views/BillingMain/Billing.cshtml ~/Views/BillingMain/Billing.vbhtml ~/Views/Shared/Billing.cshtml ~/Views/Shared/Billing.vbhtml ~/Views/BillingMain/Billing.aspx ~/Views/BillingMain/Billing.ascx ~/Views/Shared/Billing.aspx ~/Views/Shared/Billing.ascx [/code]
Вместо этого он должен искать в ~/chies/billing/views/billingmaincontroller.cshtml
Я пробовал все, чтобы это было на работе, но только продолжайте застревать.[code]Project- AppStart- Areas- Billing- Invoice- Controllers- Scripts- Views- Global.asax < /code>
Я пока тестирую только область счетов, ниже приведена остальная часть моего кода. < /p>
routeconfig < /p>
using System.Web.Mvc; using System.Web.Routing;
namespace WORK_GODDAMN { public class RouteConfig { public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); //AreaRegistration.RegisterAllAreas(); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } //,namespaces: new string[] { "WORK_GODDAMN.Areas.Controllers" } );
} } < /code>
} < /p>
billingarearegistration.cs
using System; using System.Web.Mvc;
namespace WORK_GODDAMN.Areas.Billing {
public class BillingAreaRegistration : AreaRegistration { public override string AreaName { get { return "Billing"; } }
public override void RegisterArea(AreaRegistrationContext context) { context.MapRoute( "Billing_Default", "Billing/{controller}/{action}/{id}", new {controller = "BillingMain", action = "Index", id = UrlParameter.Optional } , namespaces: new string[] { "WORK_GODDAMN.Areas.Billing.Controllers" } );
} }
} < /code>
global.asax
using System.Web; using System.Web.Mvc; using System.Web.Routing; using System.Web.Http;
namespace WORK_GODDAMN { public class Global : HttpApplication { protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RouteConfig.RegisterRoutes(RouteTable.Routes); GlobalConfiguration.Configure(WebApiConfig.Register); } } } < /code>
main _layout.cshtml Это где ссылка на действие перенаправляет и считаю, что я могу сделать что -то не так, здесь, но на данный момент я понятия не имею, что может вызвать проблему. < /p>
@Html.ActionLink("Home","Index","Home", new {Area=""}, null) @Html.ActionLink("Invoice","Index","InvoiceMain", new {Area=""}, null) @Html.ActionLink("Billing","Index","BillingMain", new {Area=""}, null)
Я использую VC 2017 для Mac, ксамарная версия VS не имеет Mapper Auto Area. Я вручную добавил папку области и настроил маршрутизацию должным образом, когда я добавляю ссылку на мою основную страницу CSHTML, она бросает ошибку 500 и заявляю....
Я создал базовое приложение для Android с помощью .NET MAUI и сейчас пытаюсь реализовать то же самое с Avalonia (с помощью набора инструментов сообщества MVVM). В документации MAUI четко показано, как реализовать внедрение зависимостей. Регистрация...
Я запускаю Дженкинс на моей локальной машине из порта 8080, он подключен к моему GitHub через плагин, и я подтвердил, что Дженкинс может видеть мой Jenkinsfile на моем репо. В моем Jenkinsfile есть шаг, чтобы запустить функцию огурца