如何部署asp.net mvc的具有多领域应用4 [英] How to Deploy asp.net mvc 4 application having multiple Areas

查看:89
本文介绍了如何部署asp.net mvc的具有多领域应用4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我也跟着<一个href=\"http://geekswithblogs.net/cokobware/archive/2013/01/15/asp.net-mvc-4-pluggable-application-modules.aspx\">this文章使可插拔asp.net mvc4的一个应用

I followed this article to make the pluggable asp.net mvc4 applicaton

不过,虽然部署应用程序面临的问题。在我的解决方案的 MainProj 的主要项目中,所有其他项目都在该地区的文件夹中。每个项目都有它的模型,视图和控制器。我已经在 MainProj 给所有的子项目(区文件夹中的项目)的引用。现在尝试部署时的 MainProj ,其唯一的出版其观点的主要项目(在这种情况下MainProj),在该地区的文件夹中的项目未部署(例如:车,CRM)。即使我添加了项目入区的主要项目(MainProj)引用(例如CRM),只能在区域(如CRM)的项目DDL得到部署在bin文件夹,在地区没有意见项目(CRM)得到部署。怎么回事错了。

But facing problem while deploying the application. In my solution MainProj is the main project, where as all the other projects are in the area folder. Each of the project have its model, view and controller. I have given references of all the sub projects (projects in area folder) in the MainProj. Now when trying to deploy MainProj, Its only publishing the main project with its views (in this case MainProj), the projects in the area folder are not deploying (ex: Cart, CRM). Even if I add references of the projects in area (ex CRM) in the main projects(MainProj), only the ddl of the projects in area(ex CRM) get deployed in bin folder, no views of the project in areas(CRM) getting deployed. Whats going wrong.

下面是溶液的结构:

下面是我原来的文件夹结构。

Here is my original folder structure.

然而,当我在Visual Studio中调试模式下运行我的项目,应用程序运行完全正常。于是我点击系统托盘中的IIS前preSS图标在屏幕下方,并指出,Visual Studio是托管每个项目不同的站点。

However when I run my project in debug mode within visual studio, the app is running perfectly fine. So I clicked on the iis express icon in the system tray at bottom of screen and observed that visual studio is hosting different sites for each project.

有点类似的答案找到<一href=\"http://stackoverflow.com/questions/12911006/asp-net-mvc-4-areas-in-separate-projects-not-working-view-not-found\">here但对我来说不工作。
请让我知道我丢失或做错了。什么是部署这样的应用的正确方法。
先谢谢了。

Somewhat similar answer found here but not working in my case. Please let me know what I am missing or doing wrong. What is the correct way to deploy such application. Thanks in advance.

推荐答案

终于解决了问题。
该解决方案进入MainProj内的所有项目中添加引用。
那么首先部署了主体工程( MainProj )中的发布文件夹中。
因此,目录将成为如下:

Finally solved the issue. Added references of all the projects within the solution into the MainProj. Then first deployed the main project (MainProj) in publish folder. So the directory becomes as follows:


  • 发布

    • MainProj

    然后,手工创建的文件夹在发布文件夹

    Then manually created folder "Areas" In publish folder


    • 发布

      • MainProj

      • 领域

      然后手动创建的文件夹内该地区的每一个项目的地区文件夹:

      Then manually created folder for each project in the area within "Areas" folder:


      • 发布

        • MainProj

        • 领域


          • CRM

          • ...

          • ...

          • 管理

          • 客户

          • 店面

          最后手动部署(出版)各子项目的相应文件夹逐个内(区域内的项目)。防爆。 CRM部署在CRM文件夹中。

          Finally manually deployed (published) each sub project (projects within area) within their respective folders one by one. Ex. CRM is deployed in CRM folder.

          这就是它....
          我的应用程序工作准确精细。

          Thats it.... My app is working exactly fine.

          创建发布配置为每个项目,现在我可以在任何时候刚刚部署任何项目的各自位置,使每个开发人员可以在任何一个项目中独立工作,他们的项目(模块)部署到发布环境,以指定位置没有任何依赖性。

          Created publish profile for each project, now I can just deploy any of the project to their respective location at any time, enabling each developer to work independently on any individual project and deploy their project (module) to the publish environment to specified location without any dependency.

          这篇关于如何部署asp.net mvc的具有多领域应用4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆