none
sharing web layer between 2 seperate projects RRS feed

  • Question

  • hi,

        i have developed 2 seperate projects and both projects are checked in the VSTS seperately.  i am using n tier architecture in my both projects. now i have to integrate both projects. for integration i have created one blank solution and given reference to all the solutions in the both projects except web layer so that both projects can work out seperately and if i have to take integrated module i can refer 3rd newly created solution. Now issue arises how to refer the web layer. i have given refernce to web layer of 1st project but i am not able to indentify how to refer web layer of the 2nd project in the newly created solution so that both projects can work in the integrated manner. currently i have just coped web layer from the 2nd project and pasted in the 1st project. so as i am taking latest of 3rd integrated solution i am getting whole integrated solution. But if i makes any changes in the 2nd project i have to copy this aspx page form 2nd project to the 1st project. is there any way to that change will be reflected in the new solution without copying aspx page?

    Wednesday, October 11, 2006 1:22 PM

All replies

  • There are two ways of doing this. Make references in your web project to both compilied project assemblies so that
     you have access to their methods, or you can add both projects into a solution that contains your web project
     and then with using statements, reference each projects namespace that you would like to have access to. Your Visual Studio solution explorer should look like below.
     
     solution file
         web project
            references
                project1.dll
                project2.dll
         
            .aspx
            .aspx
            .aspx
            .aspx
           
                or per page.
            aspx.cs codebehind
                using project1.namespace
                using project2.namespace
         
         project 1
            .cs file
            .cs file
            .cs file
            .cs file

         project 2
            .cs file
            .cs file
            .cs file
            .cs file
    Thursday, December 20, 2007 8:31 PM