0

I have a solution that contains Web, Admin, couple of class and data access projects. Main project is Web. I am using Admin project as area under Web. Admin project's physical folder is under Web/Administration folder. But when i try to publish Web project, it publishes Web project and add other data access or class projects as dlls to bin folder, but neither Admin project being published nor it's dll being added to bin folder.

Solution
--- Data (Library)
--- Service (Library)
--- Admin (Area) *MVC Web*
--- Web (Main) *MVC Web*
--- Framework (Library)

What am i missing here?

PS: Please tell me if you need more info to help. I am really desperate here.

YSFKBDY
  • 735
  • 1
  • 12
  • 38

1 Answers1

0

Web is a separate web application, so if you want to publish that one too, you'll have to publish it separately. The only way you could include it as a .dll in the bin folder of Web is if you'd include it as a reference to the Web project. But then it would just be used as a class library, not as a separate web application.

Mason
  • 1,007
  • 1
  • 13
  • 31
  • Admin project referenced to Web and i am using it as area under Web project. Web is my main project and i want that when i publish Web project, also admin project needs to be published under it's physical folder (Web/Administration) under Web project. – YSFKBDY Jul 26 '18 at 07:45
  • If you want it to be published under its physical location, you'll have to import it as a folder in the Web project and make it "always copy" upon built. Then it'll be exported to the /bin folder at each build. – Mason Jul 26 '18 at 07:49
  • But it is a seperate project. How it works if i also import it's physical folder under Web project? – YSFKBDY Jul 26 '18 at 07:51
  • In [this tutorial](https://www.codeproject.com/Articles/1139669/How-to-Create-an-Area-in-ASP-NET-MVC-Application) areas are added in the same project as the root web application. So are you sure you area has to be in a seperate project? But maybe [this solution](https://stackoverflow.com/questions/25900246/how-to-publish-an-asp-net-mvc-4-application-with-areas) might help you. – Mason Jul 26 '18 at 08:07