Skip to content

Commit

Permalink
Make Paket build on a clean installation:
Browse files Browse the repository at this point in the history
* acquire msbuild via RoslynTools.MSBuild
* acquire reference assemblies via a self-built package based on https://github.com/jaredpar/xcopy-msbuild
* use a fork of dotnet-mergenupkg which was recompiled against netcoreapp2.0 (original was netcoreapp1.0) to remove dependency on 1.x runtime
  • Loading branch information
0x53A committed Aug 26, 2017
1 parent 6d343b3 commit 385a821
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 3 deletions.
5 changes: 5 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>
<PropertyGroup>
<TargetFrameworkRootPath>$(MSBuildThisFileDirectory)packages\build\0x53A.ReferenceAssemblies.Paket\tools\framework</TargetFrameworkRootPath>
</PropertyGroup>
</Project>
2 changes: 2 additions & 0 deletions build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ if errorlevel 1 (
exit /b %errorlevel%
)

set MSBuild=packages\build\RoslynTools.MSBuild\tools\msbuild

packages\build\FAKE\tools\FAKE.exe build.fsx %*
4 changes: 3 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ then
if [ $exit_code -ne 0 ]; then
exit $exit_code
fi

export MSBuild=packages/build/RoslynTools.MSBuild/tools/msbuild/MSBuild.exe
packages/build/FAKE/tools/FAKE.exe $@ --fsiargs -d:MONO build.fsx
else
mono .paket/paket.exe restore
Expand All @@ -27,6 +27,8 @@ else
fi
exit $exit_code
fi
# Note: the bundled MSBuild crashes hard on linux, so we still rely on the system-installed version
#export MSBuild=packages/build/RoslynTools.MSBuild/tools/msbuild/MSBuild.exe
mono packages/build/FAKE/tools/FAKE.exe $@ --fsiargs -d:MONO build.fsx
fi

8 changes: 8 additions & 0 deletions paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,11 @@ group Build
nuget ILRepack

github fsharp/FAKE modules/Octokit/Octokit.fsx

# Note: this package was produced using https://github.com/jaredpar/xcopy-msbuild and contains the two directories ".NETFramework\v4.5" and ".NETPortable\v4.5"
nuget 0x53A.ReferenceAssemblies.Paket 0.2.0

source https://dotnet.myget.org/F/roslyn-tools/api/v3/index.json
nuget RoslynTools.MSBuild prerelease
# Note: RoslynTools.ReferenceAssemblies does not contain the required reference assemblies for net45, so I created 0x53A.ReferenceAssemblies.Paket. It is much smaller, anyway.
#nuget RoslynTools.ReferenceAssemblies prerelease
3 changes: 3 additions & 0 deletions paket.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1136,6 +1136,7 @@ GROUP Build
CONTENT: NONE
NUGET
remote: https://www.nuget.org/api/v2
0x53A.ReferenceAssemblies.Paket (0.2)
FAKE (4.63)
FSharp.Compiler.Service (13.0)
FSharp.Core (>= 4.1.17) - restriction: >= netstandard1.6
Expand Down Expand Up @@ -1818,6 +1819,8 @@ NUGET
FSharp.Compiler.Service (>= 13.0 < 14.0)
Microsoft.AspNet.Razor (>= 3.2.3 < 4.0)
System.ValueTuple (>= 4.3.1 < 5.0)
remote: https://dotnet.myget.org/F/roslyn-tools/api/v3/index.json
RoslynTools.MSBuild (0.4.0-alpha)
GITHUB
remote: fsharp/FAKE
modules/Octokit/Octokit.fsx (291f58cc70aba6dd871cf18e66d2d88357e4f208)
Expand Down
5 changes: 4 additions & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<Project>
<!-- MSBuild only includes the first Directory.Build.props, so we need to manually include the root one -->
<Import Project="$(MSBuildThisFileDirectory)..\Directory.Build.props" />
<PropertyGroup>
<DebugType>portable</DebugType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="SourceLink.Create.CommandLine" Version="2.1.1" PrivateAssets="all" />
<PackageReference Include="SourceLink.Embed.PaketFiles" Version="2.1.1" PrivateAssets="all" />
</ItemGroup>
</Project>
</Project>

2 changes: 1 addition & 1 deletion src/Paket.Core/Paket.Core.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2199,4 +2199,4 @@
</Choose>
<Import Project="..\..\packages\NETStandard.Library\build\NETStandard.Library.targets" Condition="Exists('..\..\packages\NETStandard.Library\build\NETStandard.Library.targets')" Label="Paket" />
<Import Project="..\..\packages\NETStandard.Library\build\$(__paket__NETStandard_Library_targets).targets" Condition="Exists('..\..\packages\NETStandard.Library\build\$(__paket__NETStandard_Library_targets).targets')" Label="Paket" />
</Project>
</Project>

0 comments on commit 385a821

Please sign in to comment.