Fails with missing ServiceContractNamespace

Topics: July and December Releases Forum
Apr 16, 2007 at 3:43 PM
The CreateServiceImplementation recipe fails with the following message:

Microsoft.Practices.RecipeFramework.RecipeExecutionException: An exception occurred during the binding of reference or execution of recipe GenerateWCFServiceContractImplementation. Error was: The following arguments are required and don't have values: ServiceContractNamespace. Can't continue execution..
You can remove the reference to this recipe through the Guidance Package Manager.
at Microsoft.Practices.RecipeFramework.Recipe.ThrowIfRequiredArgumentsAreNull(IDictionaryService arguments)
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.VisualStudio.RecipeMenuCommand.OnExec()
at Microsoft.Practices.RecipeFramework.VisualStudio.AssetMenuCommand.Invoke()


Is there a workaround?

Thanks
Developer
Apr 16, 2007 at 8:13 PM
Can you elaborate further about the scenario (solution structure, responsabilities, if the implementation project was created by the package template or added later on) and the data you set in the wizard pages?

Thanks,
Charly
Apr 17, 2007 at 2:20 PM
I found the fix.

I had to manuall add the following to the end of the .sln file. (if not at the end, it didn't work). I created a set of class libraries then I used the 'assign responsability' guidance package. I think that this package unfortunately doesn't modify the sln file directly.

GlobalSection(ExtensibilityGlobals) = postSolution
ISWCFSolution = True
Locked = False
UnLocked = True
DataContractNamespace = http://something.com/2007/02
FaultContractNamespace = http://something.com/2007/02
ServiceContractNamespace = http://something.com/2007/02
EndGlobalSection


I whish the error message would have been more clear about where to fix the problem :)

Cheers
Jan 11, 2008 at 7:07 PM
philosophil,

Thank you for posting the solution. I run into the same problem and your fix worked.