I ran across an issue with the Smart Client Software Client Factory in Visual Studio 2008 SP1 Today. I tried creating and building the “Hello World Application” as described in the “Getting Started” document. After hitting F5 to try and run the project, I was presented with the following error message:
“Assembly file C:\Data\Projects\Smart Client Software Factory\HelloWorldApplication\bin\Debug\Infrastructure.Layout.dll was not found.”
I checked the debug folder and noticed that the output of the Infrastructure.Layout project (in the same solution) was named “HelloWorldApplication.Infrastructure.Layout.dll” instead. Well, that explained part of what was going on.
I then tried to figure out how the smart client application knew which assembly files to load, and came across the ProfileCatalog.xml file in the Shell project. This file contained the following section:
<Section Name="Layout"> <Modules> <ModuleInfo AssemblyFile="Infrastructure.Layout.dll" /> </Modules> </Section>
So this is what was causing the mismatch between the files in the debug folder and the files the application was trying to find. I also noticed on the Infrastructure.Layout projects Project Properties – Application tab, that the name of the assembly was prefixed with the name of the solution. Please note that I described the situation for the Infrastructure.Layout assembly only, but ALL of the Hello World Application’s assemblies are prefixed with the solution name.
Of course you can adjust the ProfileCatalog.xml file and make the names of the assemblies match those of the actual assembly names. Or you could adjust the settings on the Project Properties – Application tab for all of the projects in the solution. However, there is an easier way to fix this.
The problem is in the guidance package’s source code and there is a knowledge base article that explains how to fix this. The same page also mentions another problem with the SCSF and VS2008 SP1, which concerns the absence of the “Add View” functionality. Mariano Converti has already created a fixed version of the guidance package that is available for download.
If you found this post helpful, please click below to “Kick” it: