Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitaeeed79

Browse files
authored
Warn on use of inbox TP (#5060)
1 parent96c6843 commitaeeed79

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

‎src/fsharp/FSharp.Build/Microsoft.FSharp.Targets‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,17 @@ this file.
465465
</PropertyGroup>
466466

467467
<ItemGroup>
468+
<!-- Issue warning message if there is an inbox TypeProvider referenced.-->
469+
<ReferenceToInboxTPInclude="@(Reference)"
470+
Condition="'%(Reference.Identity)' == 'FSharp.Data.TypeProviders' and
471+
'%(Reference.HintPath)' == '$(_OldRefAssemTPLocation)' and
472+
Exists('$(NewFSharpCompilerLocation)FSharp.Data.TypeProviders.dll')" />
473+
<ReferenceToInboxTPInclude="@(Reference)"
474+
Condition="'%(Reference.Identity)' == 'FSharp.Data.TypeProviders' and
475+
$([System.String]::new('%(Reference.HintPath)').StartsWith('$(_OldSdkTPLocationPrefix)', System.StringComparison.OrdinalIgnoreCase)) and
476+
$([System.String]::new('%(Reference.HintPath)').EndsWith('$(_OldSdkTPLocationSuffix)', System.StringComparison.OrdinalIgnoreCase)) and
477+
Exists('$(NewFSharpCompilerLocation)FSharp.Data.TypeProviders.dll')" />
478+
468479
<!-- Update references to FSharp.Data.TypeProviders.dll-->
469480
<ReferenceCondition="'%(Reference.Identity)' == 'FSharp.Data.TypeProviders' and
470481
'%(Reference.HintPath)' == '$(_OldRefAssemTPLocation)' and
@@ -480,10 +491,11 @@ this file.
480491

481492
<HintPath>$(NewFSharpCompilerLocation)FSharp.Data.TypeProviders.dll</HintPath>
482493
</Reference>
483-
484494
</ItemGroup>
495+
<Warning
496+
Text="This Project references the obsolete in-box TypeProvider: FSharp.Data.TypeProviders.dll. Consider Switching to the Nuget package version: https://www.nuget.org/packages/FSharp.Data.TypeProviders."
497+
Condition=" '@(ReferenceToInboxTP->Count())' != '0'" />
485498
</Target>
486499

487500
<ImportProject="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\$(MSBuildThisFile)\ImportAfter\*"Condition="'$(ImportByWildcardAfterMicrosoftFSharpTargets)' == 'true' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\$(MSBuildThisFile)\ImportAfter')"/>
488-
489501
</Project>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp