Skip to content

Commit a592486

Browse files
Merge pull request #1 from dsyme/smoothdeveloper-dotnet-restore-only-if-coreclr-enabled
fix to build
2 parents 7c2518e + c257574 commit a592486

File tree

3 files changed

+36
-10
lines changed

3 files changed

+36
-10
lines changed

DEVGUIDE.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ There are various qualifiers:
3131
build.cmd debug -- build debug instead of release
3232

3333
build.cmd proto -- force the rebuild of the Proto bootstrap compiler in addition to other things
34+
build.cmd protofx -- build using a .NET Framework proto (no .NET Core is used)
3435

35-
build.cmd coreclr -- build/tests only the coreclr version compiler (not the Visual F# IDE Tools)
36-
build.cmd compiler -- build/tests only the compiler (not the Visual F# IDE Tools)
36+
build.cmd net40 -- build/tests for .NET Framework version of the compiler (not the Visual F# IDE Tools or .NET Core)
37+
build.cmd coreclr -- build/tests only the coreclr version compiler (not the Visual F# IDE Tools or .NET Framework)
3738
build.cmd vs -- build/tests the Visual F# IDE Tools
3839
build.cmd pcls -- build/tests the PCL FSharp.Core libraries
3940

@@ -44,7 +45,7 @@ There are various qualifiers:
4445

4546
build.cmd test-smoke -- build, run smoke tests
4647
build.cmd test-coreunit -- build, run FSharp.Core tests
47-
build.cmd test-coreclr -- build, run CoreCLR tests
48+
build.cmd test-coreclr -- build, run .NET Core tests
4849
build.cmd test-pcls -- build, run PCL tests
4950
build.cmd test-fsharp -- build, run tests\fsharp suite
5051
build.cmd test-fsharpqa -- build, run tests\fsharpqa suite

build.cmd

+13-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ exit /b 1
2626

2727
:ARGUMENTS_OK
2828

29+
set BUILD_PROTO_WITH_CORECLR_LKG=1
30+
2931
set BUILD_PROTO=0
3032
set BUILD_NET40=1
3133
set BUILD_CORECLR=0
@@ -100,6 +102,11 @@ if /i '%ARG%' == 'all' (
100102
set SKIP_EXPENSIVE_TESTS=0
101103
)
102104

105+
if /i '%ARG%' == 'protofx' (
106+
set BUILD_PROTO_WITH_CORECLR_LKG=0
107+
set BUILD_PROTO=1
108+
)
109+
103110
if /i '%ARG%' == 'microbuild' (
104111
set BUILD_PROTO=1
105112
set BUILD_NET40=1
@@ -257,6 +264,7 @@ REM after this point, ARG variable should not be used, use only BUILD_* or TEST_
257264
echo Build/Tests configuration:
258265
echo.
259266
echo BUILD_PROTO=%BUILD_PROTO%
267+
echo BUILD_PROTO_WITH_CORECLR_LKG=%BUILD_PROTO_WITH_CORECLR_LKG%
260268
echo BUILD_NET40=%BUILD_NET40%
261269
echo BUILD_CORECLR=%BUILD_CORECLR%
262270
echo BUILD_PORTABLE=%BUILD_PORTABLE%
@@ -327,7 +335,7 @@ if '%RestorePackages%' == 'true' (
327335
.\.nuget\NuGet.exe restore packages.config -PackagesDirectory packages -ConfigFile .nuget\nuget.config
328336
@if ERRORLEVEL 1 echo Error: Nuget restore failed && goto :failure
329337
)
330-
if '%BUILD_CORECLR%' == '1' (
338+
if '%BUILD_PROTO_WITH_CORECLR_LKG%' == '1' (
331339

332340
:: Restore the Tools directory
333341
call %~dp0init-tools.cmd
@@ -358,6 +366,10 @@ if '%BUILD_CORECLR%' == '1' (
358366
popd
359367

360368
)
369+
if '%BUILD_PROTO_WITH_CORECLR_LKG%' == '0' (
370+
rmdir /s .\lkg\bin\debug
371+
)
372+
361373
rem copy targestfile into tools directory ... temporary fix until packaging complete.
362374
copy src\fsharp\FSharp.Build\Microsoft.FSharp.targets tools\Microsoft.FSharp.targets
363375
copy src\fsharp\FSharp.Build\Microsoft.Portable.FSharp.targets tools\Microsoft.Portable.FSharp.targets

src/FSharpSource.targets

+19-6
Original file line numberDiff line numberDiff line change
@@ -739,12 +739,25 @@
739739

740740
<Choose>
741741
<When Condition="'$(BuildWith)' == 'LKG'">
742-
<PropertyGroup>
743-
<FSharpTargetsPath>..\lkg\FSharp-$(LkgVersion)\bin\Microsoft.FSharp.Targets</FSharpTargetsPath>
744-
<FscToolPath>$(FSharpSourcesRoot)\..\lkg\bin\Debug\netstandard1.6\win7-x64\publish</FscToolPath>
745-
<FSLKGPath>$(FSharpSourcesRoot)\..\lkg\FSharp-$(LkgVersion)\bin</FSLKGPath>
746-
<FSCoreLKGPath>$(FSLKGPath)\FSharp.Core.dll</FSCoreLKGPath>
747-
</PropertyGroup>
742+
<Choose>
743+
<When Condition="Exists('$(FSharpSourcesRoot)\..\lkg\bin\Debug\netstandard1.6\win7-x64\publish\fsc.exe')">
744+
<PropertyGroup >
745+
<FSharpTargetsPath>$(FSharpSourcesRoot)\..\lkg\FSharp-$(LkgVersion)\bin\Microsoft.FSharp.Targets</FSharpTargetsPath>
746+
<FscToolPath>$(FSharpSourcesRoot)\..\lkg\bin\Debug\netstandard1.6\win7-x64\publish</FscToolPath>
747+
<FSLKGPath>$(FSharpSourcesRoot)\..\lkg\FSharp-$(LkgVersion)\bin</FSLKGPath>
748+
<FSCoreLKGPath>$(FSLKGPath)\FSharp.Core.dll</FSCoreLKGPath>
749+
</PropertyGroup>
750+
</When>
751+
<Otherwise>
752+
<PropertyGroup >
753+
<FSharpTargetsPath>..\lkg\FSharp-$(LkgVersion)\bin\Microsoft.FSharp.Targets</FSharpTargetsPath>
754+
<FscToolPath>$(FSharpSourcesRoot)\..\lkg\FSharp-$(LkgVersion)\bin</FscToolPath>
755+
<FSLKGPath>$(FSharpSourcesRoot)\..\lkg\FSharp-$(LkgVersion)\bin</FSLKGPath>
756+
<FSCoreLKGPath>$(FSLKGPath)\FSharp.Core.dll</FSCoreLKGPath>
757+
</PropertyGroup>
758+
</Otherwise>
759+
</Choose>
760+
748761
</When>
749762
<When Condition="'$(TargetFramework)'=='portable47' OR '$(TargetFramework)'=='portable7' OR '$(TargetFramework)'=='portable78' OR '$(TargetFramework)'=='portable259' OR '$(TargetFramework)'=='coreclr'">
750763
<PropertyGroup>

0 commit comments

Comments
 (0)