- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone,
I have migrated my customization project to AutoCAD Plant 3D 2025 / net8. After that, the System.Data.Odbc package from Microsoft no longer works. I get the error message: PlatformNotSupportedException. To rule out problems caused by the migration, I have carried out the following steps:
Without AutoCAD:
1. created a new Windows Form App (VB) in Visual Studio 2022 “TestODBCWinFormsApp” ( .NET 8 long term support)
2. added a button to the form
3. added a Button1_Click
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim myConnection As System.Data.Odbc.OdbcConnection = New System.Data.Odbc.OdbcConnection()
End Sub
4. added System.Data.Odbc from Microsoft Version 8.0.0 via the NuGet Manager
5. project created and executed: No exception is thrown
With AutoCAD:
1. add existing project from AutoCAD Plant 3D 2025 SDK: ..\AutoCAD Plant 3D 2025 SDK\samples\dotNet\HelloWorld\HelloWorld.vbproj
2. added a button to the “HelloWorldForm”
3. added a Button1_Click
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim myConnection As System.Data.Odbc.OdbcConnection = New System.Data.Odbc.OdbcConnection()
End Sub
4. added System.Data.Odbc from Microsoft Version 8.0.0 via the NuGet Manager
5. project created
6. start AutoDesk Plant 3D 2025, open a drawing
7. loaded the HelloWorld.dll with NETLOAD
8. execute the “helloform” command and click on the new button
************** Ausnahmetext **************
System.PlatformNotSupportedException: System.Data.ODBC is not supported on this platform.
at System.Data.Odbc.OdbcConnection..ctor()
at HelloWorld.HelloWorld.HellowWorldForm.Button1_Click(Object sender, EventArgs e) in R:\SKL\Autodesk\AutoDeskSDKs\AutoCAD Plant 3D 2025 SDK\samples\dotNet\HelloWorld\HelloWorldForm.vb:line 98
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(HWND hWnd, MessageId msg, WPARAM wparam, LPARAM lparam)
I have attached the entire error message as an attachment.
Do you have any ideas?
Have fun testing!
Greetings Lars
Solved! Go to Solution.