Pregunta

I have a Visual Studio ASP.Net Web Solution. On our live website, IIS is used to differentiate several different applications within this single solution. It works without a problem there, but when I open the entire solution up with visual studio, some parts cannot be found.

See example structure below... If I am working on something within "Application 2", it does not recognize any code within that "App_Code" folder because it is looking at my root "App_Code" folder instead. My question: Is there a way to manage multiple web applications under one solution in Visual Studio?

Example structure:

Root - Main Application
  App_Code
  App_Data
  Folder 1
  Folder 2
  Folder 3
  web.config
  Application 2
     App_Code
     App_Data
     Folder Inside
     Another folder
     web.config
  Application 3
     App_Code
     App_Data
     Folder 1
     Folder 2
     web.config
¿Fue útil?

Solución

Each VS solution can have multiple projects, so... you can just add each Application as a Project in your solution.

One way to do it would be:

  1. Create a new BLANK/EMPTY solution
  2. Right click on the solution name and select "Add > Existing Website" and select your ROOT folder.
  3. Repeat step 2 but this time select the folder "Application 2"... do the same for all projects.

At the end you will end up with something like:

- SOLUTION
+- Root
+- Application 1
+- Application 2

Hope it helps.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top