Skip to content

Commit 5ce18c7

Browse files
committed
Merge branch 'master' of https://github.com/fsharp/FSharp.Compiler.Service into integrate-82
2 parents 48c6a86 + c6499c0 commit 5ce18c7

File tree

7 files changed

+41
-17
lines changed

7 files changed

+41
-17
lines changed

build.fsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ Target "GenerateFSIStrings" (fun _ ->
8282
p.WorkingDirectory <- dir
8383
p.FileName <- !! "packages/FsSrGen/lib/net46/fssrgen.exe" |> Seq.head ) TimeSpan.MaxValue
8484
|> ignore
85+
// execProcess (fun p ->
86+
// p.Arguments <- "u+x packages/FsSrGen/lib/net46/fssrgen.exe"
87+
// p.WorkingDirectory <- __SOURCE_DIRECTORY__
88+
// p.FileName <- "chmod") TimeSpan.MaxValue
89+
// |> ignore
8590
)
8691

8792
Target "Build" (fun _ ->

nuget/paket.template

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,7 @@ files
1818
../bin/v4.5/FSharp.Compiler.Service.dll ==> lib/net45
1919
../bin/v4.5/FSharp.Compiler.Service.xml ==> lib/net45
2020
../bin/v4.5/FSharp.Compiler.Service.?db ==> lib/net45
21-
../bin/v4.5/FSharp.Compiler.Service.dll.?db ==> lib/net45
21+
../bin/v4.5/FSharp.Compiler.Service.dll.?db ==> lib/net45
22+
dependencies
23+
System.Collections.Immutable >= LOCKEDVERSION
24+
System.Reflection.Metadata >= LOCKEDVERSION

src/fsharp/FSharp.Compiler.Service.ProjectCrackerTool/App.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
88
<dependentAssembly>
99
<assemblyIdentity name="Microsoft.Build.Framework" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
10-
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
10+
<bindingRedirect oldVersion="0.0.0.0-14.0.0.0" newVersion="14.0.0.0" />
1111
</dependentAssembly>
1212
<dependentAssembly>
1313
<assemblyIdentity name="Microsoft.Build.Engine" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
14-
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
14+
<bindingRedirect oldVersion="0.0.0.0-14.0.0.0" newVersion="14.0.0.0" />
1515
</dependentAssembly>
1616
<dependentAssembly>
1717
<assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />

src/fsharp/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,20 +63,21 @@
6363
<None Include="FSharp.Compiler.Service.ProjectCracker.targets" />
6464
</ItemGroup>
6565
<ItemGroup>
66-
<Reference Include="Microsoft.Build.Framework" Condition=" '$(TargetFrameworkVersion)' == 'v4.0'" />
67-
<Reference Include="Microsoft.Build.Engine" Condition=" '$(TargetFrameworkVersion)' == 'v4.0'" />
68-
<Reference Include="Microsoft.Build" Condition=" '$(TargetFrameworkVersion)' == 'v4.0'" />
69-
<Reference Include="Microsoft.Build.Utilities.v4.0" Condition=" '$(TargetFrameworkVersion)' == 'v4.0'" />
70-
<Reference Include="Microsoft.Build.Framework, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Condition=" '$(TargetFrameworkVersion)' == 'v4.5'">
66+
<Reference Include="Microsoft.Build.Framework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
7167
<SpecificVersion>True</SpecificVersion>
68+
<Private>True</Private>
7269
</Reference>
73-
<Reference Include="Microsoft.Build.Engine, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Condition=" '$(TargetFrameworkVersion)' == 'v4.5'">
70+
<Reference Include="Microsoft.Build.Engine, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
7471
<SpecificVersion>True</SpecificVersion>
72+
<Private>True</Private>
7573
</Reference>
76-
<Reference Include="Microsoft.Build, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Condition=" '$(TargetFrameworkVersion)' == 'v4.5'">
74+
<Reference Include="Microsoft.Build, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
7775
<SpecificVersion>True</SpecificVersion>
76+
<Private>True</Private>
77+
</Reference>
78+
<Reference Include="Microsoft.Build.Utilities.v12.0">
79+
<Private>True</Private>
7880
</Reference>
79-
<Reference Include="Microsoft.Build.Utilities.v12.0" Condition=" '$(TargetFrameworkVersion)' == 'v4.5'" />
8081
<Reference Include="mscorlib" />
8182
<Reference Include="FSharp.Core, Version=$(TargetFSharpCoreVersion), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
8283
<Private>False</Private>

src/fsharp/FSharp.Compiler.Service.ProjectCrackerTool/ProjectCrackerTool.fs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,10 @@ module internal ProjectCrackerTool =
432432
let requestedAssembly = AssemblyName(evArgs.Name)
433433
if requestedAssembly.Name.StartsWith("Microsoft.Build") &&
434434
not (requestedAssembly.Name.EndsWith(".resources")) then
435-
requestedAssembly.Version <- Version("14.0.0.0")
435+
// If the version of MSBuild that we're using wasn't present on the machine, then
436+
// just revert back to 12.0.0.0 since that's normally installed as part of the .NET
437+
// Framework.
438+
requestedAssembly.Version <- Version("12.0.0.0")
436439
Assembly.Load (requestedAssembly)
437440
else
438441
null)

src/fsharp/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@
4949
<DefineConstants>$(DefineConstants);NO_STRONG_NAMES</DefineConstants>
5050
<DefineConstants>$(DefineConstants);TRACE</DefineConstants>
5151
<TargetFSharpCoreVersion>4.4.0.0</TargetFSharpCoreVersion>
52-
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\..\</SolutionDir>
52+
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\..\..\</SolutionDir>
5353
<TargetFrameworkProfile />
5454
</PropertyGroup>
5555
<PropertyGroup>
56-
<FsLexYaccPath>..\..\..\lib\bootstrap\4.0</FsLexYaccPath>
57-
<FsSrGenToolPath>..\..\..\packages\FsSrGen\lib\net46</FsSrGenToolPath>
56+
<FsLexYaccPath>$(SolutionDir)lib\bootstrap\4.0</FsLexYaccPath>
57+
<FsSrGenToolPath>$(SolutionDir)packages\FsSrGen\lib\net46</FsSrGenToolPath>
5858
<FsLexToolPath>$(FsLexYaccPath)</FsLexToolPath>
5959
<FsYaccToolPath>$(FsLexYaccPath)</FsYaccToolPath>
6060
<FsLexToolExe>fslex.exe</FsLexToolExe>
@@ -661,7 +661,7 @@
661661
<Target Name="AfterBuild" Condition="Exists('..\..\..\.paket\paket.exe')">
662662
<CopyRuntimeDependencies OutputPath="$(OutDir)" TargetFramework="$(TargetFrameworkIdentifier) - $(TargetFrameworkVersion)" ProjectsWithRuntimeLibs="System.Threading" />
663663
</Target>
664-
<Import Project="$(SolutionDir)\packages\FSharp.SRGen.Build.Tasks.$(FsSrGenBuildTasksVersion)\content\FSharp.SRGen.targets" />
664+
<Import Project="$(SolutionDir)\packages\FSharp.SRGen.Build.Tasks\content\FSharp.SRGen.targets" />
665665
<Import Project="$(FsLexYaccPath)\FsLexYacc.targets" />
666666
<Import Project="$(SolutionDir)\.paket\paket.targets" />
667667
<Choose>

tests/service/ProjectOptionsTests.fs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ let ``Project file parsing VS2013_FSharp_Portable_Library_net45``() =
9595
[<Test>]
9696
let ``Project file parsing Sample_VS2013_FSharp_Portable_Library_net451_adjusted_to_profile78``() =
9797
let projectFile = __SOURCE_DIRECTORY__ + @"/../projects/Sample_VS2013_FSharp_Portable_Library_net451_adjusted_to_profile78/Sample_VS2013_FSharp_Portable_Library_net451.fsproj"
98+
Directory.SetCurrentDirectory(__SOURCE_DIRECTORY__ + @"/../projects/Sample_VS2013_FSharp_Portable_Library_net451_adjusted_to_profile78/")
9899
let options = ProjectCracker.GetProjectOptionsFromProjectFile(projectFile, [])
99100

100101
checkOption options.OtherOptions "--targetprofile:netcore"
@@ -207,7 +208,7 @@ let ``Project file parsing -- Logging``() =
207208
Assert.That(log, Is.StringContaining("Reference System.Core resolved"))
208209
Assert.That(log, Is.StringContaining("Using task ResolveAssemblyReference from Microsoft.Build.Tasks.ResolveAssemblyReference"))
209210
else
210-
Assert.That(log, Is.StringContaining("""Using "ResolveAssemblyReference" task from assembly "Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"."""))
211+
Assert.That(log, Is.StringContaining("""Using "ResolveAssemblyReference" task from assembly "Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"."""))
211212

212213
[<Test>]
213214
let ``Project file parsing -- Full path``() =
@@ -409,5 +410,16 @@ let ``Project file parsing -- space in file name``() =
409410
|> set
410411
|> should equal (set [ "Test2File1.fs"; "Test2File2.fs" ])
411412

413+
[<Test>]
414+
let ``Project file parsing -- report files``() =
415+
if not runningOnMono then
416+
for f in Directory.EnumerateFiles(@"C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\","*",SearchOption.AllDirectories) do
417+
printfn "File: %s" f
418+
for f in Directory.EnumerateFiles(@"C:\Program Files (x86)\Microsoft SDKs\F#\4.0\","*",SearchOption.AllDirectories) do
419+
printfn "File: %s" f
420+
421+
412422
#endif
413423

424+
425+

0 commit comments

Comments
 (0)