Extending WSSF - Guidance Package Registration

Topics: General Discussion Forum, Service Factory Modeling Edition Forum
Mar 27, 2008 at 11:24 AM
Edited Mar 27, 2008 at 3:09 PM
Hi, I'm building a custom version of the WSSF and after making my modifications, I find that the when I register the guidance package, I can only use it in an experimental instance of VS and not in a normal instance, even though I registered it in a normal instance. The Model Project template doesn't show up in a normal instance of VS. Actually, the Service Factory node under Guidance Packages in the Add new Project Dialog, doesn't even appear. Does anyone know why this is so? It's a bit of a nuisance having to start up an experimental instance for everyday use of the guidance package.

I'm working with the February 2008 release of the WSSF on VS2008 with the latest GAX and GAT.

In addition, when using an experimental instance of VS2008, I tried adding a datacontract model and got the following warnings and errors even before I'd added any shapes to the model:

  • Warning 1 The custom tool 'ResXFileCodeGenerator' failed while processing the file 'Properties\Resources.resx'.

  • Warning 2 Cannot find a schema that defines target namespace 'http://schemas.microsoft.com/dsltools/DataContractDsl', schema validation skipped. C:\Projects\TestService\TestService\test.datacontract 2 2 TestService

  • Error 3 System.ArgumentException: The type 'Microsoft.Practices.ServiceFactory.Validation.ContractElementCollectionValidator, Microsoft.Practices.ServiceFactory.Validation, Version=3.1.0.0, Culture=neutral, PublicKeyToken=ff28db6faba075a2' cannot be resolved. Please verify the spelling is correct or that the full type name is provided.
at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.AssemblyQualifiedTypeNameConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
at System.ComponentModel.TypeConverter.ConvertFrom(Object value)
at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.NameTypeConfigurationElement.get_Type()
at Microsoft.Practices.EnterpriseLibrary.Validation.Configuration.CustomValidatorData.DoCreateValidator(Type targetType)
at Microsoft.Practices.EnterpriseLibrary.Validation.Configuration.ValidatorData.DoCreateValidator(Type targetType, Type ownerType, MemberValueAccessBuilder memberValueAccessBuilder)
at Microsoft.Practices.EnterpriseLibrary.Validation.Configuration.ValidatorData.Microsoft.Practices.EnterpriseLibrary.Validation.IValidatorDescriptor.CreateValidator(Type targetType, Type ownerType, MemberValueAccessBuilder memberValueAccessBuilder)
at Microsoft.Practices.EnterpriseLibrary.Validation.ValidatorBuilderBase.CreateValidatorForValidatedElement(IValidatedElement validatedElement, CompositeValidatorBuilderCreator validatorBuilderCreator)
at Microsoft.Practices.EnterpriseLibrary.Validation.ValidatorBuilderBase.CollectValidatorsForProperties(IEnumerable`1 validatedElements, List`1 validators, Type ownerType)
at Microsoft.Practices.EnterpriseLibrary.Validation.ValidatorBuilderBase.CreateValidator(IValidatedType validatedType)
at Microsoft.Practices.EnterpriseLibrary.Validation.ConfigurationValidatorBuilder.CreateValidator(Type type, ValidatedTypeReference typeReference, String ruleset)
at Microsoft.Practices.EnterpriseLibrary.Validation.ValidationFactory.CreateValidatorFromConfiguration(Type targetType, String ruleset, IConfigurationSource configurationSource, Boolean cacheValidator)
at Microsoft.Practices.EnterpriseLibrary.Validation.ValidationFactory.CreateValidatorFromConfiguration(Type targetType, String ruleset, IConfigurationSource configurationSource)
at Microsoft.Practices.Modeling.CodeGeneration.ValidationEngine.DoValidate(IConfigurationSource config, ModelElement element, ValidationContext context, String ruleSet)
at Microsoft.Practices.Modeling.CodeGeneration.ValidationEngine.Validate(ValidationElementState state, ValidationContext context, ModelElement currentElement, String ruleSet) C:\Projects\TestService\TestService\test.datacontract 0 1 TestService

Any idea what could be wrong?
Mar 27, 2008 at 6:50 PM
When you work with the source code of the factory, you should always work with the Exp.Hive. You may use the regular hive with a binary version (the original RTM factory or your own custom binary version using the msi project included with the factory source).
Regarding the warnings, the two first one are expected in the experimental hive and you may ignore them.
The Error 3 may be because you might not had registered successfully the factory and some assembly (the one with validation) got not registered well. Try rebuilding the factory and registering under Exp.Hive.
May 29, 2008 at 5:09 PM
I am using Visual Studio Team System and am currently having the same problem. When I add the datacontract model I get the following warnings and errors even before I'd added any shapes to the model. A similar problem occurs when I add the Service Contract Model:

 System.ArgumentException: The type 'Microsoft.Practices.ServiceFactory.Validation.ServiceElementCollectionValidator, Microsoft.Practices.ServiceFactory.Validation, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b400755e273791c3' cannot be resolved. Please verify the spelling is correct or that the full type name is provided.
   at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.AssemblyQualifiedTypeNameConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
   at System.ComponentModel.TypeConverter.ConvertFrom(Object value)
   at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.NameTypeConfigurationElement.get_Type()
   at Microsoft.Practices.EnterpriseLibrary.Validation.Configuration.CustomValidatorData.DoCreateValidator(Type targetType)
   at Microsoft.Practices.EnterpriseLibrary.Validation.Configuration.ValidatorData.DoCreateValidator(Type targetType, Type ownerType, MemberValueAccessBuilder memberValueAccessBuilder)
   at Microsoft.Practices.EnterpriseLibrary.Validation.Configuration.ValidatorData.Microsoft.Practices.EnterpriseLibrary.Validation.IValidatorDescriptor.CreateValidator(Type targetType, Type ownerType, MemberValueAccessBuilder memberValueAccessBuilder)
   at Microsoft.Practices.EnterpriseLibrary.Validation.ValidatorBuilderBase.CreateValidatorForValidatedElement(IValidatedElement validatedElement, CompositeValidatorBuilderCreator validatorBuilderCreator)
   at Microsoft.Practices.EnterpriseLibrary.Validation.ValidatorBuilderBase.CollectValidatorsForProperties(IEnumerable`1 validatedElements, List`1 validators, Type ownerType)
   at Microsoft.Practices.EnterpriseLibrary.Validation.ValidatorBuilderBase.CreateValidator(IValidatedType validatedType)
   at Microsoft.Practices.EnterpriseLibrary.Validation.ConfigurationValidatorBuilder.CreateValidator(Type type, ValidatedTypeReference typeReference, String ruleset)
   at Microsoft.Practices.EnterpriseLibrary.Validation.ValidationFactory.CreateValidatorFromConfiguration(Type targetType, String ruleset, IConfigurationSource configurationSource, Boolean cacheValidator)
   at Microsoft.Practices.EnterpriseLibrary.Validation.ValidationFactory.CreateValidatorFromConfiguration(Type targetType, String ruleset, IConfigurationSource configurationSource)
   at Microsoft.Practices.Modeling.CodeGeneration.ValidationEngine.Validate(ValidationElementState state, ValidationContext context, ModelElement currentElement, String ruleSet)    d:\Experimental\PricingVB\PricingSolutionVB\PricingSolutionVB\test2.servicecontract    0    1    PricingSolutionVB


When I registered the package, it said it was registered successfully.

May 29, 2008 at 5:43 PM
Do you have EntLib 4.0 installed?
If not, try re starting the process from the begining that is:
1) Reset the exp hive
2) Rebuild
3) Register package
May 29, 2008 at 6:22 PM
Thanks!
It worked for the out-of-the-box source. Now I am gonna try to apply my changes again.