Skip to content

Commit bd9cf35

Browse files
authored
Merge pull request fsharp#680 from 0x53A/0x53A-patch-1
FSharp.Compiler.Tools: set FSharpTargetsPath when using the old SDK
2 parents 755d1b1 + ba70153 commit bd9cf35

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

FSharp.Compiler.Tools.Nuget/FSharp.Compiler.Tools.nuspec

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@
5252
<!-- Microsoft.FSharp.targets : Used in the source tree as of 08/04/2016 (prior this was Microsoft.FSharp.Targets) -->
5353

5454
<file src="..\Release\net40\bin\Microsoft.FSharp.Targets" target="tools\Microsoft.FSharp.Targets" />
55+
56+
<!-- Microsoft.Portable.FSharp.targets: used in source tree -->
57+
<!-- Microsoft.Portable.FSharp.Targets: imported by project templates -->
58+
<file src="..\Release\net40\bin\Microsoft.Portable.FSharp.targets" target="tools\Microsoft.Portable.FSharp.Targets" />
59+
5560
<file src="..\Release\net40\bin\Microsoft.Build.dll" target="tools\Microsoft.Build.dll" />
5661
<file src="..\Release\net40\bin\Microsoft.Build.Engine.dll" target="tools\Microsoft.Build.Engine.dll" />
5762
<file src="..\Release\net40\bin\Microsoft.Build.Framework.dll" target="tools\Microsoft.Build.Framework.dll" />

FSharp.Compiler.Tools.Nuget/build/FSharp.Compiler.Tools.props

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ WARNING: You CAN MODIFY this file, doesnt matter if you are not knowledgeable a
2424

2525
</PropertyGroup>
2626

27+
28+
<!-- ref https://github.com/dotnet/standard/blob/master/Microsoft.Packaging.Tools/tasks/targets/Microsoft.Packaging.Tools.targets#L12 -->
29+
<!-- Condition here is a hack until https://github.com/dotnet/sdk/issues/534 is fixed -->
30+
<PropertyGroup Condition="'$(TargetFramework)' == '' and '$(TargetFrameworks)' == ''">
31+
<!-- when using the old SDK, override FSharpTargetsPath and PortableFSharpTargetsPath -->
32+
<FSharpTargetsPath>$(MSBuildThisFileDirectory)../tools/Microsoft.FSharp.Targets</FSharpTargetsPath>
33+
<PortableFSharpTargetsPath>$(MSBuildThisFileDirectory)../tools/Microsoft.Portable.FSharp.Targets</PortableFSharpTargetsPath>
34+
</PropertyGroup>
35+
2736
<Choose>
2837
<When Condition="'$(MSBuildRuntimeType)' == 'Core'">
2938
<PropertyGroup>
@@ -43,4 +52,4 @@ WARNING: You CAN MODIFY this file, doesnt matter if you are not knowledgeable a
4352
</Otherwise>
4453
</Choose>
4554

46-
</Project>
55+
</Project>

0 commit comments

Comments
 (0)