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 f492a67 commit 5ffc150
Show file tree
Hide file tree
Showing 8 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>
3 changes: 3 additions & 0 deletions build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ if errorlevel 1 (
exit /b %errorlevel%
)

set MSBUILD=packages\build\RoslynTools.MSBuild\tools\msbuild
set PATH=%PATH%;packages\build\RoslynTools.MSBuild\tools\msbuild

packages\build\FAKE\tools\FAKE.exe build.fsx %*
2 changes: 1 addition & 1 deletion build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ Target "MergeDotnetCoreIntoNuget" (fun _ ->

let runTool = runCmdIn "tools" dotnetExePath

runTool """mergenupkg --source "%s" --other "%s" --framework netstandard1.6 """ nupkg netcoreNupkg
runTool """0x53A-mergenupkg --source "%s" --other "%s" --framework netstandard1.6 """ nupkg netcoreNupkg
)

Target "PublishNuGet" (fun _ ->
Expand Down
5 changes: 4 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ then
if [ $exit_code -ne 0 ]; then
exit $exit_code
fi

MSBUILD=packages\build\RoslynTools.MSBuild\tools\msbuild
PATH=$PATH;$MSBUILD
packages/build/FAKE/tools/FAKE.exe $@ --fsiargs -d:MONO build.fsx
else
mono .paket/paket.exe restore
Expand All @@ -27,6 +28,8 @@ else
fi
exit $exit_code
fi
MSBUILD=packages\build\RoslynTools.MSBuild\tools\msbuild
PATH=$PATH;$MSBUILD
mono packages/build/FAKE/tools/FAKE.exe $@ --fsiargs -d:MONO build.fsx
fi

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

github fsharp/FAKE modules/Octokit/Octokit.fsx

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
2 changes: 2 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<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>
Expand Down
2 changes: 1 addition & 1 deletion tools/tools.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<TargetFramework>netstandard1.6</TargetFramework>
</PropertyGroup>
<ItemGroup>
<DotNetCliToolReference Include="dotnet-mergenupkg" Version="1.0.*" />
<DotNetCliToolReference Include="dotnet-0x53A-mergenupkg" Version="1.0.*" />
</ItemGroup>
<Import Project="..\.paket\Paket.Restore.targets" />
</Project>

0 comments on commit 5ffc150

Please sign in to comment.