Strong Naming Guidance Package Should Work With *.pfx Files In Addition To *.snk Files
description
While the Guidance Package will let allow you to choose a *.pfx file if you directly type it into the file browser dialog, the recipe will crash if you've chosen the Update Internals option because it doesn't know how to read from the *.pfx file and prompt for the password.
Despite this, it still manages to correctly update the projects to use the *.pfx file for signing, which still saves a lot of effort and is the primary purpose of the tool. To that end, at least the file browser dialog should be coded to accept *.pfx files directly in addition to *.snk files.
The exception when using Update Internals on a *.pfx file is reproduced below.
{{
Microsoft.Practices.RecipeFramework.ActionExecutionException: An exception occurred during the binding of reference or execution of recipe StrongNameSolution. Error was: Action StrongNameProjects failed to execute:
The system cannot find the file specified.
You can remove the reference to this recipe through the Guidance Package Manager. ---> System.ComponentModel.Win32Exception: The system cannot find the file specified
at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at Microsoft.Practices.EnterpriseLibrary.StrongNamingGuidancePackage.Actions.StrongNameProjectsAction.GetPublicKeyFromKeyPair(String filename)
at Microsoft.Practices.EnterpriseLibrary.StrongNamingGuidancePackage.Actions.StrongNameProjectsAction.Execute()
at Microsoft.Practices.RecipeFramework.Recipe.Microsoft.Practices.RecipeFramework.Services.IActionExecutionService.Execute(String actionName, Dictionary2 inputValues)
at Microsoft.Practices.RecipeFramework.Recipe.Microsoft.Practices.RecipeFramework.Services.IActionExecutionService.Execute(String actionName)
at Microsoft.Practices.RecipeFramework.Recipe.Microsoft.Practices.RecipeFramework.Services.IActionCoordinationService.Run(Dictionary2 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.Execute(IAssetReference reference)
at Microsoft.Practices.RecipeFramework.RecipeReference.OnExecute()
at Microsoft.Practices.RecipeFramework.AssetReference.Execute()
at Microsoft.Practices.RecipeFramework.PackageManagement.PackageManager.OnExecuteRecipe(Object sender, EventArgs e)
}}