How Do Business Module Developers Use SCSF Guidance Package?

Topics: CAB & Smart Client Software Factory
Apr 30, 2007 at 10:07 PM
We have customized the "Guidance Package" for SCSF using Guidance Automation Toolkit. We are now ready to roll out the guidance package to business module developers.

How do we configure the guidance package so that when module developers select "New Project | Guidance Packages | Smart Client Software Factory", they do not see any of the infrastructure related projects in Visual Studio 2005 Solution Explorer?

For example, module developers are only interested in creating modules. They would right click on the solution and choose "Smart Client Factory | Add Business Module". They would then test to see if the module works by running the "Shell" project. They should not be modifying any of the Infrastructure related projects (Infrastructure.Interface, Infrastructure.Library or Infrastructure. Module). How do we do this?

Any suggestions would be greatly appreciated!
May 1, 2007 at 6:56 AM
Why don't you set up a solution for the business module developers referencing only the infrastructure binaries and not the projects? I guess you could have several teams working on different business modules without knowing about the other business modules as well. If you create a lot of modules or have limited access to the development environment of the module developers you could create a solution template that will create a blank solution wich references all the CAB, SCSF and your infrastructure libraries and have the module developers work with that. From my experience most of the time is spent developing the module and not creating new modules. If that's the case I would probably have a framework developer set up a new solution and add that to source control. The module developers could then retrieve this solution and continue from there.
If you for some reason want everyone to see the same solution with different access rights to the source I guess you could handle that at the source control level.
May 1, 2007 at 5:09 PM
Thanks for your reply! The suggestion you gave is exactly what we did initially. I exported the "Shell" project as a template using Visual Studio 2005. The shell has binary references to "Infrastructure. Layout", "Infrastructure.Interface" and "Infrastructure.Library".

I then created a new project in VS2005 using the exported "Shell" template. I enabled the Smart Client Guidance package. When I tried to add a new business module using the guidance package to the new solution, I immediately got an error:

"An exception occurred during the binding of reference or execution of recipe CreateBusinessModule.CS. Error was: An error happened while calling the value provider or evaluating the default value of argument ShellProject..."

I'm thinking that the guidance package has a nested folder of the structure "Source/Infrastructure". My solution has no nested folders. So I modified the guidance package to remove all nested folders so that the project does not have a hierarchy. I still an error after doing this.

Have you tried doing what you suggested? I think you will run into issues too. If you experience the same thing let me know how you got around the errors.
Jan 15, 2008 at 9:23 AM
How did you get on agedwards as I'm about to start packaging the thing up for developers (so they can just create business modules) and it doesn't look like a simple task.
Jan 31, 2008 at 2:29 AM
yes, actually I am also getting the same error. "An exception occurred during the binding of reference or execution of recipe CreateBusinessModule.CS. Error was: An error happened while calling the value provider or evaluating the default value of argument ShellProject..."
Any one has any idea about this? Thanks a lot!!!
Jan 31, 2008 at 4:49 AM
Edited Jan 31, 2008 at 5:01 AM

lizhun wrote:
yes, actually I am also getting the same error. "An exception occurred during the binding of reference or execution of recipe CreateBusinessModule.CS. Error was: An error happened while calling the value provider or evaluating the default value of argument ShellProject..."
Any one has any idea about this? Thanks a lot!!!


In light of all the interest in this requirement - and the fact that I will shortly be needing it myself :) I found a way to accomplish this and it appears to be "very" dependent on the order in which things are done. Once completed I was able to use the guidance package to create modules. Please bear in mind that there was a head-banging session involved so I may have missed a step - if so we'll need to highlight it for others to benefit from.

Important note: Since I use a MDI Shell I only have the Infrastructure.Interface and Infrastructure.Library in my solution (the others were removed earlier). For those that have the other infrastructure projects I would treat them as I do the library in the steps that follow.

BACKUP, BACKUP, BACKUP

1. Point the Infrastructure.interface project Properties | Build | Output path to the solutions BIN folder. This is very important as I was stuck in a limbo of unhappiness until I figured this step out - before disconnecting the project it has to have a current compiled version for us to set a reference to (using the existing one didn't work).

1a. Build the Solution to ensure everything is still happy.

2. To eliminate the above noted error reported by lizhun (which seems to effectively blow things up) you have to remove all references from the Shell application for infrastructure and CAB; if you remove the infrastructure projects first it'll generate the above error.

3. Re-add the references removed in step 2 above to the assemblies in the projects BIN folder.

3a. Build the project to ensure everything is still happy.

4. Accomplish step 3 and 3a for each project in the solution - it is important to remove the the CAB references from the LIB folder and point them to the assemblies in the BIN folder; if you don't you will be notified that you require a reference to an assembly (probably infrastructure) when there is in fact a reference.

This is the part that makes it work...

5. When you are done, and all of your modules compile, ensure the program still runs. Up to this point we've made harmless changes - now CHANGE THE Infrastructure.interface project Properties | Build | Output path to the solutions BIN\DEBUG folder. This effectively leaves the functional assembly in BIN and will prevent the changes we are about to make from corrupting our build.

6. Remove the Infrastructure.Library project from the solution - since nothing has a reference to it this shouldn't cause issues unless you forgot a reference.

BACKUP, BACKUP, BACKUP - this project from this point forward will be a stub project for developer use only

7. DELETE all files and folders in Infrastructure.Interfaces project with the EXCEPTION of Constants.

7a. Compile the solution to ensure it still builds and runs

8. Add a new module using the Guidance package

Developers will have to ...

1. Remove the Infrastructure.Interface reference (library wasn't inserted by the recipe)

2. Add a reference the the Infrastructure.Interface and Interface.Library from the BIN folder

3. Remove the CAB references

4. Add references of the removed CAB assemblies to the assemblies in the BIN folder

5. Update the new Module Project | Properties | Output path to point to the solutions BIN folder.

The application should compile and run.
Feb 1, 2008 at 8:05 AM
Thanks to Bill's help I've managed to get a step further

http://www.codeplex.com/smartclient/Thread/View.aspx?ThreadId=20411 but let's keep the discussion on this Thread (I should have posted my findings here really)