Page 1 of 1

Visual Studio question

Posted: Mon Aug 31, 2015 2:37 am
by AbleMods
Let's say my client has two AbleCommerce sites. I've built a customization in a separate project class library that is necessary in both sites.

No problem, right? Just add that project to each respective solution.

But, what happens to the project DLL when you build the project? In the Project Properties, there's only one build directory you can specify.

Does Visual Studio know this project is referenced in two different sites and update the /bin/ folder DLL for each site automatically? What do other developers do when a single project needs built into multiple .Net applications? Is that when a build server comes into play?

Re: Visual Studio question

Posted: Mon Aug 31, 2015 4:37 am
by mazhar
You can always create a shared folder like the one we have called 'Lib'. All your shared DLLs can go to lib and other projects can reference them from there. This way when ever you build the project it will update new version in shared folder. Finally when you build each website it will take the the updated copy from referenced shared folder.

Re: Visual Studio question

Posted: Mon Aug 31, 2015 5:03 am
by AbleMods
Nice !!!!

See, that's why you guys make the BIG BUCKS !!

Re: Visual Studio question

Posted: Mon Aug 31, 2015 8:53 am
by NC Software
With the project referenced in the solution Visual Studio will build the referenced assembly and automatically put it with the web site (client project) bin folder. All referenced projects/assemblies are built and placed in the client (your web site(s)) /bin folder automatically. If you do a direct reference such as Mazhar suggests you don't get the benefit of "project references" vs. direct file references and can easily end up with something out of date and it's much harder to debug. You can also have one solution with both web site projects and your class library, just set one site as the startup project, you can control your build and compile from the solution build configuration dialog, etc.