SCSF May 2007 - Can not create test project

Topics: CAB & Smart Client Software Factory
May 21, 2007 at 8:41 AM
Edited May 21, 2007 at 8:42 AM
I tried to add a business module with unit test project for the module.
The steps followed and the resultant error are given below. Please let me know how to successfully complete the unit test project creation for the module.
-------------------------------------------------------------------------

Add Business Module

Entered Module name as "LoginModule"
In Options : checked : Create an interface library for this module &
Create a unit test project for this module

and clicked on Finish button

The "Recipe Framework Error" has occured: The project file "C:\Documents and Settings\Administrator\Local Settings\Temp\taluffxk.el2\Temp\LoginModule.Tests.csproj" can not be opened:

The contents of details window is below:
Microsoft.Practices.RecipeFramework.ActionExecutionException: An exception occurred during the binding of reference or execution of recipe CreateBusinessModuleCS. Error was: Action UnfoldModuleProjects failed to execute:
The project file 'C:\Documents and Settings\Administrator\Local Settings\Temp\taluffxk.el1\Temp\LoginModule.Tests.csproj' cannot be opened.

The project type is not supported by this installation..
You can remove the reference to this recipe through the Guidance Package Manager. ---> System.ArgumentException: The project file 'C:\Documents and Settings\Administrator\Local Settings\Temp\taluffxk.el1\Temp\LoginModule.Tests.csproj' cannot be opened.

The project type is not supported by this installation.
at EnvDTE.SolutionClass.AddFromTemplate(String FileName, String Destination, String ProjectName, Boolean Exclusive)
at Microsoft.VisualStudio.TemplateWizard.Wizard.Execute(Object application, Int32 hwndOwner, Object[]& ContextParams, Object[]& CustomParams, wizardResult& retval)
at EnvDTE80.SolutionFolder.AddFromTemplate(String FileName, String Destination, String ProjectName)
at Microsoft.Practices.SmartClientFactory.Actions.UnfoldModuleProjectsAction.UnfoldTemplateOnTarget(Object target, String template, String destination, String name)
at Microsoft.Practices.SmartClientFactory.Actions.UnfoldModuleProjectsAction.Execute()
at Microsoft.Practices.RecipeFramework.Recipe.Microsoft.Practices.RecipeFramework.Services.IActionExecutionService.Execute(String actionName, Dictionary`2 inputValues)
at Microsoft.Practices.RecipeFramework.Recipe.Microsoft.Practices.RecipeFramework.Services.IActionExecutionService.Execute(String actionName)
at Microsoft.Practices.RecipeFramework.Extensions.Coordinators.ConditionalCoordinator.Run(Dictionary`2 declaredActions, XmlElement coordinationData)
at Microsoft.Practices.RecipeFramework.Recipe.ExecuteActions(IDictionaryService readOnlyArguments, IDictionaryService arguments, ITypeResolutionService resolution)
--- End of inner exception stack trace ---
at Microsoft.Practices.RecipeFramework.Recipe.UndoExecutedActionsAndRethrow(Exception ex)
at Microsoft.Practices.RecipeFramework.Recipe.ExecuteActions(IDictionaryService readOnlyArguments, IDictionaryService arguments, ITypeResolutionService resolution)
at Microsoft.Practices.RecipeFramework.Recipe.Execute(Boolean allowSuspend)
at Microsoft.Practices.RecipeFramework.GuidancePackage.Execute(String recipe, IAssetReference reference, IDictionary arguments)
at Microsoft.Practices.RecipeFramework.GuidancePackage.ExecuteFromTemplate(String recipe, IDictionary arguments)
at Microsoft.Practices.RecipeFramework.VisualStudio.Templates.UnfoldTemplate.ExecuteRecipe(Boolean executeActions)
at Microsoft.Practices.RecipeFramework.VisualStudio.Templates.UnfoldTemplate.RunFinished()

----------------------------------
May 21, 2007 at 2:28 PM
Hi,
In order to run the Add Business Module recipe with the option “Create a unit test project for this module” checked you have to have a version of Visual Studio that supports Team System unit tests.

Ezequiel Jadib
http://staff.southworks.net/blogs/ejadib
May 22, 2007 at 10:11 AM
Thanks Ezequiel Jadib,

Regards
Smsrku
Jun 12, 2007 at 12:34 AM
Edited Jun 12, 2007 at 5:42 PM
Is there a way to use the feature and use Nunit console outside of Team System ? Funny because WCSF added this ability. http://www.codeplex.com/websf/Wiki/View.aspx?title=NUnit%20Tests%20for%20the%20Web%20Client%20Software%20Factory&referringTitle=Home
Jun 13, 2007 at 3:03 AM
That link on the WCSF forum does not add nUnit support to the guidance package. It is just a conversion of the VSTS tests to NUnit tests for the RI, Blocks, and Quickstarts.

And, with the the next version of Visual Studio Pro supporting VSTS's unit testing framework (see my blog for links to the official info), it is doubtful that we will add nUnit support to the guidance package.

Of course, you could customize the GP yourself to support nUnit. An addition like that will probably be very welcome on the SCSFContrib project.
Nov 6, 2007 at 3:52 PM
I have the same problem. I am unable to generate test projects because I only have the professional edition of Visual Studio 2005.

However, me and my boys would consider contributing to the SCSFContrib project.

Please could someone post or point us in the direction of an example solution that includes a test project, so that we can assess how difficult this might be.
Dec 11, 2007 at 10:41 AM
Hi,
I have a similar problem. I'm using VS2008 Professional Beta2 and this version does support unit testing, yet it wont allow me to generate the test projects.
Am I doing something wrong?