Add "System.Web.Extensions.dll" assembly reference to ProjectAssembly fail

SyntaxEditor .NET Languages Add-on for WPF Forum

Posted 11 years ago by Nicolas
Version: 12.2.0573
Platform: .NET 4.0
Environment: Windows 7 (64-bit)
Avatar

Just try :

IProjectAssembly myProjectAssembly; // in my code, this is a CSharpProjectAssembly

myProjectAssembly.AssemblyReferences.Add("C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Web.Extensions.dll");

=> This line throw exception :

System.TypeLoadException: La méthode 'get_EnableCdnFallback' du type 'System.Web.UI.ScriptManager' de l'assembly 'System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' n'a pas d'implémentation.
à System.Signature.GetSignature(Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType)
à System.Reflection.RuntimeMethodInfo.get_ReturnType()
à #Grc.#1rc.#7Ec(#fsc #wAf, MemberInfo #xAf)
à #Grc.#1rc.#cFc(#hsc #4Ub, Type #uAf)
à #Grc.#1rc.#XEc(Assembly #sxc)
à #Grc.#1rc.#iFc(Assembly #sxc)
à #Grc.#0rc..ctor(Assembly assembly, IAssemblyName assemblyName, IBinaryAssemblyMetadata metadata)
à ActiproSoftware.Text.Languages.DotNet.Reflection.Implementation.AssemblyRepositoryBase.Create(Assembly assembly, IAssemblyName assemblyName, IBinaryAssemblyMetadata metadata)
à ActiproSoftware.Text.Languages.DotNet.Reflection.Implementation.FileBasedAssemblyRepository.Create(Assembly assembly, IAssemblyName assemblyName, IBinaryAssemblyMetadata metadata)
à ActiproSoftware.Text.Languages.DotNet.Reflection.Implementation.FileBasedAssemblyRepository.GetOrCreate(Assembly assembly, IAssemblyName assemblyName, String location)
à ActiproSoftware.Text.Languages.DotNet.Reflection.Implementation.AssemblyRepositoryBase.Load(Assembly assembly, IAssemblyName assemblyName)
à ActiproSoftware.Text.Languages.DotNet.Reflection.Implementation.AssemblyRepositoryBase.LoadFrom(String path)
à #Grc.#tsc.AddFrom(String #hd)

Comments (1)

Answer - Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Nicolas,

I'm not sure why that exception is being thrown but it happens as soon as we try to access the MethodInfo's ReturnType property in Microsoft's reflection code.  For the next version, we've added a try...catch around it to allow assembly loading code to continue on when this happens.


Actipro Software Support

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.