1919 <WarningsNotAsErrors >$(WarningsNotAsErrors);FS0026;FS3218;FS3548</WarningsNotAsErrors >
2020 <DisableImplicitFSharpCoreReference >true</DisableImplicitFSharpCoreReference >
2121 <DisableImplicitSystemValueTupleReference >true</DisableImplicitSystemValueTupleReference >
22- <DefineConstants >$(DefineConstants);DESIGNTIME_CODE_ONLY;IS_DESIGNTIME;WITH_LEGACY_NAMESPACE</DefineConstants >
22+ <DefineConstants >$(DefineConstants);DESIGNTIME_CODE_ONLY;IS_DESIGNTIME;WITH_LEGACY_NAMESPACE;USE_SYSTEM_DATA_COMMON_DBPROVIDERFACTORIES </DefineConstants >
2323 </PropertyGroup >
2424 <ItemGroup >
2525 <!--
7474 <None Include =" Scripts\ReverseLineOrderForNotex.fsx" />
7575 <None Include =" Scripts\XE.fsx" />
7676 </ItemGroup >
77+ <!--
78+ Type providers execute at compile-time, so the design-time output folder must
79+ contain real implementation assemblies, not the portable/reference "bait" stubs.
80+ Microsoft.Data.SqlClient (and a few others) ship bait-and-switch: the lib/net9.0
81+ assembly throws PlatformNotSupportedException; the real code lives under
82+ runtimes/{rid}/lib/net9.0/. After build, overwrite the bait with the correct
83+ RID-specific implementation so the TP host can actually open SQL connections.
84+ -->
7785 <Target Name =" CopyAssembliesToTPFolder" AfterTargets =" Build" >
86+ <PropertyGroup >
87+ <_TPRid Condition =" $([MSBuild]::IsOSPlatform('Linux'))" >unix</_TPRid >
88+ <_TPRid Condition =" $([MSBuild]::IsOSPlatform('OSX'))" >unix</_TPRid >
89+ <_TPRid Condition =" $([MSBuild]::IsOSPlatform('Windows'))" >win</_TPRid >
90+ <_TPOutputDir >$(TargetDir)</_TPOutputDir >
91+ <_TPRuntimeDir >$(_TPOutputDir)runtimes/$(_TPRid)/lib/$(TargetFramework)</_TPRuntimeDir >
92+ </PropertyGroup >
93+ <ItemGroup >
94+ <_RidSpecificAssemblies Include =" $(_TPRuntimeDir)/*.dll" />
95+ </ItemGroup >
96+ <Message Importance =" high" Text =" TP RID copy: $(_TPRuntimeDir) -> $(_TPOutputDir)" />
97+ <Copy SourceFiles =" @(_RidSpecificAssemblies)"
98+ DestinationFolder =" $(_TPOutputDir)"
99+ OverwriteReadOnlyFiles =" true"
100+ SkipUnchangedFiles =" false"
101+ Condition =" Exists('$(_TPRuntimeDir)')" />
78102 </Target >
79103 <Import Project =" ..\..\.paket\Paket.Restore.targets" />
80104</Project >
0 commit comments