Custom Grasshopper Plug-in does not compile

Hello,

I was trying to create my first Grasshopper plug-in and for that, I was following the instructions in the Grasshopper documentation found here:

Unfortunately, when I Build and Run my Visual Studio code, the code does not seem to compile properly as the resulting component appears without the inputs and outputs that I introduced… Any idea why that might be?

Thanks,
Sofia

Impossible to tell without seeing your code or setup

If you see the component then it compiled just fine.

Did you register any input or output parameters in

protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
{
pManager.AddCurveParameter(“Outer”, “Outer”, “Outer Saucer Profile”, GH_ParamAccess.item);
}
or

protected override void RegisterOutputParams(GH_Component.GH_OutputParamManager pManager)
{
pManager.AddBrepParameter(“Frames”, “Frames”, “List of door frame cutters.”, GH_ParamAccess.list);
}

I did. Later, I have code that I wanted to implement in the component but for now, I’m just implementing a simple multiplication to test the component:

protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            pManager.AddIntegerParameter("num1", "num1", "Number 1", GH_ParamAccess.item, 1);
            pManager.AddIntegerParameter("num2", "num2", "Number 2", GH_ParamAccess.item, 1);
        }

protected override void RegisterOutputParams(GH_Component.GH_OutputParamManager pManager)
        {
            pManager.AddIntegerParameter("Output", "O", "Output Result", GH_ParamAccess.item);
        }

protected override void SolveInstance(IGH_DataAccess DA)
        {
            int num1 = 0;
            if (!DA.GetData("num1", ref num1)) return;

            int num2 = 0;
            if (!DA.GetData("num2", ref num2)) return;

            var result = num1 * num2;
            DA.SetData("result", result);
        }

When I build and run, the result is the component that I showed, without input or output parameters. I’m not sure why…

Well, seems like restarting the computer did the trick… Still not sure what was the problem but after turning off my computer and coming back the next morning to try again, the code is working as expected now.