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

AutoCAD 2025 .NET Core, Microsoft.Data.Sqlclient

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
kevin.bza
406 Views, 3 Replies

AutoCAD 2025 .NET Core, Microsoft.Data.Sqlclient

Greetings,
This guide helped a lot ... THANK YOU ...


https://info.quuxsoft.com/ftp/Migration_NET_Core%20English.pdf

 

My upgraded DLL for ACAD 2025 almost works.

Using the NUGET Microsoft.Data.Sqlclient, I managed to connect with the SQL server and run a query from a Windows Forms Desktop development.

Why is the entire dependent package output to the Debug folder on building the exe?
and I noticed a DLL with the sma name as the EXE in the Debug folder - why?

The DLL for ACAD does not connect to the SQL Server.
(Same code as the Windows Forms Desktop) - except ... the library contents were not copied to the Debug folder on building the DLL.
Error ....
The type of initializer ..... TSDPARSER threw an exception. on trying to connect to the SQL Server.

Thx for your patience,

I missed something .. maybe many somethings....

K.

Labels (1)
3 REPLIES 3
Message 2 of 4
kevin.bza
in reply to: kevin.bza

Solved!  : )

In my case I just needed to include access to this file  .....  Microsoft.Data.SqlClient.SNI.dll

 

Message 3 of 4
jayala_com
in reply to: kevin.bza

Hi, I'm getting the same error, but with REVIT 2025, would you add more details to the solution?

I appreciate any help you can provide.

Message 4 of 4
norman.yuan
in reply to: kevin.bza

You need to edit the *.csproj file (right-click the project, then select "Edit project file") and add these 2 lines in the <PropertyGroup> section:

 

<PropertyGroup>
  ... 
  ...
  <RuntimeIdentifier>win-x64</RuntimeIdentifier>
  <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
  ...
  ...
</PropertyGroup>

You can also use

<EnableDynamicLoading>true</EnableDynamicLoading>

 

instead of <CopyLocalLockFileAssemblies>. You may want to search the net for the differences between the two. Basically, both of them would copy the dependency DLLs from the Microsoft.Data.SqlClient Nuget package (or any Nuget package, for that matter) into the plugin (AutoCAD, or Revit) DLL output folder, when you compile the code with Visual Studio.

Norman Yuan

Drive CAD With Code

EESignature

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report