Exceptions when trying to open Spread Designer at runtime

Posted by: thaufe on 4 December 2023, 9:30 pm EST

  • Posted 4 December 2023, 9:30 pm EST

    We are currently upgrading an old spread to the current version.

    With the new version I was not able to open the Spread Designer at runtime.

    In the old version we used the DesignerMain class, which worked fine.

    With the current version I tried DesignerMain and FpSpreadDesigner, but both throw exceptions before doing anything.

    I could reproduce the problems with a new application.

    • I created a new Winforms application
    • I added all ddls. from the NuGet packages GrapeCity.Spread.WinForms and GrapeCity.Spread.WinForms.Design
    • I dragged a new spread and 2 buttons into the form
    • and I add the button code:
            private void button1_Click(object sender, EventArgs e)
            {
                FarPoint.Win.Spread.Design.FpSpreadDesigner fpSpreadDesigner1 = new FarPoint.Win.Spread.Design.FpSpreadDesigner();
                fpSpreadDesigner1.Show(fpSpread1);
            }

    This throws a System.NullReferenceException.

            private void button2_Click(object sender, EventArgs e)
            {
                FarPoint.Win.Spread.Design.DesignerMain DesignerMain1 = new FarPoint.Win.Spread.Design.DesignerMain(fpSpread1);
                DesignerMain1.Show();
            }

    And this throws a System.ArgumentOutOfRangeException.

    Can you tell me what I did wrong or how I can open the spread designer?

    Spread.Designer.Test.zip

  • Posted 6 December 2023, 11:04 am EST

    Hi Thomas,

    Thanks for providing us with the sample application.

    The application is working fine on our end. See designerBehavior.gif for reference.

    designerBehavior.zip

    It seems that there might be some issue with the Spread installed on your system. We request you to kindly uninstall it and reinstall to check if the issue is resolved.

    Reference link to uninstall Spread.NET from your machine: https://developer.mescius.com/getstarted/uninstall

    Reference link to install the latest version of Spread.NET: https://developer.mescius.com/spreadnet/download

    Kindly let us know if you have any further issues regarding this.

    Thanks & Regards,

    Aastha

  • Posted 4 February 2024, 7:12 pm EST - Updated 4 February 2024, 7:18 pm EST

    I got the same error on a complete new PC (no virtual machine).

    • I installed Visual Studio 2015
    • I installed .net Framework Developement 4.6.2 and 4.7.2
    • I downloaded the Spread.NET for Windows Forms, Version 16.2.20231
    • I created a new Visual Studio Project
    • I added all .dll files from folder C:\Program Files (x86)\MESCIUS\Spread.NET 16\Windows Forms\v16.2.20231.0\bin
    • I added all .dll files from folder C:\Program Files (x86)\MESCIUS\Spread.NET 16\Windows Forms\v16.2.20231.0\bin\Designer
    • And I added the windows form code from the upper example (which then created the licenses.licx)

    When I start the application there are several demo popups which is fine.

    And if I now push the buttons I get the same errors.

  • Posted 4 February 2024, 7:15 pm EST - Updated 4 February 2024, 7:20 pm EST

    We have purchased the Spread V16 end of last year, so my main focus is on this version.

    But I have also tried to test it with V17 to see if this works better.

    When I tried to open the SpreadDesigner V17, I got some other strange error:

    This assembly is protected by an unregistered version of Eziriz’s “.NET Reactor”! This assembly won’t further work.

  • Posted 5 February 2024, 9:26 pm EST - Updated 5 February 2024, 9:31 pm EST

    Hi Thomas,

    Thanks for providing the information.

    We could replicate the issue with VS 2015. Refer the following GIF:

    However, the issue could not be replicated with latest version of Visual studio, i.e. VS 2022. Refer the following GIF:

    Therefore, we suggest you update to Visual Studio 2022 in order to get rid of this issue.

    This assembly is protected by an unregistered version of Eziriz’s “.NET Reactor”! This assembly won’t further work.

    The above issue has been addressed in 17.0.1 build. Since you are working on a .NET Framework target application, there are possibilities that old assemblies are being utilized, leading to unresolved issues. To resolve this issue, please follow these steps:

    1. Uninstall Spread.NET v17 from your machine.
    2. Clear all NuGet packages located at: C:\Users[user name].nuget\packages.
    3. Install the GrapeCity.Spread.WinForms 17.0.1 package through NuGet.
    4. Build the project before adding the control to the form.

    By following these steps, the issue should be resolved, as the older assemblies are removed from the NuGet cache. You can then install Spread.NET v17 on your machine as needed.

    Hope this helps!

    Thanks & Regards,

    Aastha

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels