Smart Client Software Factory
We are using the SCSF on my current project and I have to say I like the idea but I hate the number of hoops you have to jump through in order to get it to work properly. One problem I recently experienced was with the Add View (with presenter)… recipe.
Add View (with presenter)…
The problem was it was not appearing in the context menu. So I looked in the Guidance Package Manager to see if I could glean any details about what I was doing wrong.
So as you can see the recipe applies to ‘any project referencing CAB libraries and the Infrastructure.Interface library.
SCSF has a solution template for creating SmartClient applications, which I had used and so I did have an Infrastructure.Interface project.
The specific ‘CAB libraries’ that the recipe cares about are:
So…to my project to check my references…
…hmmm, looks like all the references are good? Looks like this is one of those things that ‘should work but doesn’t’.
So, to get to the bottom of this, I had my solution open (VS1) and opened another instance of Visual Studio with the GuidancePackageManager.sln open (VS2). I then did an ‘attach to process’, attaching the process of the other visual studio.
Then find the right place in the GPM solution…here
then right click on a project in VS1, which causes the breakpoint to be hit in VS2.
The Cause of The Problem
Turns out that its happy with the CAB references but has a problem with the Infrastructure.Interface.
Because when the SCSF created the project it (quite correctly I think) created the Infrastructure.Interface project, setting the default namespace to ‘MySolution.Infrastructure.Interface‘ and the assembly name to ‘MySolution.Infrastructure.Interface‘. But this means when it is comparing project references (in the ContainsReference method) if fails because it is looking for a reference to ‘Infrastructure.Interface‘ but finds ‘MyProject.Infrastructure.Interface‘.
To fix it we just went to Project Properties and in ‘Application’ set the Assembly Name back to Infrastructure.Interface. (we don’t expect to have any naming conflicts given the nature of the app).