GetTypeResolutionService fails sometimes

Topics: July and December Releases Forum
Jun 27, 2007 at 2:28 PM
Has anyone seen this exception before?

System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.Module.GetTypesInternal(StackCrawlMark& stackMark)
at System.Reflection.Assembly.GetTypes()
at Microsoft.VisualStudio.Shell.Design.AssemblyObsoleteEventArgs..ctor(Assembly assembly)
at Microsoft.VisualStudio.Design.VSDynamicTypeService.ReloadAssemblyIfChanged(String codeBase)
at Microsoft.VisualStudio.Design.VSDynamicTypeService.CreateDynamicAssembly(String codeBase)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.get_Assembly()
at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.Search(String fullName, String typeName, Boolean ignoreTypeCase, Assembly& assembly, String description)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.SearchProjectEntries(AssemblyName assemblyName, String typeName, Boolean ignoreTypeCase, Assembly& assembly)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.SearchEntries(AssemblyName assemblyName, String typeName, Boolean ignoreTypeCase, Assembly& assembly)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.System.ComponentModel.Design.ITypeResolutionService.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.System.ComponentModel.Design.ITypeResolutionService.GetType(String name)
at Microsoft.Practices.RecipeFramework.Extensions.Converters.TypeFromStringConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value) in C:\Prj\ServiceFactory\Guidance Packages\Extensions\Extensions\Converters\TypeFromStringConverter.cs:line 56
at System.ComponentModel.TypeConverter.ConvertFromInvariantString(ITypeDescriptorContext context, String text)
at Microsoft.Practices.RecipeFramework.Extensions.Converters.TypeFromStringConverter.IsValid(ITypeDescriptorContext context, Object value) in C:\Prj\ServiceFactory\Guidance Packages\Extensions\Extensions\Converters\TypeFromStringConverter.cs:line 82
at Microsoft.Practices.ServiceFactory.Asmx.Converters.ASMXDataTypeConverter.IsValid(ITypeDescriptorContext context, Object value) in C:\Prj\ServiceFactory\Guidance Packages\ASMX Guidance Package\ASMX Guidance Package\Converters\ASMXDataTypeConverter.cs:line 63
at Microsoft.Practices.WizardFramework.ValueEditor.set_Value(Object value)
at Microsoft.Practices.WizardFramework.ValueEditor.EditDropDownBtn(Object sender, EventArgs e)

It fails in the ServiceContract translator (in the ServiceFactory V2) during DataType or BusinessEntity validation. Last code point I can debug in the Extension.csproj:
Class: TypeFromStringConverter
method: ConvertFrom
line: ITypeResolutionService resolution = typeService.GetTypeResolutionService(hier);

It fails sometimes. Restarting VS2005 does solve the problem. It is very hard to diagnose because it only fails 1 in 10 times.
Gax 1.2 is installed, not yet on VS2005 SP1.
Any clues?

Tnx
Rene
Jul 10, 2007 at 8:06 AM
This is the same issue

http://www.codeplex.com/servicefactory/Thread/View.aspx?ThreadId=7103
Jul 10, 2007 at 5:26 PM

rschrieken wrote:
This is the same issue

http://www.codeplex.com/servicefactory/Thread/View.aspx?ThreadId=7103


We've seen problems with the TypeResolutionService in all the p&p factories. Unfortunately, this is a bug in VS. We're still looking for a reasonable way to avoid this error.
Jul 10, 2007 at 9:06 PM
Thanks Chris!

The only workaround yet is to close down and reopen VS2005, right?

Rene