BricsCAD 2025 - debugging .Net plugin

Hi
Our plugin debugs just fine in 2024 but in 2025 it just crashes during bricsCAD 2025 startup. I have set the <startup useLegacyV2RuntimeActivationPolicy="false"> flag in the 2025 bricscad.exe.config file. The setup is identical to that in 2024. The only evidence of the crash is in the windows application error log:

Faulting application name: bricscad.exe, version: 25.1.6.0, time stamp: 0x6731d6e5
Faulting module name: clr.dll, version: 4.8.9282.0, time stamp: 0x66e8bd22
Exception code: 0xc0000005
Fault offset: 0x00000000005f8ad0
Faulting process id: 0x0x3898
Faulting application start time: 0x0x1DB3F1F8DC80EBD
Faulting application path: C:\Program Files\Bricsys\BricsCAD V25 en_US\bricscad.exe
Faulting module path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Report Id: c5102724-618c-48d2-9d77-b82471448b27
Faulting package full name:
Faulting package-relative application ID:

I know its not a great deal of info to go on but was hoping someone could give any obvious pointers regarding any required config changes that may be necessary in 2025?
For instance, has 2025 moved to .Net Core like Autodesk products have? Nothing I can see when googling suggests it has. If I know there are no major changes and that it "should" just work, I can start dismantling the plugin to its basics to hopefully find the culprit.

Comments

  • 0xc0000005 is an access violation. My guess is that something is not ready when your module is loading. I.e. the document or ribbon

    Id remove everything from Initialize() and see if that changes anything

  • My BricsCAD beta 2025 also get crash during opening 2D Draft mode for debug.

    I use BricsCAD 2023 trial to debug.

    The compiled add-in (.dll file) still works fine in 2025.

  • Thank you Its_Alive and NTCL for your suggestions. I didn't get notification of the posts so would have responded sooner.
    I removed everything from initialize() but still the same issue.
    The AddIn does load if launched normally (not in debug) but there are a few bugs that we do not get in 2024 that will need resolving in 2025. Hence we need to debug to see what the issues are. The tools in the Ribbon also need addressing as the layout looks very different in 2025 with missing textboxes etc.

    I will create a clean empty project and work from that (if it works) to establish what the access violation might be.

  • Even an Empty plugin project with a simple test command that pops a message "hello" does not seem to work in 2025. I attach the vs project. If the same project is adapted to 2024 then no issues. Note that the plugin in this project doesn't even load in normal mode (not debug). It just crashes BricsCAD 2025 during startup after selecting a file / template. I've noticed that if I select a 2D drawing I get a different error to if I select 3D one.

    2D:
    Faulting application name: bricscad.exe, version: 25.1.6.0, time stamp: 0x6731d6e5
    Faulting module name: clr.dll, version: 4.8.9282.0, time stamp: 0x66e8bd22
    Exception code: 0xc00000fd
    Fault offset: 0x00000000005f8ad0
    Faulting process id: 0x%9
    Faulting application start time: 0x%10
    Faulting application path: %11
    Faulting module path: %12
    Report Id: %13
    Faulting package full name: %14
    Faulting package-relative application ID: %15

    3D:
    Faulting application name: bricscad.exe, version: 24.2.6.0, time stamp: 0x665da559
    Faulting module name: ntdll.dll, version: 10.0.22621.4391, time stamp: 0x7b2ab261
    Exception code: 0xc0000005
    Fault offset: 0x0000000000077f1a
    Faulting process id: 0x0xA5BC
    Faulting application start time: 0x0x1DB4576222C2B65
    Faulting application path: C:\Program Files\Bricsys\BricsCAD V24 en_US\bricscad.exe
    Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
    Report Id: fc5fa7b2-6ef1-4937-a67e-da1be50de9f3
    Faulting package full name:
    Faulting package-relative application ID:

  • I setup the project as I normally would. Though it’s been a while since I’ve done .NET, I added an x64 build configuration so there’s no ambiguity. try this modified project

  • Thank you Its_Alive for your reply. I tried running your project but got the same crash. So I checked the Regkey that loads the Plugin during startup at Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Bricsys\ObjectDRX\V25x64\Applications\
    and had to amend the path to take into account the different build folder (x64). But with that path patched, still crashes.
    From your second screen shot, are you saying it is working for you? If so, I obviously have some kind of environment related issue.