0

I would like to know how can I integrate multiple ASP.NET Core MVC applications into one.

Let me explain my problem.

I have the project MainProject that would be used in multiple applications. This project contains:

  • Typescript,
  • CSS
  • image
  • Controllers/Models/Views

I have another project ProjectA that would be used just in some applications. This project would contain as well as the MainProject those type of files.

In my FinalProject, I want to integrate these files of these two projects.

I need to be able to access to all controllers, Typescript, CSS, images, etc. from my FinalProject.

How can I do that?

Is there any way to add some kind of reference to these type of files or export theme in any way ?

I have created these projects:

  • ASP.NET Core MVC MainProject
  • ASP.NET Core MVC ProjectA
  • ASP.NET Core MVC FinalProject

In my FinalProject I have added a project reference to MainProject and ProjectA.

This way, I can access all controllers from these two projects, but I can't access any Typescript, CSS or image files.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
CZSDev
  • 1
  • 1
  • You could share controllers, views, Razor Pages and more with Application Parts,the document related :https://learn.microsoft.com/en-us/aspnet/core/mvc/advanced/app-parts?view=aspnetcore-7.0 – Ruikai Feng Aug 29 '23 at 01:58
  • here's an issue related with sharing css/js files between projects:https://stackoverflow.com/questions/36596864/how-to-share-css-and-js-files-of-one-project-in-another-using-visual-studio – Ruikai Feng Aug 29 '23 at 06:36
  • Thanks for the answer @Ruikai Feng. Create a Nuget package that includes the common files looks interesting. I'll try this way. – CZSDev Aug 30 '23 at 14:30

0 Answers0