none
C++/CLI Typed Dataset RRS feed

  • Question

  • #pragma once 
     
    namespace WinFormExperimentBeta{ 
        using namespace System; 
        using namespace System::Data; 
     
        public ref class MyDataSet : DataSet 
        { 
    public:
    MyDataSet(){}
        }; 
    I am trying to create a C++/CLI project that relies on a TypedDataSet.  However, when I visually try to add my Typed Dataset to my form using the Visual Studio 2008 designer I get the following error: 

    "Could not add an instance of MyDataSet to the Designer.  To Resolve this problem, build the project, fix any errors, and add the instance to the designer again."

    I have tried simplifying the problem by creating a brand new project and a very simple DataSet.  See attached code. The code compiles with no errors or warnings.  I can make this work fine.  However when I go back to my original project with a blank WinForm and the same Dataset I get the error again.  

    I suspect that the solution is some insidious little details that I am missing. 

    Thanks,
    Adam


    Sunday, December 28, 2008 5:02 AM