Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ Target "GenerateFSIStrings" (fun _ ->
p.WorkingDirectory <- dir
p.FileName <- !! "packages/FsSrGen/lib/net46/fssrgen.exe" |> Seq.head ) TimeSpan.MaxValue
|> ignore
// execProcess (fun p ->
// p.Arguments <- "u+x packages/FsSrGen/lib/net46/fssrgen.exe"
// p.WorkingDirectory <- __SOURCE_DIRECTORY__
// p.FileName <- "chmod") TimeSpan.MaxValue
// |> ignore
)

Target "Build" (fun _ ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.Build.Framework" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-14.0.0.0" newVersion="14.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Build.Engine" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-14.0.0.0" newVersion="14.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@
<Reference Include="Microsoft.Build.Engine" Condition=" '$(TargetFrameworkVersion)' == 'v4.0'" />
<Reference Include="Microsoft.Build" Condition=" '$(TargetFrameworkVersion)' == 'v4.0'" />
<Reference Include="Microsoft.Build.Utilities.v4.0" Condition=" '$(TargetFrameworkVersion)' == 'v4.0'" />
<Reference Include="Microsoft.Build.Framework, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Condition=" '$(TargetFrameworkVersion)' == 'v4.5'">
<Reference Include="Microsoft.Build.Framework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Condition=" '$(TargetFrameworkVersion)' == 'v4.5'">
<SpecificVersion>True</SpecificVersion>
</Reference>
<Reference Include="Microsoft.Build.Engine, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Condition=" '$(TargetFrameworkVersion)' == 'v4.5'">
<Reference Include="Microsoft.Build.Engine, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Condition=" '$(TargetFrameworkVersion)' == 'v4.5'">
<SpecificVersion>True</SpecificVersion>
</Reference>
<Reference Include="Microsoft.Build, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Condition=" '$(TargetFrameworkVersion)' == 'v4.5'">
<Reference Include="Microsoft.Build, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Condition=" '$(TargetFrameworkVersion)' == 'v4.5'">
<SpecificVersion>True</SpecificVersion>
</Reference>
<Reference Include="Microsoft.Build.Utilities.v12.0" Condition=" '$(TargetFrameworkVersion)' == 'v4.5'" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@
<DefineConstants>$(DefineConstants);NO_STRONG_NAMES</DefineConstants>
<DefineConstants>$(DefineConstants);TRACE</DefineConstants>
<TargetFSharpCoreVersion>4.4.0.0</TargetFSharpCoreVersion>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\..\</SolutionDir>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\..\..\</SolutionDir>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup>
<FsLexYaccPath>..\..\..\lib\bootstrap\4.0</FsLexYaccPath>
<FsSrGenToolPath>..\..\..\packages\FsSrGen\lib\net46</FsSrGenToolPath>
<FsLexYaccPath>$(SolutionDir)lib\bootstrap\4.0</FsLexYaccPath>
<FsSrGenToolPath>$(SolutionDir)packages\FsSrGen\lib\net46</FsSrGenToolPath>
<FsLexToolPath>$(FsLexYaccPath)</FsLexToolPath>
<FsYaccToolPath>$(FsLexYaccPath)</FsYaccToolPath>
<FsLexToolExe>fslex.exe</FsLexToolExe>
Expand Down Expand Up @@ -661,7 +661,7 @@
<Target Name="AfterBuild" Condition="Exists('..\..\..\.paket\paket.exe')">
<CopyRuntimeDependencies OutputPath="$(OutDir)" TargetFramework="$(TargetFrameworkIdentifier) - $(TargetFrameworkVersion)" ProjectsWithRuntimeLibs="System.Threading" />
</Target>
<Import Project="$(SolutionDir)\packages\FSharp.SRGen.Build.Tasks.$(FsSrGenBuildTasksVersion)\content\FSharp.SRGen.targets" />
<Import Project="$(SolutionDir)\packages\FSharp.SRGen.Build.Tasks\content\FSharp.SRGen.targets" />
<Import Project="$(FsLexYaccPath)\FsLexYacc.targets" />
<Import Project="$(SolutionDir)\.paket\paket.targets" />
<Choose>
Expand Down
14 changes: 13 additions & 1 deletion tests/service/ProjectOptionsTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ let ``Project file parsing VS2013_FSharp_Portable_Library_net45``() =
[<Test>]
let ``Project file parsing Sample_VS2013_FSharp_Portable_Library_net451_adjusted_to_profile78``() =
let projectFile = __SOURCE_DIRECTORY__ + @"/../projects/Sample_VS2013_FSharp_Portable_Library_net451_adjusted_to_profile78/Sample_VS2013_FSharp_Portable_Library_net451.fsproj"
Directory.SetCurrentDirectory(__SOURCE_DIRECTORY__ + @"/../projects/Sample_VS2013_FSharp_Portable_Library_net451_adjusted_to_profile78/")
let options = ProjectCracker.GetProjectOptionsFromProjectFile(projectFile, [])

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

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

[<Test>]
let ``Project file parsing -- report files``() =
if not runningOnMono then
for f in Directory.EnumerateFiles(@"C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\","*",SearchOption.AllDirectories) do
printfn "File: %s" f
for f in Directory.EnumerateFiles(@"C:\Program Files (x86)\Microsoft SDKs\F#\4.0\","*",SearchOption.AllDirectories) do
printfn "File: %s" f


#endif