Adding Unit Tests fails in Add Business Module recipe

Topics: Web Client Software Factory
May 9, 2007 at 4:23 PM
Edited May 9, 2007 at 4:24 PM
Hello,

I am using WCSF on Microsoft Vista Business Edition and Visual Studio 2005. I can add Business Modules but as soon as I check 'Create project for unit tests' the recipe fails (exception at the end of the message).

Is there a workaround on this issue?

Microsoft.Practices.RecipeFramework.ActionExecutionException: An exception occurred during the binding of reference or execution of recipe CreateModule. Error was: Action UnfoldModuleTestProjectTemplate failed to execute:
The project file 'C:\Users\Administrator\AppData\Local\Temp\nsf35ekc.q4c\Temp\Stock.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:\Users\Administrator\AppData\Local\Temp\nsf35ekc.q4c\Temp\Stock.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.RecipeFramework.Extensions.Actions.Templates.UnfoldTemplateAction.AddProjectTemplate(Project project)
at Microsoft.Practices.RecipeFramework.Extensions.Actions.Templates.UnfoldTemplateAction.InternalExecute()
at Microsoft.Practices.RecipeFramework.Extensions.Actions.Templates.UnfoldTemplateAction.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 9, 2007 at 11:11 PM
The workaround is not to check 'Create project for unit tests'. When you check the box it is expected that you have a version of Visual Studio that can create a Microsoft Test Project.

Regards,

Dave

______________________________

David Hayden
Microsoft MVP C#
Developer
May 10, 2007 at 3:20 AM
Hi,
In order to run the Add Business Module recipe and the Add Foundational Module recipe with the option “Create project for unit tests” 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 10, 2007 at 2:23 PM
Or... read the post below on how to modify the factory source to generate NUnit tests instead. No warranty/guarantees/etc as usual!

http://www.dotnetblogs.co.uk/Default.aspx?tabid=137&mid=550&ctl=ViewEntry&EntryID=318

Hope that helps.

Simon
http://www.dotnetblogs.co.uk/
Jan 9, 2008 at 4:11 PM
This ought to be part of the GP. Your webcasts explicitly calls for NUnit support. Forcing developers into a more expensive IDE is not the greatest way to gain broad support.


simonince wrote:
Or... read the post below on how to modify the factory source to generate NUnit tests instead. No warranty/guarantees/etc as usual!

http://www.dotnetblogs.co.uk/Default.aspx?tabid=137&mid=550&ctl=ViewEntry&EntryID=318

Hope that helps.

Simon
http://www.dotnetblogs.co.uk/