locked
Visual Studio 2019 Dataset Designer Error: Value cannot be null. Parameter name:instance RRS feed

  • Question

  • I have opened an existing project in VS 2109.  When trying to open any data set I get the following error.

    Value cannot be null. Parameter name:instance

    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.Add(IComponent component, String name)
    at System.ComponentModel.Container.Add(IComponent component)
    at Microsoft.VSDesigner.DataSource.Designer.DataSourceDesignerLoader.HandleLoad(IDesignerSerializationManager serializationManager)
    at Microsoft.VSDesigner.DesignerFramework.BaseDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
    at Microsoft.VSDesigner.DesignerFramework.BaseDesignerLoader.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)

    I have tried changing the target Framework.  Did not help.

    Any suggestions?

    Thursday, April 11, 2019 3:01 PM

All replies

  • May have an initial fix.

    My project was targeted to Framework 4.6.1.  I changed the target Framework to 4.7.2.  I was then able to open all datasets. 

    I tried several other versions (4.5, 4.6.2, 4.7.1, etc. ), no other Framework version worked.


    • Proposed as answer by AlexFu Saturday, January 18, 2020 9:53 PM
    Thursday, April 11, 2019 8:51 PM
  • Hi Gene Porubsky,

    Welcome to the MSDN forum and thank you for your feedback.

    >> My project was targeted to Framework 4.6.1.  I changed the target Framework to 4.7.2.  I was then able to open all datasets. 

    Does this issue only happens for this specific project? Could you please share more detail steps to reproduce this issue?

    According to your description, I tried to create a C# Windows Formsapplication with target framework 4.6.1 in VS 2017, add a new DataSet file and addd a DataTable, save this solution.

    After that, open this above solution in VS 2019, it can open the DataSet Designer window without any error.

    During research, I found some other community members report the similar error in VS 2017. If I can reproduce your issue, I will help you report this issue to the VS Product Team, looking forward your more detail information, thanks.

    Best regards,

    Sara


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com


    Friday, April 12, 2019 2:13 AM
  • It appears to be just the one project, and it may be related to DevExpress.

    It is a web project.  We use DevExpress, and I upgraded to version 18.2.7 to work within VS 2019.  I have other web projects that I am able to open and view the datasets without issue, however those are still using earlier versions of DevExpress.  The project causing the issue is the only one upgraded to 18.2.7 at this point.

    I am also able to open other Windows projects that use earlier versions of DevExpress.



    Friday, April 12, 2019 5:13 PM
  • Hi Gene Porubsky,

    Thank you for your detail information.

    If you create a new web project with the DevExpress in version 18.2.7, does this issue persists?

    It seems this issue is about the DevExpress and the DevExpress is the third party control, please redirect this appropriate forum: https://www.devexpress.com/Support/Center/Question/List/1 for better support, thank you for your understanding.

    Best regards,

    Sara


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Monday, April 15, 2019 9:39 AM
  • I got same issue. Changing to targeting .NET 4.7.2 worked for me too (Gen Porubsky's suggestion to his own post above).

    I had it happening in other projects too, not just the one where I first found it.

    • Edited by Kartris Thursday, June 13, 2019 3:25 PM
    Thursday, June 13, 2019 3:25 PM
  • Kudos!
    Saturday, January 18, 2020 9:53 PM
  • Hi Sarah, this is really regular.

    From VS 2017, datasets I created in perfectly functional websites using previous versions of visual studio cannot be worked with.   

    Typically these are .NET 2.0 or .NET 4 websites and no third party products used.

    Value cannot be null.  Parameter name:instance.


    There's either something wrong with the VS IDE, or there's an little known option setting that no-one knows about.


    Tuesday, January 21, 2020 11:52 PM
  • En mi caso tengo un proyecto WinForms con VS2019 con Telerik.

    Para solucionar el problema realice el proceso de Upgrade Wizard , esto por el menu Extensiones, Telerik y luego Telerik UI For Winforms. 

    Esto sucedio despues de actualizar una version de Telerik.


    Wednesday, March 25, 2020 1:16 AM