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

9 posts, 1 answers
  1. losol
    losol avatar
    10 posts
    Member since:
    Aug 2004

    Posted 12 Apr 2015 Link to this post

    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)     
  2. Answer
    Ralitsa
    Admin
    Ralitsa avatar
    185 posts

    Posted 14 Apr 2015 Link to this post

    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.

     
  3. na
    na avatar
    1 posts
    Member since:
    Sep 2015

    Posted 27 Nov 2015 in reply to Ralitsa Link to this post

    Hi Ralisa,

     It helped me. Thanks

  4. Indudhar
    Indudhar avatar
    1 posts
    Member since:
    Aug 2015

    Posted 16 Dec 2015 in reply to Ralitsa Link to this post

    Thank You...It worked for me as well
  5. peter
    peter avatar
    1 posts
    Member since:
    Sep 2014

    Posted 29 Sep in reply to Ralitsa Link to this post

    Perfect solution. Thanks
  6. Jeff
    Jeff avatar
    5 posts
    Member since:
    Jun 2013

    Posted 20 Oct in reply to Ralitsa Link to this post

    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

  7. Ralitsa
    Admin
    Ralitsa avatar
    185 posts

    Posted 23 Oct Link to this post

    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.licx 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.
  8. Jeff
    Jeff avatar
    5 posts
    Member since:
    Jun 2013

    Posted 23 Oct in reply to Ralitsa Link to this post

    Hi Ralitsa,

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

    Thanks.

  9. Ralitsa
    Admin
    Ralitsa avatar
    185 posts

    Posted 26 Oct Link to this post

    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.licx 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.
Back to Top