RadControls destroy sitefinity project
Hello,
I tried the following many times, and it gives the same error in all times.
I am using sitefinity 4.1 trial version.
I create a new project and it works normally with no problems, then I do the following:
* Add new user control to the sitefinity project in visual studio 2010
* Add any of the rad controls to the new user control.
* Build the project.
then the project continues to crash giving the following error:
"
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
"
Are there problems with that version of sitefinity with rad controls.
Thanks,
Whats your VS2010 environment look like? Do you have a seperate RadControls install outside of sitefinity or did you install the version that comes with sitefinity?...and are you using the VS2010 toolbox to drag\drop controls or are you just typeing <telerik:CONTROLNAME (etc)?
It certainly functions properly with the RadControls as it uses them quite heavily
Steve
I installed the radcontrols the comes with sitefinity, and I don't have any other rad controls installations.
The Rad controls were not found in the vs toolbox by default, so I added them manually by adding referring to the assembly "Telerik.Web.UI"
And I add the controls to the user control by drag and drop from the toolbox.
Hello,
If you can send the stack trace of the error this might provide some more details about what cases the issue.
Best wishes,
Ivan Dimitrov
the Telerik team
Here is the stack trace:
[FileLoadException: Could not load file or assembly 'Telerik.Web.UI, Version=2011.1.315.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
System.Reflection.CustomAttribute._CreateCaObject(RuntimeModule pModule, IRuntimeMethodInfo pCtor, Byte** ppBlob, Byte* pEndBlob, Int32* pcNamedArgs) +0
System.Reflection.CustomAttribute.CreateCaObject(RuntimeModule module, IRuntimeMethodInfo ctor, IntPtr& blob, IntPtr blobEnd, Int32& namedArgs) +77
System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) +1286
System.Reflection.CustomAttribute.GetCustomAttributes(RuntimePropertyInfo property, RuntimeType caType) +149
System.Attribute.InternalGetCustomAttributes(PropertyInfo element, Type type, Boolean inherit) +41
Telerik.Sitefinity.Configuration.ConfigElement.CreateConfigurationPropertyFromAttributes(PropertyInfo info) +98
Telerik.Sitefinity.Configuration.ConfigElement.CreatePropertyBagFromType(Type type) +123
Telerik.Sitefinity.Configuration.ConfigElement.GetPropertiesFromType(Type type, ConfigPropertyCollection& result) +253
Telerik.Sitefinity.Configuration.ConfigElementDictionary`2..ctor(ConfigElement parent, IEqualityComparer`1 keyComparer) +67
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle._InvokeConstructor(IRuntimeMethodInfo method, Object[] args, SignatureStruct& signature, RuntimeType declaringType) +0
System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +517
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +12732877
Telerik.Sitefinity.Configuration.ConfigElement.GetDefaultValue(ConfigProperty prop) +328
Telerik.Sitefinity.Configuration.ConfigElement.get_Item(ConfigProperty prop, ConfigPolicyHandler policyHandler, String policyName) +67
Telerik.Sitefinity.Configuration.ConfigElement.get_Item(String propertyName) +56
Telerik.Sitefinity.Publishing.Configuration.PublishingConfig.get_ContentViewControls() +28
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +0
System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +152
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +393
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +38
System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index) +37
Telerik.Sitefinity.Configuration.ConfigElement.ApplyInstanceAttributes(Object instance) +232
Telerik.Sitefinity.Configuration.ConfigElement.EnsurePropertiesInitialized() +99
Telerik.Sitefinity.Configuration.ConfigElement.get_Properties() +21
Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadPropertyElement(ConfigElement element, XmlReader reader, ConfigPolicyHandler policyHandler, String policyName, Boolean isUpgrading) +54
Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadElement(ConfigElement element, XmlReader reader, ConfigPolicyHandler policyHandler, String policyName, Boolean isUpgrading, Boolean validateTagName) +636
Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSection(ConfigSection section, ConfigPolicyHandler policyHandler, String policyName) +549
Telerik.Sitefinity.Configuration.ConfigSection.Initialize(ConfigProvider provider, ConfigPolicyHandler policyHandler, String policyName, Boolean singlePolicy) +194
Telerik.Sitefinity.Configuration.ConfigSection.Initialize(ConfigProvider provider) +30
Telerik.Sitefinity.Configuration.Config.Get() +221
Telerik.Sitefinity.Abstractions.Bootstrapper.RegisterRoutes(RouteCollection routes) +1393
Telerik.Sitefinity.Abstractions.Bootstrapper.Bootstrap() +338
Telerik.Sitefinity.Web.SitefinityHttpModule.Init(HttpApplication context) +30
System.Web.HttpApplication.InitModulesCommon() +192
System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +1504
System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +348
System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +200
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +286
Hi,
Please check whether the dll is in your bin folder and the project has reference to it.
Regards,
Ivan Dimitrov
the Telerik team
Hi there. I have the same problem. I downloaded the Sitefinity 4.1 trial and I also have the latest AJAX RadControls (version 2011.1.413.40).
The workaround is to replace the Telerik.Web.Design and Telerik.Web.UI DLLs with the slightly older ones (version
2011.1.315.40)
included in the "_EmptyProject" directory that came with the Sitefinity install.
However, this is a troublesome solution as everytime I drag and drop a RadControl from the Toolbox, the DLLs get replaced with the newer ones and I have to repeat the above steps again.
Please advise a permanent workaround. Our team is evaluating the CMS for a large scale project and this is a showstopper.
Hello Zhi,
It is possible that you have set Auto Update of the dll references and the project gets the latest version. Please check the project reference and what you have in the GAC.
All the best,
Ivan Dimitrov
the Telerik team
Hi, I shouldn't have to suppress the Auto Update. One would expect Sitefinity to work with the latest RadControls. I applied SP1 and things have been fixed though, so good job on your patch.