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

Commit96c6843

Browse files
authored
Enable redirection of hintpath for projects using the inbox type provider (#5047)
* Add support for remapping Inbox TP* Enable redirection of inbox type providr* Feedback* More feedback* TrailingBackslash
1 parentab2f039 commit96c6843

File tree

3 files changed

+39
-5
lines changed

3 files changed

+39
-5
lines changed

‎packages.config‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
<packageid="BenchmarkDotNet"version="0.9.8"/>
3535
<packageid="BenchmarkDotNet.Diagnostics.Windows"version="0.9.8"/>
3636
<packageid="Newtonsoft.Json"version="9.0.1"/>
37+
<packageid="Microsoft.VisualFSharp.Type.Providers.Redist"version="1.0.0" />
3738
<packageid="Microsoft.FSharp.TupleSample"version="1.0.0-alpha-161121"/>
3839
<packageid="Microsoft.VSSDK.BuildTools"version="15.1.192" />
3940

‎src/fsharp/FSharp.Build/FSharp.Build.fsproj‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@
5959
<ReferenceInclude="Microsoft.Build.Tasks.Core, Version=$(VisualStudioVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
6060
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Tasks.Core.dll</HintPath>
6161
</Reference>
62+
<ReferenceInclude="FSharp.Data.TypeProviders.dll, Version=4.3.0.0">
63+
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Type.Providers.Redist.$(MicrosoftVisualFSharpTypeProvidersRedistPackageVersion)\content\4.3.0.0\FSharp.Data.TypeProviders.dll</HintPath>
64+
</Reference>
6265
</ItemGroup>
6366
<ItemGroupCondition=" '$(TargetDotnetProfile)' != 'coreclr' AND '$(MonoPackaging)' == 'true'">
6467
<ReferenceInclude="Microsoft.Build.Framework, Version=$(MonoPackagingMSBuildVersionFull), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">

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

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,6 @@ this file.
401401
</Target>
402402

403403
<!--
404-
405404
The old reference assemblies are no longer installed to `Program Files (x86)\Reference Assemblies\Microsoft\FSharp`.
406405
407406
To avoid breaking legacy projects the hint path for FSharp.Core will be rewritten if and only if the existing hint
@@ -411,23 +410,24 @@ this file.
411410
<TargetName="RedirectFSharpCoreReferenceToNewRedistributableLocation"BeforeTargets="ResolveAssemblyReferences">
412411
<PropertyGroup>
413412
<_OldRootSdkLocation>$(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\FSharp</_OldRootSdkLocation>
414-
<_NewRootSdkLocation>$(VsInstallRoot)\Common7\IDE\CommonExtensions\Microsoft\FSharpSdk</_NewRootSdkLocation>
413+
414+
<NewFSharpSdkLocationCondition=" '$(NewFSharpSdkLocation)' == ''">$(VsInstallRoot)\Common7\IDE\CommonExtensions\Microsoft\FSharpSdk</NewFSharpSdkLocation>
415415

416416
<_CoreRelativeSuffix>.NETCore\$(TargetFSharpCoreVersion)\FSharp.Core.dll</_CoreRelativeSuffix>
417417
<_FrameworkRelativeSuffix>.NETFramework\v4.0\$(TargetFSharpCoreVersion)\FSharp.Core.dll</_FrameworkRelativeSuffix>
418418
<_PortableRelativeSuffix>.NETPortable\$(TargetFSharpCoreVersion)\FSharp.Core.dll</_PortableRelativeSuffix>
419419

420420
<!-- .NETCore-->
421421
<_OldCoreSdkPath>$(_OldRootSdkLocation)\$(_CoreRelativeSuffix)</_OldCoreSdkPath>
422-
<_NewCoreSdkPath>$(_NewRootSdkLocation)\$(_CoreRelativeSuffix)</_NewCoreSdkPath>
422+
<_NewCoreSdkPath>$(NewFSharpSdkLocation)\$(_CoreRelativeSuffix)</_NewCoreSdkPath>
423423

424424
<!-- .NETFramework\v4.0-->
425425
<_OldFrameworkSdkPath>$(_OldRootSdkLocation)\$(_FrameworkRelativeSuffix)</_OldFrameworkSdkPath>
426-
<_NewFrameworkSdkPath>$(_NewRootSdkLocation)\$(_FrameworkRelativeSuffix)</_NewFrameworkSdkPath>
426+
<_NewFrameworkSdkPath>$(NewFSharpSdkLocation)\$(_FrameworkRelativeSuffix)</_NewFrameworkSdkPath>
427427

428428
<!-- .NETPortable-->
429429
<_OldPortableSdkPath>$(_OldRootSdkLocation)\$(_PortableRelativeSuffix)</_OldPortableSdkPath>
430-
<_NewPortableSdkPath>$(_NewRootSdkLocation)\$(_PortableRelativeSuffix)</_NewPortableSdkPath>
430+
<_NewPortableSdkPath>$(NewFSharpSdkLocation)\$(_PortableRelativeSuffix)</_NewPortableSdkPath>
431431
</PropertyGroup>
432432

433433
<ItemGroup>
@@ -454,6 +454,36 @@ this file.
454454
</ItemGroup>
455455
</Target>
456456

457+
<TargetName="RedirectTPReferenceToNewRedistributableLocation"BeforeTargets="ResolveAssemblyReferences">
458+
<PropertyGroup>
459+
<_OldRefAssemTPLocation>$(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.3.0.0\Type Providers\FSharp.Data.TypeProviders.dll</_OldRefAssemTPLocation>
460+
<_OldSdkTPLocationPrefix>$(MSBuildProgramFiles32)\Microsoft SDKs\F#</_OldSdkTPLocationPrefix>
461+
<_OldSdkTPLocationSuffix>Framework\v4.0\FSharp.Data.TypeProviders.dll</_OldSdkTPLocationSuffix>
462+
463+
<NewFSharpCompilerLocationCondition=" '$(NewFSharpCompilerLocation)' == ''">$(MSBuildThisFileDirectory)</NewFSharpCompilerLocation>
464+
<NewFSharpCompilerLocationCondition=" !HasTrailingSlash('$(NewFSharpCompilerLocation)')">$(NewFSharpCompilerLocation)\</NewFSharpCompilerLocation>
465+
</PropertyGroup>
466+
467+
<ItemGroup>
468+
<!-- Update references to FSharp.Data.TypeProviders.dll-->
469+
<ReferenceCondition="'%(Reference.Identity)' == 'FSharp.Data.TypeProviders' and
470+
'%(Reference.HintPath)' == '$(_OldRefAssemTPLocation)' and
471+
Exists('$(NewFSharpCompilerLocation)FSharp.Data.TypeProviders.dll')">
472+
<HintPath>$(NewFSharpCompilerLocation)FSharp.Data.TypeProviders.dll</HintPath>
473+
</Reference>
474+
475+
<!-- Update references to FSharp.Data.TypeProviders.dll-->
476+
<ReferenceCondition="'%(Reference.Identity)' == 'FSharp.Data.TypeProviders' and
477+
$([System.String]::new('%(Reference.HintPath)').StartsWith('$(_OldSdkTPLocationPrefix)', System.StringComparison.OrdinalIgnoreCase)) and
478+
$([System.String]::new('%(Reference.HintPath)').EndsWith('$(_OldSdkTPLocationSuffix)', System.StringComparison.OrdinalIgnoreCase)) and
479+
Exists('$(NewFSharpCompilerLocation)FSharp.Data.TypeProviders.dll')">
480+
481+
<HintPath>$(NewFSharpCompilerLocation)FSharp.Data.TypeProviders.dll</HintPath>
482+
</Reference>
483+
484+
</ItemGroup>
485+
</Target>
486+
457487
<ImportProject="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\$(MSBuildThisFile)\ImportAfter\*"Condition="'$(ImportByWildcardAfterMicrosoftFSharpTargets)' == 'true' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\$(MSBuildThisFile)\ImportAfter')"/>
458488

459489
</Project>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp