.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Connect to SQL database with .net 8.0

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
CBennett34F8SS
1494 Views, 5 Replies

Connect to SQL database with .net 8.0

I have a command that will pull data from a SQL database and import it into a title block.  This worked fine in .net framework.  I recently migrated to 2025 and .net 8.0 and I am getting the following error: System.PlatformNotSupportedException: 'Microsoft.Data.SqlClient is not supported on this platform.'

 

I created a test console app in .net 8.0 and I am able to pull data from that database that way.  Has anyone else run into this issue?

5 REPLIES 5
Message 2 of 6

nevermind I found it,  for some reason Microsoft.Data.SqlClient is not choosing the correct runtime .dll to load.  I specified it in my project file with <RuntimeIdentifier>win-x64</RuntimeIdentifier>  and it is now working again.

Message 3 of 6
kdub_nz
in reply to: CBennett34F8SS

For anyone else :
I noticed this today

https://adndevblog.typepad.com/autocad/2024/05/connecting-to-sql-server-from-autocad-2025.html

 

Perhaps this article by Madhukar Moogala  @moogalm will help those with an SQL issue.
Regards,


// Called Kerry in my other life.

Everything will work just as you expect it to, unless your expectations are incorrect.

class keyThumper<T> : Lazy<T>;      another  Swamper

Message 4 of 6

<RuntimeIdentifier>win-x64</RuntimeIdentifier> was the Solution!


Agrarbau - Industrie- und Gewerbebau - Behälterbau - Stahlbau - Nagelplatten - Hausbau

Oswald Fabian
Message 5 of 6

Perhaps ypu guys need to look at this :

https://github.com/MadhukarMoogala/ACAD-SQLPlugin

 

From 3 months ago.


// Called Kerry in my other life.

Everything will work just as you expect it to, unless your expectations are incorrect.

class keyThumper<T> : Lazy<T>;      another  Swamper

Message 6 of 6
Domzinator
in reply to: kdub_nz

I have also strugled with this when i first tried to get all my tools to work in .net 8.0 i also use a sql database and there wasnt allot of info around at the time. Im glad to see that there are now

Civil 3D Certified Professional

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Autodesk Design & Make Report