Installation failed because both VB.NET and C# need to be registered on your machine

The Smart Client Software Factory includes guidance recipes to perform common tasks in developing smart client applications.
These recipes include templates to generate projects both in C# and VB languages.

One requisite to install this factory is having Visual Studio 2005 installed in the target machine. If either Visual Basic .Net or C# is not installed with Visual Studio, the factory installer fails when trying to register the Visual Basic or C# version of the recipe templates.

If this happens, the easiest work around for this problem is to install the language that is not on your machine - either VB.NET or C#. Otherwise, you can:

Use the Installation Patch to modify the SCSF guidance package

Register the Guidance Package

Download the Smart Client Software Factory installer.
Execute the installer to install the SCSF package and unselect the Automated Guidance installation.
This will install only the documentation and the source code installer.

CustomSetup.png

Execute SmartClientFactorySourceInstall.msi (located by default at C:\Program Files\Microsoft Smart Client Factory\Source Code Installer) to install the source code for the guidance package.

SourceCodeSetup.png

Navigate to the Working Copy recently installed.
Apply the patch by extracting the content of the SCSF-GP-ExcludeVB-Patch.zip file to the SCSF Source directory. By applying the patch some files will need to be overwritten, therefore a confirmation message will be shown. Click Yes to overwrite the files.

SourceCodeOverwrite.png

Open the GuidancePackage solution.
Enable Guidance Package Development using the Guidance Package Manager from the Tools menu.

GuidancePackageManager.png

Register the Guidance Package by right clicking on the SmartClientFactoryPackage project and selecting “Register Guidance Package”.

Copy the Application Blocks

After following the previous steps, the Guidance Package will be installed. However, to be able to create a Smart Client Solution the Application Blocks assemblies need to be added to the Lib folder where the Enterprise Library assemblies are located:

CreateSolution.png

The signed version of the missing assemblies can be found in the Signed Libraries.zip file. Extract the content of the Signed Libraries.zip file to the Lib folder located at the source code install path.

Use manaual approach to modify the SCSF guidance package

Register the Guidance Package

Download the Smart Client Software Factory installer.
Execute the installer to install the SCSF package and unselect the Automated Guidance installation.
This will only install the documentation and the source code installer.

drawing1.png

Execute SmartClientFactorySourceInstall.msi (located by default at C:\Program Files\Microsoft Smart Client Factory\Source Code Installer) to install the source code for the guidance package.

drawing2.png

Navigate to the Working Copy recently installed.
Open the GuidancePackage solution.
Open the SmartClientDevelopment.xml file inside the SmartClientFactoryPackage project, and

drawing3.png

Open the Bindings.xml file located under the Recipes folder, and comment out all the actions that create references for VB templates.

drawing4.png

Exclude* all the VSTemplates* for Visual Basic from the Guidance Package. To do that, select the following folders from the SmartClientFactoryPackage project in the Solution Explorer:
Templates/Items/Library.VB
Templates/Items/Shell.Basic.VB
Templates/Items/Shell.LayoutModule.VB
Templates/Items/View.VB
Templates/Projects/Module.Business.Tests.VB
Templates/Projects/Module.Business.VB
Templates/Projects/Module.Interface.VB
Templates/Projects/Module.Tests.VB
Templates/Projects/Module.VB
Templates/Solutions/Projects/Infrastructure.VB
Templates/Solutions/Projects/Library.VB
Templates/Solutions/Projects/Module.VB
Templates/Solutions/Projects/Shell.Basic.VB
Templates/Solutions/Projects/Shell.Extended.VB
Templates/Solutions/Projects/Shell.LayoutModule.VB

Right click on the selected folders and select “Exclude from project”.

Exclude the following file from the SmartClientFactoryPackage project:
Templates/Solutions/Projects/SCSFSolutionVB.vstemplate

After following these steps, this is how the Solution Explorer should look like:

drawing5.png

Enable Guidance Package Development using the Guidance Package Manager from the Tools menu.

drawing6.png

Register the Guidance Package by right clicking on the SmartClientFactoryPackage project and selecting “Register Guidance Package”.

Build the Application Blocks

After following the previous steps, the Guidance Package will be installed. However, to be able to create a Smart Client Solution the following assemblies need to be compiled and added to the Lib folder where the Enterprise Library assemblies are located:

Microsoft.Practices.CompositeUI.dll
Microsoft.Practices.CompositeUI.WinForms.dll
Microsoft.Practices.CompositeUI.WPF.dll
Microsoft.Practices.SmartClient.ConnectionMonitor.dll
Microsoft.Practices.SmartClient.DisconnectedAgent.dll
Microsoft.Practices.SmartClient.EndpointCatalog.dll
Microsoft.Practices.SmartClient.EnterpriseLibrary.dll

drawing7.png

To generate the missing assemblies, go to the folder where the Smart Client Software Factory Source Code is located.

Open and build the following solutions:
CompositeUI-WPFExtensions.sln
SmartClient.Offline.sln

Do a search for the assemblies previously listed, and copy them to the Lib folder located at the source code install path.

Last edited Apr 21, 2008 at 9:30 PM by mconverti, version 20

Comments

maximum2000 Oct 28, 2007 at 10:07 PM 
I second that, way too much work and it doesn't work for me :(.

peter2030 Sep 3, 2007 at 11:10 AM 
1. If using GAX July 2007 CTP, have to set 'Specific Version' to false for 'missing' references in Smart Client Factory Package and Smart Client Factory Package Installer projects in Solution Explorer.
2. This piece:
'Register the Guidance Package by right clicking on the SmartClientFactoryPackage project and selecting “Register Guidance Package'
is done in Solution Explorer.
3. There is some missing text after 'Open the SmartClientDevelopment.xml file inside the SmartClientFactoryPackage project, and '. It should say comment out in the XML ( <!-- starts a comment in XML ).
4. Can we press for a fix for this in the main installer - I work for a large UK company and VB is never going to be installed. This is a lot of work to expect of someone, on top of the CAB / SCSF learning curve!