This is a migrated thread and some comments may be shown as answers.

On every new project: Value cannot be null. Parameter name: instance

16 Answers 2489 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
losol
Top achievements
Rank 2
losol asked on 12 Apr 2015, 04:52 PM
Trying the trial of the Telerik suite for WinForms in Visual Studi 2013, but any time I try to make new Telerik winforms projects I get the same error message when trying to open the form: 

   To prevent possible data loss before loading the designer, the following errors must be resolved:              1 Error         Why am I seeing this page?             Value cannot be null. Parameter name: instance              Instances of this error (1)   1.   Show Call Stack   at System.ComponentModel.TypeDescriptor.AddAttributes(Object instance, Attribute[] attributes)at Microsoft.VisualStudio.Design.VSDesignSurface.CreateDesigner(IComponent component, Boolean rootDesigner)at System.ComponentModel.Design.DesignerHost.AddToContainerPostProcess(IComponent component, String name, IContainer containerToAddTo)at System.ComponentModel.Design.DesignerHost.PerformAdd(IComponent component, String name)at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type componentType, String name)at System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)     

16 Answers, 1 is accepted

Sort by
2
Accepted
Ralitsa
Telerik team
answered on 14 Apr 2015, 10:29 AM
Hi Ole Kristian,

Thank you for contacting us. 

You need to follow these steps to remove the error: 
1. Open the project 
2. Add the Telerik.WinControls.UI.Design.dll in the reference 
3. Save changes and close the project
4. Open the application and rebuild it. 

I also attached a video (drag and drop it over your browser to play it) which demonstrates the approach. 

The error is caused when have installed one version of controls in GAC and the project references another version of the dlls. If you use RadForm or if you want to make changes at design time, you need to add the Telerik.WinControls.UI.Design.dll when working with version different from installed one. 

I hope this information helps. Should you have further questions, I would be glad to help.

Regards,
Ralitsa
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Yuvi
Top achievements
Rank 1
commented on 24 Aug 2022, 07:53 AM

Not able to open the attached file, will you please give me the link from where i can download the same dll, that would help me a lot thanks.
Dess | Tech Support Engineer, Principal
Telerik team
commented on 24 Aug 2022, 10:54 AM

Hi, Yuri, if you have an installation of the Telerik UI for WinForms suite, you are expected to see the assemblies in the installation folder. It is usually located in the following path: C:\Program Files (x86)\Progress\Telerik UI for WinForms R2 2022, where R2 2022 is the installed version.
Uwe
Top achievements
Rank 1
commented on 22 May 2023, 11:45 AM

Thank you,
worked like a charm. Additionally i removed all old references and deleted the 'licenses.licx' file. Than i added the needed telerik dlls to via reference add dialog as file references. (copy local true). After that i followed the instructions above.
Dess | Tech Support Engineer, Principal
Telerik team
commented on 22 May 2023, 11:57 AM

Uwe, I am glad that the mentioned steps above was helpful for your scenario. I am posting here some more tips in order the community to benefit from it.

I would like to ask you to check the references to all Telerik controls in your project and make sure that they are the same version considering the suffix as well (.20, .40, .48 etc.) since it is usually the most common reason any unexpected behavior after upgrading. Better yet, you can remove all references and add them anew by using the DLLs from your fresh installation: https://docs.telerik.com/devtools/winforms/installation-and-upgrades/updating-assemblies-in-a-project 
Delete the license.licx file. After that, you should rebuild your project, close Visual Studio and open it again to make sure that no references are kept in the memory by Visual Studio. Ensure that no old versions are available in GAC: https://docs.telerik.com/devtools/winforms/knowledge-base/examine-the-gac 
Off topic, the following KB article demonstrates the different approaches that you may follow when upgrading the Telerik UI for WinForms suite:
https://docs.telerik.com/devtools/winforms/knowledge-base/how-to-upgrade-a-project 
0
na
Top achievements
Rank 1
answered on 27 Nov 2015, 07:10 AM

Hi Ralisa,

 It helped me. Thanks

0
Indudhar
Top achievements
Rank 1
answered on 16 Dec 2015, 07:23 AM
Thank You...It worked for me as well
0
peter
Top achievements
Rank 1
answered on 29 Sep 2017, 07:11 PM
Perfect solution. Thanks
0
Jeff
Top achievements
Rank 1
answered on 20 Oct 2017, 09:08 PM

This didn't work for me. My project was working fine in VS2017. I used control panel to install the tools to VS 2013. Now my 2017 project won't load/compile correctly. I get numerous errors like the one below. I tried adding the UI.Design and even completely reinstalling the suite for 2017. No luck.

 

SeverityCodeDescriptionProjectFileLineSuppression State

ErrorCS1705Assembly 'Telerik.WinControls.GridView' with identity 'Telerik.WinControls.GridView, Version=2017.3.1017.40, Culture=neutral, PublicKeyToken=5bb2a467cbec794e' uses 'Telerik.WinControls, Version=2017.3.1017.40, Culture=neutral, PublicKeyToken=5bb2a467cbec794e' which has a higher version than referenced assembly 'Telerik.WinControls' with identity 'Telerik.WinControls, Version=2017.3.912.40, Culture=neutral, PublicKeyToken=5bb2a467cbec794e'CredMan

0
Ralitsa
Telerik team
answered on 23 Oct 2017, 02:20 PM
Hi Jeff,

Thank you for contacting us. 

I would like to ask you to carefully check the references to all Telerik controls in your project and make sure that they are the same version considering the suffix as well (.20 or .40). Better yet, you can remove all references and add them anew by using the DLLs from your latest installation. If the license. file exist, you need to delete it (Visual Studio Project >> Properties >> Licenses.licx) . After that, you should rebuild your project, close Visual Studio and open it again to make sure that no references are kept in the memory by Visual Studio.  

I hope this information helps. Should you have further questions I would be glad to help.

Regards,
Ralitsa
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Jeff
Top achievements
Rank 1
answered on 23 Oct 2017, 03:04 PM

Hi Ralitsa,

I recently removed all the dlls and added them in. They are all version .20 and the issue still exists.

Thanks.

0
Ralitsa
Telerik team
answered on 26 Oct 2017, 08:34 AM
Hello Jeff,

Thank you for writing back. 

The observed exception is shown when the referenced assemblies are different or the license.licx is not deleted. Once you have checked and update the referenced assemblies in your application, I can suggest you deleting the license file. You can follow the steps below: 
1. Run Visual Studio and open your project
2. Close all opened forms. Delete license. file (see attached image) 
3. Save the changes and close the Visual Studio
4. Open the project again and rebuild. 

Let me know if you have any other questions.

Regards,
Ralitsa
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
John
Top achievements
Rank 1
answered on 04 Jan 2018, 05:17 PM

Thank you in advance for all the help.

I also tried the suggestions listed before, but am experiencing the same problems as Jeff.

Using VS2017, I deleted the license file, removed/verified all .dll are same versions, and cleared any resident GAC entries.

 

0
John
Top achievements
Rank 1
answered on 04 Jan 2018, 05:19 PM

Just so it's clear.... My error is the following call stack in designer:

Value cannot be null. Parameter name: instance



Instances of this error (1)

1. Hide Call Stack
at System.ComponentModel.TypeDescriptor.AddAttributes(Object instance, Attribute[] attributes)
at Microsoft.VisualStudio.Design.VSDesignSurface.CreateDesigner(IComponent component, Boolean rootDesigner)
at System.ComponentModel.Design.DesignerHost.AddToContainerPostProcess(IComponent component, String name, IContainer containerToAddTo)
at System.ComponentModel.Design.DesignerHost.PerformAdd(IComponent component, String name)
at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type componentType, String name)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)

0
John
Top achievements
Rank 1
answered on 04 Jan 2018, 05:23 PM

Just so it's more clear.... It's the error preventing the designer from loading.

Attaching stack trace....

 

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 05 Jan 2018, 07:35 AM
Hello, John,  

Thank you for writing.  

Could you please try to create a new project and test whether the designer will be opened? Further, I can suggest you to uninstall all available versions of the Telerik UI for WinForms suite on your machine. Then, install the desired version (latest version is recommended). Delete the license file and update the references with the ones from the fresh installation.

If you are still experiencing any further difficulties, it would be greatly appreciated if you submit a support ticket and provide your sample project. Thus, we would be able to investigate the precise case and assist you further. 

I hope this information helps.  
 
Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
John
Top achievements
Rank 1
answered on 05 Jan 2018, 05:00 PM

Ok. I found out why I was having problems. There are/were 2 issues....

First, designer errors using regular forms was caused by multiple problems (different DLL versions (GAC vs. local reference) and problems with AutoGenerateBindingRedirect). This was solved using the provided idea of absolutely killing all Telerik controls and installs, manually removing any remaining orphaned Telerik GAC entries(from older installs not using MSI which is what was causing a lot of issues), flushing all Telerik project references and license files, kill any binding overrides/redirects, then go back into solution and manually reference the DLLs not using the MSI to re-install.

Second problem is totally my fault for not paying attention.... I'm using VS2017 and attempting to use Telerik Reporting which doesn't have (as far as I can tell) VS2017 native support (goes up to VS2015), so when I tried to open an older report file it threw the form design error as well (but a slightly different one).

However, as usual, Telerik support is responsive and helpful. Many thanks. - John

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 08 Jan 2018, 10:34 AM
Hello, John, 

Thank you for writing back. 

I am glad that the problem you were facing is now resolved. A clean installation of the Telerik UI for WinForms suite and referring these assemblies usually fixes the designer problems because the design time uses the references in GAC.

If you have any additional questions, please let me know. 

 Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Jagdeesh
Top achievements
Rank 1
answered on 17 Oct 2019, 09:50 AM

When am trying to open RadForm getting an error 

I tried with above process but unable to resolve error.

 

at
Microsoft.VisualStudio.WinForms.RemoteClient.Loader.RemoteCodeDomDesignerLoader.EnsureDocument(IDesignerSerializationManager
manager)
at
Microsoft.VisualStudio.WinForms.RemoteClient.Loader.RemoteCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager
manager)
at
Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager
serializationManager)
--- End of stack trace from previous location where
exception was thrown ---
at
Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager
serializationManager)
at
Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32
fReload)

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 17 Oct 2019, 10:51 AM
Hello, Jagdeesh,      

I would like to ask you to carefully check the references to all Telerik controls in your project and make sure that they are the same version considering the suffix as well (.20 or .40). Better yet, you can remove all references and add them anew by using the DLLs from your installation. Delete the license.licx file. After that, you should rebuild your project, close Visual Studio and open it again to make sure that no references are kept in the memory by Visual Studio.  

However, if you are still experiencing any further difficulties, I would kindly ask you submit a support ticket from your account and provide a sample project demonstrating the undesired behavior that you are facing. Thus, our support staff would be able to investigate the precise case and provide further assistance. Thank you in advance.

I hope this information helps.

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
General Discussions
Asked by
losol
Top achievements
Rank 2
Answers by
Ralitsa
Telerik team
na
Top achievements
Rank 1
Indudhar
Top achievements
Rank 1
peter
Top achievements
Rank 1
Jeff
Top achievements
Rank 1
John
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Jagdeesh
Top achievements
Rank 1
Share this question
or