WAP Guidance Packager Error: Microsoft.Practices.RecipeFramework.ActionExecutionException

Topics: Web Client Software Factory
Mar 27, 2007 at 5:07 PM
I don't seem to have much luck with the new WAP Guidance Package. With the great help from Julián, I was able to resolve the trust issue mentioned here:

Error Running WAP Guidanace Package - Not Trusted Location

but now I have a Recipe Error during solution creation:

Microsoft.Practices.RecipeFramework.ActionExecutionException: An exception occurred during the binding of reference or execution of recipe CreateWebClientFactorySolutionWAP. Error was: Action AddCompositeWebAssemblyReferencesToWeb failed to execute:
A reference to the component 'Microsoft.Practices.ObjectBuilder' already exists in the project.. 
You can remove the reference to this recipe through the Guidance Package Manager. ---> System.Runtime.InteropServices.COMException (0x8004D745): A reference to the component 'Microsoft.Practices.ObjectBuilder' already exists in the project.
   at VSLangProj.References.Add(String bstrPath)
   at Microsoft.Practices.RecipeFramework.Extensions.Actions.VisualStudio.AddAssembliesReferenceAction.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()
	---> Microsoft.Practices.RecipeFramework.UndoActionException: Action CreateLibraryDirectory failed to perform undo operation:
The method or operation is not implemented. ---> System.Exception: The method or operation is not implemented.
   at Microsoft.Practices.RecipeFramework.Extensions.Actions.OS.CreateDirectoryAction.Undo()
   at Microsoft.Practices.RecipeFramework.Recipe.UndoExecutedActionsAndRethrow(Exception ex)
   --- End of inner exception stack trace ---

Is there a work around for this one? I followed the installation instructions to the letter so I don't think these are installation issues.

Regards,

Dave

_________________________

David Hayden
Microsoft MVP C#
Coordinator
Mar 27, 2007 at 6:06 PM
Hi David,
The Guidance Package is currently adding the references to ObjectBuilder, EntLib and CWAB in two places: in the web application project template file ( %WCSFSource%\GP\WebClientFactoryWAPSupport\WebClientFactoryPackage\Templates\Solutions\Projects\WebProject\WebUI.csproj ) and in the Create Solution recipe.
This didn't seem to be a problem in most configurations, but I guess not in your case. We will be fixing this issue soon in the zip file, but this is how you should fix it:
Open the file (with a text editor): %WCSFSource%\GP\WebClientFactoryWAPSupport\WebClientFactoryPackage\Templates\Solutions\Projects\WebProject\WebUI.csproj

Remove the following block:
    <Reference Include="Microsoft.Practices.CompositeWeb, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
    </Reference>
    <Reference Include="Microsoft.Practices.CompositeWeb.EnterpriseLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
    </Reference>
    <Reference Include="Microsoft.Practices.EnterpriseLibrary.Common, Version=2.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
    </Reference>    
    <Reference Include="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=2.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
    </Reference>
    <Reference Include="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging, Version=2.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
    </Reference>
    <Reference Include="Microsoft.Practices.EnterpriseLibrary.Logging, Version=2.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
    </Reference>
    <Reference Include="Microsoft.Practices.EnterpriseLibrary.Security, Version=2.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
    </Reference>
    <Reference Include="Microsoft.Practices.ObjectBuilder, Version=1.0.51206.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
    </Reference>
    <Reference Include="Microsoft.Practices.ObjectBuilder.WCSFExtensions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
    </Reference>

Then build and register the package again, and open a new VS instance.
Let me know if this helps,

Julián Domínguez
http://staff.southworks.net/blogs/jdominguez
Coordinator
Mar 27, 2007 at 6:47 PM
There is another possibility. If you are running XP SP2 or Vista, and downloaded the WAP GP ZIP, it might be "Blocked" by the OS since it came from an "un-trusted" source, the internet. You might try right-clicking on the ZIP file, selecting properties, clicking the "Unblock" button, and re-doing the Unzip process.
If that does the trick, let me know and I can update the installation instructions.
Mar 27, 2007 at 8:31 PM
Hooray! Removing the references per Julián's post seemed to fix the problem.

I did start over per Michael's recommendation and "unblocked" the entire zip file before extracting, but I still got the Recipe error.

After I removed the references mentioned above all appears to work well.

The problem taught me a thing or two about un-trusted sources, so it was worth the effort :)

Thanks for all the help. I appreciate the quick response and detailed answers.

Regards,

Dave

________________________

David Hayden
Microsoft MVP C#
May 30, 2007 at 11:28 PM
Got the same problem, did the same fixes.

It works!

Next step, making a showcase to promote WCSF.

Regards
Benny/Norway