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)