Skip to content

Commit a1ae9f0

Browse files
committed
Merge pull request #506 from dsyme/fix-build-1
fix build on master
2 parents 990085b + e5a7a46 commit a1ae9f0

File tree

6 files changed

+42
-25
lines changed

6 files changed

+42
-25
lines changed

FSharp.Compiler.Service.sln

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
Microsoft Visual Studio Solution File, Format Version 12.00
22
# Visual Studio 14
33
VisualStudioVersion = 14.0.24720.0
4-
VisualStudioVersion = 14.0.23107.0
54
MinimumVisualStudioVersion = 10.0.40219.1
65
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "project", "project", "{B6B68AE6-E7A4-4D43-9B34-FFA74BFE192B}"
76
ProjectSection(SolutionItems) = preProject
@@ -54,11 +53,12 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Service.Tes
5453
{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3} = {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}
5554
EndProjectSection
5655
EndProject
57-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fsc", "samples\FscExe\Fsc.fsproj", "{C94C257C-3C0A-4858-B5D8-D746498D1F08}"
56+
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FscExe", "samples\FscExe\FscExe.fsproj", "{C94C257C-3C0A-4858-B5D8-D746498D1F08}"
5857
EndProject
5958
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharp_Analysis", "tests\service\data\CSharp_Analysis\CSharp_Analysis.csproj", "{887630A3-4B1D-40EA-B8B3-2D842E9C40DB}"
6059
EndProject
6160
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsiExe", "samples\FsiExe\FsiExe.fsproj", "{F9540CA8-1CE0-4546-A23A-A461E416E95B}"
61+
EndProject
6262
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Service.ProjectCrackerTool", "src\fsharp\FSharp.Compiler.Service.ProjectCrackerTool\FSharp.Compiler.Service.ProjectCrackerTool.fsproj", "{B1BDD96D-47E1-4E65-8107-FBAE23A06DB4}"
6363
EndProject
6464
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Service.ProjectCracker", "src\fsharp\FSharp.Compiler.Service.ProjectCracker\FSharp.Compiler.Service.ProjectCracker.fsproj", "{893C3CD9-5AF8-4027-A667-21E62FC2C703}"

build.fsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,8 @@ Target "GenerateFSIStrings" (fun _ ->
8787
Target "Build" (fun _ ->
8888
netFrameworks
8989
|> List.iter (fun framework ->
90-
let outputPath = buildDir </> framework
9190
!! (project + ".sln")
92-
|> MSBuild outputPath "Build" ["Configuration","Release"; "TargetFrameworkVersion", framework]
91+
|> MSBuild "" "Build" ["Configuration","Release"; "TargetFrameworkVersion", framework]
9392
|> Log (".NET " + framework + " Build-Output: "))
9493
)
9594

samples/FscExe/App.config

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<runtime>
4+
<legacyUnhandledExceptionPolicy enabled="true" />
5+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
6+
<dependentAssembly>
7+
<assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
8+
<bindingRedirect oldVersion="2.0.0.0-4.3.0.0" newVersion="4.3.1.0" />
9+
</dependentAssembly>
10+
</assemblyBinding>
11+
</runtime>
12+
<startup>
13+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
14+
</startup>
15+
</configuration>
Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,24 @@
4242
<DocumentationFile>bin\Release\FsiExe.xml</DocumentationFile>
4343
<Prefer32Bit>true</Prefer32Bit>
4444
</PropertyGroup>
45+
<PropertyGroup>
46+
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
47+
</PropertyGroup>
48+
<PropertyGroup>
49+
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath>
50+
</PropertyGroup>
51+
<PropertyGroup Condition="'$(VisualStudioVersion)' == '10.0' OR '$(VisualStudioVersion)' == '11.0'">
52+
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
53+
</PropertyGroup>
54+
<Import Project="$(FSharpTargetsPath)" Condition="Exists('$(FSharpTargetsPath)')" />
4555
<ItemGroup>
4656
<Compile Include="..\..\src\assemblyinfo\assemblyinfo.fsc.exe.fs">
4757
<Link>Resources/assemblyinfo.fsc.exe.fs</Link>
4858
</Compile>
4959
<Compile Include="FscMain.fs">
5060
<Link>Driver/FscMain.fs</Link>
5161
</Compile>
62+
<None Include="App.config" />
5263
</ItemGroup>
5364
<ItemGroup>
5465
<Reference Include="FSharp.Core, Version=$(TargetFSharpCoreVersion), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
@@ -62,19 +73,4 @@
6273
<Name>FSharp.Compiler.Service</Name>
6374
</ProjectReference>
6475
</ItemGroup>
65-
<ItemGroup>
66-
<Content Include="App.config">
67-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
68-
</Content>
69-
</ItemGroup>
70-
<PropertyGroup>
71-
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
72-
</PropertyGroup>
73-
<PropertyGroup>
74-
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath>
75-
</PropertyGroup>
76-
<PropertyGroup Condition="'$(VisualStudioVersion)' == '10.0' OR '$(VisualStudioVersion)' == '11.0'">
77-
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
78-
</PropertyGroup>
79-
<Import Project="$(FSharpTargetsPath)" Condition="Exists('$(FSharpTargetsPath)')" />
8076
</Project>

samples/FsiExe/FsiExe.fsproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@
4040
<Prefer32Bit>true</Prefer32Bit>
4141
</PropertyGroup>
4242
<ItemGroup>
43-
<Reference Include="FSharp.Compiler.Interactive.Settings, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
44-
<Private>True</Private>
45-
</Reference>
4643
<Reference Include="FSharp.Core, Version=$(TargetFSharpCoreVersion), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
4744
<Private>True</Private>
4845
</Reference>
@@ -78,7 +75,10 @@
7875
</PropertyGroup>
7976
<Import Project="$(FSharpTargetsPath)" Condition="Exists('$(FSharpTargetsPath)')" />
8077
<Target Name="BeforeBuild">
81-
<Copy SourceFiles="$(MSBuildExtensionsPath32)\..\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\$(TargetFSharpCoreVersion)\FSharp.Core.sigdata" DestinationFolder="$(OutputPath)" />
82-
<Copy SourceFiles="$(MSBuildExtensionsPath32)\..\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\$(TargetFSharpCoreVersion)\FSharp.Core.optdata" DestinationFolder="$(OutputPath)" />
78+
<Copy SourceFiles="$(MSBuildExtensionsPath32)\..\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\$(TargetFSharpCoreVersion)\FSharp.Core.sigdata" DestinationFolder="$(OutputPath)" Condition="Exists('$(MSBuildExtensionsPath32)\..\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\$(TargetFSharpCoreVersion)\FSharp.Core.sigdata')" />
79+
<Copy SourceFiles="$(MSBuildExtensionsPath32)\..\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\$(TargetFSharpCoreVersion)\FSharp.Core.optdata" DestinationFolder="$(OutputPath)" Condition="Exists('$(MSBuildExtensionsPath32)\..\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\$(TargetFSharpCoreVersion)\FSharp.Core.optdata')" />
80+
<Copy SourceFiles="$(MSBuildExtensionsPath32)\..\lib\mono\4.5\FSharp.Core.dll" DestinationFolder="$(OutputPath)" Condition="Exists('$(MSBuildExtensionsPath32)\..\lib\mono\4.5\FSharp.Core.dll')" />
81+
<Copy SourceFiles="$(MSBuildExtensionsPath32)\..\lib\mono\4.5\FSharp.Core.sigdata" DestinationFolder="$(OutputPath)" Condition="Exists('$(MSBuildExtensionsPath32)\..\lib\mono\4.5\FSharp.Core.sigdata')" />
82+
<Copy SourceFiles="$(MSBuildExtensionsPath32)\..\lib\mono\4.5\FSharp.Core.optdata" DestinationFolder="$(OutputPath)" Condition="Exists('$(MSBuildExtensionsPath32)\..\lib\mono\4.5\FSharp.Core.optdata')" />
8383
</Target>
8484
</Project>

samples/FsiExe/fsimain.fs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ type internal DummyForm() =
4848
/// error during finalization of the half-initialized object...
4949
override x.Finalize() = ()
5050

51+
#if USE_WINFORMS_EVENT_LOOP
5152
/// This is the event loop implementation for winforms
5253
let WinFormsEventLoop(lcid : int option) =
5354
let mainForm = new DummyForm()
@@ -94,6 +95,7 @@ let WinFormsEventLoop(lcid : int option) =
9495

9596
member x.ScheduleRestart() = restart := true; Application.Exit() }
9697

98+
#endif
9799

98100
let StartServer (fsiSession : FsiEvaluationSession) (fsiServerName) =
99101
let server =
@@ -176,8 +178,11 @@ let MainMain argv =
176178
else
177179
None
178180

181+
#if USE_FSharp_Compiler_Interactive_Settings
179182
let fsiConfig0 = FsiEvaluationSession.GetDefaultConfiguration(fsi)
180-
183+
#else
184+
let fsiConfig0 = FsiEvaluationSession.GetDefaultConfiguration()
185+
#endif
181186
let rec fsiConfig =
182187
{ // Update the configuration to include 'StartServer' and 'OptionalConsoleReadLine'
183188
new FsiEvaluationSessionHostConfig () with
@@ -220,12 +225,14 @@ let MainMain argv =
220225
with _ ->
221226
()
222227

228+
#if USE_WINFORMS_EVENT_LOOP
223229
try fsi.EventLoop <- WinFormsEventLoop(fsiSession.LCID)
224230
with e ->
225231
printfn "Your system doesn't seem to support WinForms correctly. You will"
226232
printfn "need to set fsi.EventLoop use GUI windows from F# Interactive."
227233
printfn "You can set different event loops for MonoMac, Gtk#, WinForms and other"
228234
printfn "UI toolkits. Drop the --gui argument if no event loop is required."
235+
#endif
229236

230237

231238
console.SetCompletionFunction(fun (s1,s2) -> fsiSession.GetCompletions (match s1 with | Some s -> s + "." + s2 | None -> s2))

0 commit comments

Comments
 (0)