<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SQL Connection in Vault 2026 with .net 8 in Vault Customization Forum</title>
    <link>https://forums.autodesk.com/t5/vault-customization-forum/sql-connection-in-vault-2026-with-net-8/m-p/13739856#M12935</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14972938"&gt;@matt_mwe&lt;/a&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7162092"&gt;@Nick_Hall&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found a cleaner solution and an explanation why Nicks solution works.&lt;BR /&gt;&lt;BR /&gt;There are two things.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;1)&amp;nbsp;&amp;lt;CopyLocalLockFileAssemblies&amp;gt;true&amp;lt;/CopyLocalLockFileAssemblies&amp;gt; add in your .csproj&lt;BR /&gt;&lt;/STRONG&gt;&amp;nbsp;- OutputType Library by default does not copy dependencies to OutDir (Which makes sense, bcease this should only happen in the application that uses the library - there all dependencies should be copied). But because we build plugins, we need all dependencies with our library. This is what the Property&amp;nbsp;&lt;STRONG&gt;CopyLocalLockFileAssemblies &lt;/STRONG&gt;does.&lt;/P&gt;&lt;P&gt;&amp;nbsp;- There is also property&amp;nbsp;EnableDynamicLoading, which does the same thing and a bit more:&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#enabledynamicloading" target="_blank"&gt;https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#enabledynamicloading&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;2)&amp;nbsp;&lt;STRONG&gt;&amp;lt;RuntimeIdentifier&amp;gt;win-x64&amp;lt;/RuntimeIdentifier&amp;gt;&amp;nbsp;add in your .csproj&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;When you reference a nuget like Microsoft.Data.SqlClient, which includes native and runtime platform specific dlls which are now (when we use&amp;nbsp;&lt;STRONG&gt;CopyLocalLockFileAssemblies)&lt;/STRONG&gt;copied to outdir\runtimes directory. We need to tell the compiler which runtime dlls to copy to outdir thats where &lt;STRONG&gt;RuntimeIdentifier &lt;/STRONG&gt;comes in.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TLDR;&lt;/P&gt;&lt;P&gt;add this to your csproj&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;CopyLocalLockFileAssemblies&amp;gt;true&amp;lt;/CopyLocalLockFileAssemblies&amp;gt;
&amp;lt;RuntimeIdentifier&amp;gt;win-x64&amp;lt;/RuntimeIdentifier&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result is that both dlls that Nick mentions in his solution are automatically copied to outdir.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Jul 2025 11:34:41 GMT</pubDate>
    <dc:creator>david.siegert63GB8</dc:creator>
    <dc:date>2025-07-25T11:34:41Z</dc:date>
    <item>
      <title>SQL Connection in Vault 2026 with .net 8</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/sql-connection-in-vault-2026-with-net-8/m-p/13629794#M16</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm struggling currently with migrating my Vault Add-In to .net 8&lt;/P&gt;&lt;P&gt;Especially with the task of migrating "System.Data.SQL".&lt;/P&gt;&lt;P&gt;I tried also the new "Microsoft.Data.SQL" but it always run in a "System.PlatformNotSupportedException: 'Microsoft.Data.SqlClient is not supported on this platform.'" error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also tried to fix from this post &lt;A href="https://forums.autodesk.com/t5/net-forum/sql-connection-in-autocad-2025/m-p/13404589" target="_blank"&gt;Solved: SQL Connection in AutoCAD 2025 - Autodesk Community&lt;/A&gt;, but it didn't work out for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I tried so far:&lt;/P&gt;&lt;P&gt;- Adding&amp;nbsp;&lt;SPAN&gt;&amp;lt;RuntimeIdentifier&amp;gt;win-x64&amp;lt;/RuntimeIdentifier&amp;gt; in the Project file&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;- Putting all the DLL's next to the Addin DLL&lt;/P&gt;&lt;P&gt;- Trying it with the obsolete&amp;nbsp;"System.Data.SQL" package&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have a working solution on that?&lt;/P&gt;</description>
      <pubDate>Wed, 14 May 2025 12:37:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/sql-connection-in-vault-2026-with-net-8/m-p/13629794#M16</guid>
      <dc:creator>matt_mwe</dc:creator>
      <dc:date>2025-05-14T12:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Connection in Vault 2026 with .net 8</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/sql-connection-in-vault-2026-with-net-8/m-p/13634972#M17</link>
      <description>&lt;P&gt;Hi Matt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've just migrated a Vault add-in to 2026/.net 8, and I had to&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Use Microsoft.Data.Sqlclient&lt;/LI&gt;&lt;LI&gt;Copy these files to the output folder&lt;BR /&gt;%USERPROFILE%\.nuget\packages\microsoft.data.sqlclient.sni.runtime\6.0.2\runtimes\win-x64\native\Microsoft.Data.SqlClient.SNI.dll&lt;BR /&gt;%USERPROFILE%\.nuget\packages\microsoft.data.sqlclient\6.0.2\runtimes\win\lib\net8.0\Microsoft.Data.SqlClient.dll&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;After that, everything worked fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;</description>
      <pubDate>Sat, 17 May 2025 04:35:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/sql-connection-in-vault-2026-with-net-8/m-p/13634972#M17</guid>
      <dc:creator>Nick_Hall</dc:creator>
      <dc:date>2025-05-17T04:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Connection in Vault 2026 with .net 8</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/sql-connection-in-vault-2026-with-net-8/m-p/13636808#M18</link>
      <description>&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;P&gt;This worked for me too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7162092"&gt;@Nick_Hall&lt;/a&gt;: Could you provide any source, how you figured that out?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 May 2025 06:28:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/sql-connection-in-vault-2026-with-net-8/m-p/13636808#M18</guid>
      <dc:creator>matt_mwe</dc:creator>
      <dc:date>2025-05-19T06:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Connection in Vault 2026 with .net 8</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/sql-connection-in-vault-2026-with-net-8/m-p/13639012#M19</link>
      <description>&lt;P&gt;Hi Matt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I started with this search - "Microsoft.Data.SqlClient is not supported on this platform"- from one error message I got when debugging.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This led me to this article -&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/answers/questions/1663112/microsoft-data-sqlclient-5-2-0-fails-to-work-with" target="_blank"&gt;https://learn.microsoft.com/en-us/answers/questions/1663112/microsoft-data-sqlclient-5-2-0-fails-to-work-with.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is a reply from&amp;nbsp;Tacito Fieker (it's first when you order by "most helpful") which says&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;It was necessary to copy the file: "....nuget\packages\microsoft.data.sqlclient\5.2.2\runtimes\win\lib\net8.0\Microsft.Data.SQLClient.dll" to the BIN folder.&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;I also needed to copy: Microsoft.Data.SqlClient.SNI.dll &amp;amp;&amp;nbsp;Microsoft.Identity.Client.dll&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I dug around in&amp;nbsp;&lt;SPAN&gt;%USERPROFILE%\.nuget and found the files I thought I would need. After some trial &amp;amp; error, I ended up with just the two I noted before.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It wasn't as quick as that description sounds, though. I went down the wrong path a few times before I got there.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Nick&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 May 2025 20:52:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/sql-connection-in-vault-2026-with-net-8/m-p/13639012#M19</guid>
      <dc:creator>Nick_Hall</dc:creator>
      <dc:date>2025-05-19T20:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Connection in Vault 2026 with .net 8</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/sql-connection-in-vault-2026-with-net-8/m-p/13639557#M20</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7162092"&gt;@Nick_Hall&lt;/a&gt;&amp;nbsp;Thank you for providing that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Interesting enough that you have to use the packages from the .nuget folder. I tried it with the DLL's from a dummy console application that referenced `&lt;/SPAN&gt;&lt;SPAN&gt;Microsoft.Data.SqlClient&lt;/SPAN&gt;&lt;SPAN&gt;` without success.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 May 2025 06:15:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/sql-connection-in-vault-2026-with-net-8/m-p/13639557#M20</guid>
      <dc:creator>matt_mwe</dc:creator>
      <dc:date>2025-05-20T06:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Connection in Vault 2026 with .net 8</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/sql-connection-in-vault-2026-with-net-8/m-p/13739856#M12935</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14972938"&gt;@matt_mwe&lt;/a&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7162092"&gt;@Nick_Hall&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found a cleaner solution and an explanation why Nicks solution works.&lt;BR /&gt;&lt;BR /&gt;There are two things.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;1)&amp;nbsp;&amp;lt;CopyLocalLockFileAssemblies&amp;gt;true&amp;lt;/CopyLocalLockFileAssemblies&amp;gt; add in your .csproj&lt;BR /&gt;&lt;/STRONG&gt;&amp;nbsp;- OutputType Library by default does not copy dependencies to OutDir (Which makes sense, bcease this should only happen in the application that uses the library - there all dependencies should be copied). But because we build plugins, we need all dependencies with our library. This is what the Property&amp;nbsp;&lt;STRONG&gt;CopyLocalLockFileAssemblies &lt;/STRONG&gt;does.&lt;/P&gt;&lt;P&gt;&amp;nbsp;- There is also property&amp;nbsp;EnableDynamicLoading, which does the same thing and a bit more:&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#enabledynamicloading" target="_blank"&gt;https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#enabledynamicloading&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;2)&amp;nbsp;&lt;STRONG&gt;&amp;lt;RuntimeIdentifier&amp;gt;win-x64&amp;lt;/RuntimeIdentifier&amp;gt;&amp;nbsp;add in your .csproj&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;When you reference a nuget like Microsoft.Data.SqlClient, which includes native and runtime platform specific dlls which are now (when we use&amp;nbsp;&lt;STRONG&gt;CopyLocalLockFileAssemblies)&lt;/STRONG&gt;copied to outdir\runtimes directory. We need to tell the compiler which runtime dlls to copy to outdir thats where &lt;STRONG&gt;RuntimeIdentifier &lt;/STRONG&gt;comes in.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TLDR;&lt;/P&gt;&lt;P&gt;add this to your csproj&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;CopyLocalLockFileAssemblies&amp;gt;true&amp;lt;/CopyLocalLockFileAssemblies&amp;gt;
&amp;lt;RuntimeIdentifier&amp;gt;win-x64&amp;lt;/RuntimeIdentifier&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result is that both dlls that Nick mentions in his solution are automatically copied to outdir.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2025 11:34:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/sql-connection-in-vault-2026-with-net-8/m-p/13739856#M12935</guid>
      <dc:creator>david.siegert63GB8</dc:creator>
      <dc:date>2025-07-25T11:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Connection in Vault 2026 with .net 8</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/sql-connection-in-vault-2026-with-net-8/m-p/13745192#M12942</link>
      <description>&lt;P&gt;Thanks, David, that's really useful to know.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would be helpful to have this information in the Vault SDK Help. Maybe&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/33301"&gt;@Markus.Koechl&lt;/a&gt;&amp;nbsp;can help with that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jul 2025 20:06:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/sql-connection-in-vault-2026-with-net-8/m-p/13745192#M12942</guid>
      <dc:creator>Nick_Hall</dc:creator>
      <dc:date>2025-07-29T20:06:00Z</dc:date>
    </item>
  </channel>
</rss>

