Remove The host build, consume the host build from core-setup
This commit is contained in:
parent
651e8c2524
commit
aa01110c33
293 changed files with 650 additions and 25590 deletions
|
@ -1,152 +0,0 @@
|
|||
.\" Automatically generated by Pandoc 1.15.1
|
||||
.\"
|
||||
.hy
|
||||
.TH "dotnet-cli" "1" "January 2016" "" ""
|
||||
.SH NAME
|
||||
.PP
|
||||
dotnet \-\- general driver for running the command\-line commands
|
||||
.SH SYNOPSIS
|
||||
.PP
|
||||
dotnet [\-\-version] [\-\-help] [\-\-verbose] < command > [< args >]
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
dotnet is a generic driver for the CLI toolchain.
|
||||
Invoked on its own, it will give out brief usage instructions.
|
||||
.PP
|
||||
Each specific feature is implemented as a command.
|
||||
In order to use the feature, it is specified after dotnet, i.e.
|
||||
\f[C]dotnet\ compile\f[].
|
||||
All of the arguments following the command are command\[aq]s own
|
||||
arguments.
|
||||
.SH OPTIONS
|
||||
.PP
|
||||
\f[C]\-v,\ \-\-verbose\f[]
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
Enable\ verbose\ output.
|
||||
\f[]
|
||||
.fi
|
||||
.PP
|
||||
\f[C]\-\-version\f[]
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
Print\ out\ the\ version\ of\ the\ CLI\ tooling
|
||||
\f[]
|
||||
.fi
|
||||
.PP
|
||||
\f[C]\-h,\ \-\-help\f[]
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
Print\ out\ a\ short\ help\ and\ a\ list\ of\ current\ commands.\
|
||||
\f[]
|
||||
.fi
|
||||
.SH DOTNET COMMANDS
|
||||
.PP
|
||||
The following commands exist for dotnet.
|
||||
.PP
|
||||
\f[C]dotnet\-compile(1)\f[]
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
Compile\ the\ application\ to\ either\ an\ intermidiate\ language\ (IL)\ or\ to\ a\ native\ binary.\
|
||||
\f[]
|
||||
.fi
|
||||
.PP
|
||||
\f[C]dotnet\-restore(1)\f[]
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
Restores\ the\ dependencies\ for\ a\ given\ application.\
|
||||
\f[]
|
||||
.fi
|
||||
.PP
|
||||
\f[C]dotnet\-run(1)\f[]
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
Runs\ the\ application\ from\ source.
|
||||
\f[]
|
||||
.fi
|
||||
.PP
|
||||
\f[C]dotnet\-publish(1)\f[]
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
Publishes\ a\ flat\ directory\ that\ contains\ the\ application\ and\ its\ dependencies,\ including\ the\ runtime\ binaries.\
|
||||
\f[]
|
||||
.fi
|
||||
.PP
|
||||
\f[C]dotnet\-test(1)\f[]
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
Runs\ tests\ using\ a\ test\ runner\ specified\ in\ project.json.
|
||||
\f[]
|
||||
.fi
|
||||
.PP
|
||||
\f[C]dotnet\-new(1)\f[]
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
Initializes\ a\ sample\ .NET\ Core\ console\ application.\
|
||||
\f[]
|
||||
.fi
|
||||
.SH EXAMPLES
|
||||
.PP
|
||||
\f[C]dotnew\ new\f[]
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
Initializes\ a\ sample\ .NET\ Core\ console\ application\ that\ can\ be\ compiled\ and\ ran.
|
||||
\f[]
|
||||
.fi
|
||||
.PP
|
||||
\f[C]dotnet\ restore\f[]
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
Restores\ dependencies\ for\ a\ given\ application.\
|
||||
\f[]
|
||||
.fi
|
||||
.PP
|
||||
\f[C]dotnet\ compile\f[]
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
Compiles\ the\ application\ in\ a\ given\ directory.\
|
||||
\f[]
|
||||
.fi
|
||||
.SH ENVIRONMENT
|
||||
.PP
|
||||
\f[C]DOTNET_PACKAGES\f[]
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
The\ primary\ package\ cache.\ If\ not\ set,\ defaults\ to\ $HOME/.nuget/packages\ on\ Unix\ or\ %LOCALAPPDATA%\\NuGet\\Packages\ (TBD)\ on\ Windows.
|
||||
\f[]
|
||||
.fi
|
||||
.PP
|
||||
\f[C]DOTNET_PACKAGES_CACHE\f[]
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
The\ secondary\ cache.\ This\ is\ used\ by\ shared\ hosters\ (such\ as\ Azure)\ to\ provide\ a\ cache\ of\ pre\-downloaded\ common\ packages\ on\ a\ faster\ disk.\ If\ not\ set\ it\ is\ not\ used.
|
||||
\f[]
|
||||
.fi
|
||||
.PP
|
||||
\f[C]DOTNET_SERVICING\f[]
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
Specifies\ the\ location\ of\ the\ servicing\ index\ to\ use\ by\ the\ shared\ host\ when\ loading\ the\ runtime.\
|
||||
\f[]
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.PP
|
||||
dotnet\-compile(1), dotnet\-run(1), dotnet\-publish(1),
|
||||
dotnet\-restore(1)
|
||||
.SH AUTHORS
|
||||
Zlatko Knezevic zlakne\@microsoft.com.
|
|
@ -79,8 +79,6 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "update-dependencies", "scri
|
|||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.DotNet.Cli.Utils.Tests", "test\Microsoft.DotNet.Cli.Utils.Tests\Microsoft.DotNet.Cli.Utils.Tests.xproj", "{09C52F96-EFDD-4448-95EC-6D362DD60BAA}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "RuntimeGraphGenerator", "tools\RuntimeGraphGenerator\RuntimeGraphGenerator.xproj", "{EFC4FE68-83EB-40E4-BFA8-61D0B4626F25}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestingAbstractions", "TestingAbstractions", "{EB0F5F8C-0991-49AC-B188-A9869476C7DF}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "TestAppWithFullPdbs", "test\TestingAbstractions\TestAppWithFullPdbs\TestAppWithFullPdbs.xproj", "{0A37AB59-BDB5-4957-9BB8-D965F9A67A5B}"
|
||||
|
@ -115,8 +113,6 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.DotNet.Cli.Build.
|
|||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "shared-build-targets-utils", "build_projects\shared-build-targets-utils\shared-build-targets-utils.xproj", "{B768BD29-12BF-4C7C-B093-03193FE244D1}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "dotnet-host-build", "build_projects\dotnet-host-build\dotnet-host-build.xproj", "{1DBB7542-0345-4F4B-A84B-3B00B185D416}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -593,22 +589,6 @@ Global
|
|||
{09C52F96-EFDD-4448-95EC-6D362DD60BAA}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||
{09C52F96-EFDD-4448-95EC-6D362DD60BAA}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
|
||||
{09C52F96-EFDD-4448-95EC-6D362DD60BAA}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
||||
{EFC4FE68-83EB-40E4-BFA8-61D0B4626F25}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EFC4FE68-83EB-40E4-BFA8-61D0B4626F25}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EFC4FE68-83EB-40E4-BFA8-61D0B4626F25}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{EFC4FE68-83EB-40E4-BFA8-61D0B4626F25}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{EFC4FE68-83EB-40E4-BFA8-61D0B4626F25}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EFC4FE68-83EB-40E4-BFA8-61D0B4626F25}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EFC4FE68-83EB-40E4-BFA8-61D0B4626F25}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
|
||||
{EFC4FE68-83EB-40E4-BFA8-61D0B4626F25}.MinSizeRel|x64.Build.0 = Debug|Any CPU
|
||||
{EFC4FE68-83EB-40E4-BFA8-61D0B4626F25}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EFC4FE68-83EB-40E4-BFA8-61D0B4626F25}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{EFC4FE68-83EB-40E4-BFA8-61D0B4626F25}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{EFC4FE68-83EB-40E4-BFA8-61D0B4626F25}.Release|x64.Build.0 = Release|Any CPU
|
||||
{EFC4FE68-83EB-40E4-BFA8-61D0B4626F25}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EFC4FE68-83EB-40E4-BFA8-61D0B4626F25}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||
{EFC4FE68-83EB-40E4-BFA8-61D0B4626F25}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
|
||||
{EFC4FE68-83EB-40E4-BFA8-61D0B4626F25}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
||||
{0A37AB59-BDB5-4957-9BB8-D965F9A67A5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0A37AB59-BDB5-4957-9BB8-D965F9A67A5B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0A37AB59-BDB5-4957-9BB8-D965F9A67A5B}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
|
@ -833,22 +813,6 @@ Global
|
|||
{B768BD29-12BF-4C7C-B093-03193FE244D1}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||
{B768BD29-12BF-4C7C-B093-03193FE244D1}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
|
||||
{B768BD29-12BF-4C7C-B093-03193FE244D1}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
||||
{1DBB7542-0345-4F4B-A84B-3B00B185D416}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1DBB7542-0345-4F4B-A84B-3B00B185D416}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1DBB7542-0345-4F4B-A84B-3B00B185D416}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{1DBB7542-0345-4F4B-A84B-3B00B185D416}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{1DBB7542-0345-4F4B-A84B-3B00B185D416}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1DBB7542-0345-4F4B-A84B-3B00B185D416}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1DBB7542-0345-4F4B-A84B-3B00B185D416}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
|
||||
{1DBB7542-0345-4F4B-A84B-3B00B185D416}.MinSizeRel|x64.Build.0 = Debug|Any CPU
|
||||
{1DBB7542-0345-4F4B-A84B-3B00B185D416}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1DBB7542-0345-4F4B-A84B-3B00B185D416}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1DBB7542-0345-4F4B-A84B-3B00B185D416}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{1DBB7542-0345-4F4B-A84B-3B00B185D416}.Release|x64.Build.0 = Release|Any CPU
|
||||
{1DBB7542-0345-4F4B-A84B-3B00B185D416}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1DBB7542-0345-4F4B-A84B-3B00B185D416}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||
{1DBB7542-0345-4F4B-A84B-3B00B185D416}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
|
||||
{1DBB7542-0345-4F4B-A84B-3B00B185D416}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -885,7 +849,6 @@ Global
|
|||
{60C33D0A-A5D8-4AB0-9956-1F804654DF05} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||
{A28BD8AC-DF15-4F58-8299-98A9AE2B8726} = {88278B81-7649-45DC-8A6A-D3A645C5AFC3}
|
||||
{09C52F96-EFDD-4448-95EC-6D362DD60BAA} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||
{EFC4FE68-83EB-40E4-BFA8-61D0B4626F25} = {0722D325-24C8-4E83-B5AF-0A083E7F0749}
|
||||
{EB0F5F8C-0991-49AC-B188-A9869476C7DF} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||
{0A37AB59-BDB5-4957-9BB8-D965F9A67A5B} = {EB0F5F8C-0991-49AC-B188-A9869476C7DF}
|
||||
{7B0EFBB4-4669-4B83-B47C-7F3E6DB07AF9} = {EB0F5F8C-0991-49AC-B188-A9869476C7DF}
|
||||
|
@ -903,6 +866,5 @@ Global
|
|||
{D7B9695D-23EB-4EA8-B8AB-707A0092E1D5} = {88278B81-7649-45DC-8A6A-D3A645C5AFC3}
|
||||
{49BEB486-AB5A-4416-91EA-8CD34ABB0C9D} = {88278B81-7649-45DC-8A6A-D3A645C5AFC3}
|
||||
{B768BD29-12BF-4C7C-B093-03193FE244D1} = {88278B81-7649-45DC-8A6A-D3A645C5AFC3}
|
||||
{1DBB7542-0345-4F4B-A84B-3B00B185D416} = {88278B81-7649-45DC-8A6A-D3A645C5AFC3}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
|
||||
<clear />
|
||||
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
|
||||
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core" />
|
||||
<add key="cli-deps" value="https://dotnet.myget.org/F/cli-deps/api/v3/index.json" />
|
||||
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
|
||||
</packageSources>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"type": "platform",
|
||||
"version": "1.0.0-rc3-*"
|
||||
"version": "1.0.0-rc3-004306"
|
||||
}
|
||||
},
|
||||
"imports": [
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*",
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306",
|
||||
"EmptyLibrary": "1.0.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
}
|
||||
},
|
||||
"dnx451": {}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"type": "platform",
|
||||
"version": "1.0.0-rc3-*"
|
||||
"version": "1.0.0-rc3-004306"
|
||||
},
|
||||
"Newtonsoft.Json": "8.0.3"
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"netcoreapp1.0": {
|
||||
"imports": "dnxcore50",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*",
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306",
|
||||
"Microsoft.Web.Administration": "7.0.0"
|
||||
},
|
||||
"frameworks": {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"emitEntryPoint": true
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"type": "platform",
|
||||
"version": "1.0.0-rc3-*"
|
||||
"version": "1.0.0-rc3-004306"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"type": "platform",
|
||||
"version": "1.0.0-rc3-*"
|
||||
"version": "1.0.0-rc3-004306"
|
||||
},
|
||||
"Microsoft.Extensions.DependencyModel": {
|
||||
"target": "project"
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"type": "platform",
|
||||
"version": "1.0.0-rc3-*"
|
||||
"version": "1.0.0-rc3-004306"
|
||||
},
|
||||
"Microsoft.DotNet.Cli.Utils": {
|
||||
"target": "project"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"type": "platform",
|
||||
"version": "1.0.0-rc3-*"
|
||||
"version": "1.0.0-rc3-004306"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"emitEntryPoint": true
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"emitEntryPoint": true
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"type": "platform",
|
||||
"version": "1.0.0-rc3-*"
|
||||
"version": "1.0.0-rc3-004306"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"type": "platform",
|
||||
"version": "1.0.0-rc3-*"
|
||||
"version": "1.0.0-rc3-004306"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"type": "platform",
|
||||
"version": "1.0.0-rc3-*"
|
||||
"version": "1.0.0-rc3-004306"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"emitEntryPoint": true
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"version": "1.0.0-rc3-*",
|
||||
"version": "1.0.0-rc3-004306",
|
||||
"type": "platform"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"emitEntryPoint": true
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*",
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306",
|
||||
"dotnet-hello": {
|
||||
"version": "1.0.0",
|
||||
"target": "package"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"emitEntryPoint": true
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*",
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306",
|
||||
"dotnet-hello": {
|
||||
"version": "1.0.0",
|
||||
"target": "package"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"version": "1.0.0-rc3-*",
|
||||
"version": "1.0.0-rc3-004306",
|
||||
"type": "platform"
|
||||
},
|
||||
"xunit.core": "2.1.0",
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"target": "package"
|
||||
},
|
||||
"Microsoft.NETCore.App": {
|
||||
"version": "1.0.0-rc3-*",
|
||||
"version": "1.0.0-rc3-004306",
|
||||
"type": "platform"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"emitEntryPoint": true
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"emitEntryPoint": true
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"emitEntryPoint": true
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"type": "platform",
|
||||
"version": "1.0.0-rc3-*"
|
||||
"version": "1.0.0-rc3-004306"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"type": "platform",
|
||||
"version": "1.0.0-rc3-*"
|
||||
"version": "1.0.0-rc3-004306"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
"netstandard1.5": {
|
||||
"imports": "dnxcore50",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
}
|
||||
},
|
||||
"net451": {}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"preserveCompilationContext": true
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*",
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306",
|
||||
"DependencyContextValidator": "1.0.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"emitEntryPoint": true
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*",
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306",
|
||||
"DependencyContextValidator": "1.0.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"type": "platform",
|
||||
"version": "1.0.0-rc3-*"
|
||||
"version": "1.0.0-rc3-004306"
|
||||
},
|
||||
"DependencyContextValidator": "1.0.0-*"
|
||||
},
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"type": "platform",
|
||||
"version": "1.0.0-rc3-*"
|
||||
"version": "1.0.0-rc3-004306"
|
||||
},
|
||||
"DependencyContextValidator": "1.0.0-*"
|
||||
},
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
},
|
||||
"packOptions": {
|
||||
"files": {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"Microsoft.FSharp.Core.netcore": "1.0.0-alpha-151221",
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
},
|
||||
"tools": {
|
||||
"dotnet-compile-fsc": {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"version": "1.0.0-*",
|
||||
"target": "project"
|
||||
},
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*",
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306",
|
||||
"Microsoft.FSharp.Core.netcore": "1.0.0-alpha-151221"
|
||||
},
|
||||
"tools": {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"Microsoft.FSharp.Core.netcore": "1.0.0-alpha-151221",
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
},
|
||||
"tools": {
|
||||
"dotnet-compile-fsc": {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"type": "platform",
|
||||
"version": "1.0.0-rc3-*"
|
||||
"version": "1.0.0-rc3-004306"
|
||||
}
|
||||
},
|
||||
"imports": [
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
},
|
||||
"imports": [
|
||||
"dnxcore50",
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"emitEntryPoint": true
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"type": "platform",
|
||||
"version": "1.0.0-rc3-*"
|
||||
"version": "1.0.0-rc3-004306"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"type": "platform",
|
||||
"version": "1.0.0-rc3-*"
|
||||
"version": "1.0.0-rc3-004306"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"type": "platform",
|
||||
"version": "1.0.0-rc3-*"
|
||||
"version": "1.0.0-rc3-004306"
|
||||
},
|
||||
"System.Linq": "4.0.0"
|
||||
},
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"type": "platform",
|
||||
"version": "1.0.0-rc3-*"
|
||||
"version": "1.0.0-rc3-004306"
|
||||
},
|
||||
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*"
|
||||
},
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"Microsoft.Data.OData": "5.6.4",
|
||||
"Microsoft.NETCore.App": {
|
||||
"type": "platform",
|
||||
"version": "1.0.0-rc3-*"
|
||||
"version": "1.0.0-rc3-004306"
|
||||
},
|
||||
"TestLibraryWithResources": {
|
||||
"target": "project"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"netcoreapp1.0": {
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"version": "1.0.0-rc3-*",
|
||||
"version": "1.0.0-rc3-004306",
|
||||
"type": "platform"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"TestLibrary": "1.0.0-*",
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"emitEntryPoint": true
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"emitEntryPoint": true
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"type": "platform",
|
||||
"version": "1.0.0-rc3-*"
|
||||
"version": "1.0.0-rc3-004306"
|
||||
},
|
||||
"LibraryWithBuildDependency": {
|
||||
"target": "project"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"type": "platform",
|
||||
"version": "1.0.0-rc3-*"
|
||||
"version": "1.0.0-rc3-004306"
|
||||
},
|
||||
"Microsoft.Net.Compilers": {
|
||||
"type": "build",
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"outputName": "AppWithContentPackage"
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*",
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306",
|
||||
"SharedContentA": "1.0.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
"target": "project",
|
||||
"version": "1.0.0-*"
|
||||
},
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"emitEntryPoint": true
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
"target": "project",
|
||||
"version": "1.0.0-*"
|
||||
},
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"emitEntryPoint": true
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
"target": "project",
|
||||
"version": "1.0.0-*"
|
||||
},
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"net451": {},
|
||||
"netcoreapp1.0": {
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
},
|
||||
"imports": "portable-net45+win8"
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"netcoreapp1.0": {
|
||||
"imports": "dnxcore50",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
}
|
||||
},
|
||||
"net451": {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"netcoreapp1.0": {
|
||||
"imports": "dnxcore50",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
}
|
||||
},
|
||||
"netcore50": {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
}
|
||||
},
|
||||
"net451": {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"version": "1.0.0-*",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"version": "1.0.0-rc3-*",
|
||||
"version": "1.0.0-rc3-004306",
|
||||
"type": "platform"
|
||||
},
|
||||
},
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"dependencies": {
|
||||
"L11": "1.0.0-*",
|
||||
"L12": "1.0.0-*",
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"dependencies": {
|
||||
"L12": "1.0.0-*",
|
||||
"L21": "1.0.0-*",
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard1.5": {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"version": "1.0.0-*",
|
||||
"dependencies": {
|
||||
"L22": "1.0.0-*",
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard1.5": {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"version": "1.0.0-*",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard1.5": {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"version": "1.0.0-*",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard1.5": {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"emitEntryPoint": true
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"emitEntryPoint": true
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"xmlDoc": true
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
}
|
||||
},
|
||||
"net451": {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-*"
|
||||
"Microsoft.NETCore.App": "1.0.0-rc3-004306"
|
||||
}
|
||||
},
|
||||
"net451": {
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
REM Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
REM Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
powershell -NoProfile -NoLogo -Command "%~dp0build_projects\dotnet-host-build\build.ps1 %*; exit $LastExitCode;"
|
||||
powershell -NoProfile -NoLogo -Command "%~dp0build_projects\dotnet-cli-build\build.ps1 %*; exit $LastExitCode;"
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
|
2
build.sh
2
build.sh
|
@ -49,7 +49,6 @@ args=($temp)
|
|||
|
||||
dockerbuild()
|
||||
{
|
||||
BUILD_COMMAND=/opt/code/build_projects/dotnet-host-build/build.sh $DIR/scripts/dockerrun.sh --non-interactive "$@"
|
||||
BUILD_COMMAND=/opt/code/build_projects/dotnet-cli-build/build.sh $DIR/scripts/dockerrun.sh --non-interactive "$@"
|
||||
}
|
||||
|
||||
|
@ -57,6 +56,5 @@ dockerbuild()
|
|||
if [ ! -z "$BUILD_IN_DOCKER" ]; then
|
||||
dockerbuild "${args[@]}"
|
||||
else
|
||||
$DIR/build_projects/dotnet-host-build/build.sh "${args[@]}"
|
||||
$DIR/build_projects/dotnet-cli-build/build.sh "${args[@]}"
|
||||
fi
|
||||
|
|
|
@ -15,7 +15,6 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
{
|
||||
public class CompileTargets
|
||||
{
|
||||
public static readonly string CoreCLRVersion = "1.0.2-rc3-24123-01";
|
||||
public static readonly bool IsWinx86 = CurrentPlatform.IsWindows && CurrentArchitecture.Isx86;
|
||||
|
||||
public static readonly string[] BinariesForCoreHost = new[]
|
||||
|
@ -54,11 +53,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
public const string SharedFrameworkName = "Microsoft.NETCore.App";
|
||||
|
||||
public static Crossgen CrossgenUtil = new Crossgen(CoreCLRVersion);
|
||||
|
||||
private static string DotnetHostBaseName => $"dotnet{Constants.ExeSuffix}";
|
||||
private static string DotnetHostFxrBaseName => $"{Constants.DynamicLibPrefix}hostfxr{Constants.DynamicLibSuffix}";
|
||||
private static string HostPolicyBaseName => $"{Constants.DynamicLibPrefix}hostpolicy{Constants.DynamicLibSuffix}";
|
||||
public static Crossgen CrossgenUtil = new Crossgen(DependencyVersions.CoreCLRVersion);
|
||||
|
||||
// Updates the stage 2 with recent changes.
|
||||
[Target(nameof(PrepareTargets.Init), nameof(CompileStage2))]
|
||||
|
@ -67,58 +62,12 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(PrepareTargets.Init), nameof(RestoreLockedCoreHost), nameof(CompileStage1), nameof(CompileStage2))]
|
||||
[Target(nameof(PrepareTargets.Init), nameof(CompileStage1), nameof(CompileStage2))]
|
||||
public static BuildTargetResult Compile(BuildTargetContext c)
|
||||
{
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(PrepareTargets.Init))]
|
||||
public static BuildTargetResult RestoreLockedCoreHost(BuildTargetContext c)
|
||||
{
|
||||
var hostVersion = c.BuildContext.Get<HostVersion>("HostVersion");
|
||||
var lockedHostFxrVersion = hostVersion.LockedHostFxrVersion;
|
||||
|
||||
var currentRid = HostPackagePlatformRid;
|
||||
|
||||
string projectJson = $@"{{
|
||||
""dependencies"": {{
|
||||
""Microsoft.NETCore.DotNetHostResolver"" : ""{lockedHostFxrVersion}""
|
||||
}},
|
||||
""frameworks"": {{
|
||||
""netcoreapp1.0"": {{}}
|
||||
}},
|
||||
""runtimes"": {{
|
||||
""{currentRid}"": {{}}
|
||||
}}
|
||||
}}";
|
||||
var tempPjDirectory = Path.Combine(Dirs.Intermediate, "lockedHostTemp");
|
||||
FS.Rmdir(tempPjDirectory);
|
||||
Directory.CreateDirectory(tempPjDirectory);
|
||||
var tempPjFile = Path.Combine(tempPjDirectory, "project.json");
|
||||
File.WriteAllText(tempPjFile, projectJson);
|
||||
|
||||
DotNetCli.Stage0.Restore("--verbosity", "verbose",
|
||||
"--fallbacksource", Dirs.CorehostLocalPackages,
|
||||
"--fallbacksource", Dirs.CorehostDummyPackages)
|
||||
.WorkingDirectory(tempPjDirectory)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
|
||||
// Clean out before publishing locked binaries
|
||||
FS.Rmdir(Dirs.CorehostLocked);
|
||||
|
||||
// Use specific RIDS for non-backward compatible platforms.
|
||||
(CurrentPlatform.IsWindows
|
||||
? DotNetCli.Stage0.Publish("--output", Dirs.CorehostLocked, "--no-build")
|
||||
: DotNetCli.Stage0.Publish("--output", Dirs.CorehostLocked, "--no-build", "-r", currentRid))
|
||||
.WorkingDirectory(tempPjDirectory)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(PrepareTargets.Init))]
|
||||
public static BuildTargetResult CompileStage1(BuildTargetContext c)
|
||||
{
|
||||
|
@ -130,11 +79,9 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
}
|
||||
Directory.CreateDirectory(Dirs.Stage1);
|
||||
|
||||
CopySharedHost(Dirs.Stage1);
|
||||
PublishSharedFramework(c, Dirs.Stage1, DotNetCli.Stage0);
|
||||
var result = CompileCliSdk(c,
|
||||
dotnet: DotNetCli.Stage0,
|
||||
outputDir: Dirs.Stage1);
|
||||
rootOutputDirectory: Dirs.Stage1);
|
||||
|
||||
CleanOutputDir(Path.Combine(Dirs.Stage1, "sdk"));
|
||||
FS.CopyRecursive(Dirs.Stage1, Dirs.Stage1Symbols);
|
||||
|
@ -157,11 +104,9 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
}
|
||||
Directory.CreateDirectory(Dirs.Stage2);
|
||||
|
||||
PublishSharedFramework(c, Dirs.Stage2, DotNetCli.Stage1);
|
||||
CopySharedHost(Dirs.Stage2);
|
||||
var result = CompileCliSdk(c,
|
||||
dotnet: DotNetCli.Stage1,
|
||||
outputDir: Dirs.Stage2);
|
||||
rootOutputDirectory: Dirs.Stage2);
|
||||
|
||||
if (!result.Success)
|
||||
{
|
||||
|
@ -209,168 +154,24 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
FS.RmFilesInDirRecursive(directory, "*.pdb");
|
||||
}
|
||||
|
||||
private static void CopySharedHost(string outputDir)
|
||||
{
|
||||
File.Copy(
|
||||
Path.Combine(Dirs.CorehostLocked, DotnetHostBaseName),
|
||||
Path.Combine(outputDir, DotnetHostBaseName), true);
|
||||
File.Copy(
|
||||
Path.Combine(Dirs.CorehostLocked, DotnetHostFxrBaseName),
|
||||
Path.Combine(outputDir, DotnetHostFxrBaseName), true);
|
||||
}
|
||||
|
||||
public static void PublishSharedFramework(BuildTargetContext c, string outputDir, DotNetCli dotnetCli)
|
||||
{
|
||||
string SharedFrameworkTemplateSourceRoot = Path.Combine(Dirs.RepoRoot, "src", "sharedframework", "framework");
|
||||
string SharedFrameworkNugetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
|
||||
|
||||
string sharedFrameworkRid;
|
||||
if (RuntimeEnvironment.OperatingSystemPlatform == Platform.Windows)
|
||||
{
|
||||
sharedFrameworkRid = $"win7-{RuntimeEnvironment.RuntimeArchitecture}";
|
||||
}
|
||||
else
|
||||
{
|
||||
sharedFrameworkRid = RuntimeEnvironment.GetRuntimeIdentifier();
|
||||
}
|
||||
|
||||
string SharedFrameworkSourceRoot = GenerateSharedFrameworkProject(c, SharedFrameworkTemplateSourceRoot, sharedFrameworkRid);
|
||||
|
||||
dotnetCli.Restore(
|
||||
"--verbosity", "verbose",
|
||||
"--disable-parallel",
|
||||
"--infer-runtimes",
|
||||
"--fallbacksource", Dirs.CorehostLocalPackages)
|
||||
.WorkingDirectory(SharedFrameworkSourceRoot)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
|
||||
// We publish to a sub folder of the PublishRoot so tools like heat and zip can generate folder structures easier.
|
||||
string SharedFrameworkNameAndVersionRoot = Path.Combine(outputDir, "shared", SharedFrameworkName, SharedFrameworkNugetVersion);
|
||||
c.BuildContext["SharedFrameworkPath"] = SharedFrameworkNameAndVersionRoot;
|
||||
|
||||
if (Directory.Exists(SharedFrameworkNameAndVersionRoot))
|
||||
{
|
||||
Utils.DeleteDirectory(SharedFrameworkNameAndVersionRoot);
|
||||
}
|
||||
|
||||
dotnetCli.Publish(
|
||||
"--output", SharedFrameworkNameAndVersionRoot,
|
||||
"-r", sharedFrameworkRid,
|
||||
SharedFrameworkSourceRoot).Execute().EnsureSuccessful();
|
||||
|
||||
// Clean up artifacts that dotnet-publish generates which we don't need
|
||||
DeleteMainPublishOutput(SharedFrameworkNameAndVersionRoot, "framework");
|
||||
File.Delete(Path.Combine(SharedFrameworkNameAndVersionRoot, "framework.runtimeconfig.json"));
|
||||
|
||||
// Rename the .deps file
|
||||
var destinationDeps = Path.Combine(SharedFrameworkNameAndVersionRoot, $"{SharedFrameworkName}.deps.json");
|
||||
File.Move(Path.Combine(SharedFrameworkNameAndVersionRoot, "framework.deps.json"), destinationDeps);
|
||||
ChangeEntryPointLibraryName(destinationDeps, null);
|
||||
|
||||
// Generate RID fallback graph
|
||||
string runtimeGraphGeneratorRuntime = null;
|
||||
switch (RuntimeEnvironment.OperatingSystemPlatform)
|
||||
{
|
||||
case Platform.Windows:
|
||||
runtimeGraphGeneratorRuntime = "win";
|
||||
break;
|
||||
case Platform.Linux:
|
||||
runtimeGraphGeneratorRuntime = "linux";
|
||||
break;
|
||||
case Platform.Darwin:
|
||||
runtimeGraphGeneratorRuntime = "osx";
|
||||
break;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(runtimeGraphGeneratorRuntime))
|
||||
{
|
||||
var runtimeGraphGeneratorName = "RuntimeGraphGenerator";
|
||||
var runtimeGraphGeneratorProject = Path.Combine(Dirs.RepoRoot, "tools", runtimeGraphGeneratorName);
|
||||
var runtimeGraphGeneratorOutput = Path.Combine(Dirs.Output, "tools", runtimeGraphGeneratorName);
|
||||
|
||||
dotnetCli.Publish(
|
||||
"--output", runtimeGraphGeneratorOutput,
|
||||
runtimeGraphGeneratorProject).Execute().EnsureSuccessful();
|
||||
var runtimeGraphGeneratorExe = Path.Combine(runtimeGraphGeneratorOutput, $"{runtimeGraphGeneratorName}{Constants.ExeSuffix}");
|
||||
|
||||
Cmd(runtimeGraphGeneratorExe, "--project", SharedFrameworkSourceRoot, "--deps", destinationDeps, runtimeGraphGeneratorRuntime)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
}
|
||||
else
|
||||
{
|
||||
c.Error($"Could not determine rid graph generation runtime for platform {RuntimeEnvironment.OperatingSystemPlatform}");
|
||||
}
|
||||
|
||||
// TODO: Issue #2408: Remove corehost and hostfxr from the Shared FX.
|
||||
File.Copy(
|
||||
Path.Combine(Dirs.CorehostLocked, DotnetHostBaseName),
|
||||
Path.Combine(SharedFrameworkNameAndVersionRoot, $"corehost{Constants.ExeSuffix}"), true);
|
||||
File.Copy(
|
||||
Path.Combine(Dirs.CorehostLocked, DotnetHostFxrBaseName),
|
||||
Path.Combine(SharedFrameworkNameAndVersionRoot, DotnetHostFxrBaseName), true);
|
||||
|
||||
// Hostpolicy should be the latest and not the locked version as it is supposed to evolve for
|
||||
// the framework and has a tight coupling with coreclr's API in the framework.
|
||||
File.Copy(
|
||||
Path.Combine(Dirs.CorehostLatest, HostPolicyBaseName),
|
||||
Path.Combine(SharedFrameworkNameAndVersionRoot, HostPolicyBaseName), true);
|
||||
|
||||
if (File.Exists(Path.Combine(SharedFrameworkNameAndVersionRoot, "mscorlib.ni.dll")))
|
||||
{
|
||||
// Publish already places the crossgen'd version of mscorlib into the output, so we can
|
||||
// remove the IL version
|
||||
File.Delete(Path.Combine(SharedFrameworkNameAndVersionRoot, "mscorlib.dll"));
|
||||
}
|
||||
|
||||
CrossgenUtil.CrossgenDirectory(c, SharedFrameworkNameAndVersionRoot);
|
||||
|
||||
// Generate .version file for sharedfx
|
||||
var version = SharedFrameworkNugetVersion;
|
||||
var content = $@"{c.BuildContext["CommitHash"]}{Environment.NewLine}{version}{Environment.NewLine}";
|
||||
File.WriteAllText(Path.Combine(SharedFrameworkNameAndVersionRoot, ".version"), content);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generates the real shared framework project that will get published.
|
||||
/// </summary>
|
||||
/// <param name="sharedFrameworkTemplatePath">The "sharedFramework" source template folder.</param>
|
||||
private static string GenerateSharedFrameworkProject(BuildTargetContext c, string sharedFrameworkTemplatePath, string rid)
|
||||
{
|
||||
string sharedFrameworkProjectPath = Path.Combine(Dirs.Intermediate, "sharedFramework", "framework");
|
||||
Utils.DeleteDirectory(sharedFrameworkProjectPath);
|
||||
CopyRecursive(sharedFrameworkTemplatePath, sharedFrameworkProjectPath, true);
|
||||
|
||||
string templateFile = Path.Combine(sharedFrameworkProjectPath, "project.json.template");
|
||||
JObject sharedFrameworkProject = JsonUtils.ReadProject(templateFile);
|
||||
sharedFrameworkProject["dependencies"]["Microsoft.NETCore.App"] = c.BuildContext.Get<BuildVersion>("BuildVersion").NetCoreAppVersion;
|
||||
((JObject)sharedFrameworkProject["runtimes"]).RemoveAll();
|
||||
sharedFrameworkProject["runtimes"][rid] = new JObject();
|
||||
|
||||
string projectJsonPath = Path.Combine(sharedFrameworkProjectPath, "project.json");
|
||||
JsonUtils.WriteProject(sharedFrameworkProject, projectJsonPath);
|
||||
|
||||
Rm(templateFile);
|
||||
|
||||
return sharedFrameworkProjectPath;
|
||||
}
|
||||
|
||||
private static BuildTargetResult CompileCliSdk(BuildTargetContext c, DotNetCli dotnet, string outputDir)
|
||||
private static BuildTargetResult CompileCliSdk(BuildTargetContext c, DotNetCli dotnet, string rootOutputDirectory)
|
||||
{
|
||||
var configuration = c.BuildContext.Get<string>("Configuration");
|
||||
var buildVersion = c.BuildContext.Get<BuildVersion>("BuildVersion");
|
||||
var srcDir = Path.Combine(c.BuildContext.BuildDirectory, "src");
|
||||
outputDir = Path.Combine(outputDir, "sdk", buildVersion.NuGetVersion);
|
||||
var sdkOutputDirectory = Path.Combine(rootOutputDirectory, "sdk", buildVersion.NuGetVersion);
|
||||
|
||||
CopySharedFramework(Dirs.SharedFrameworkPublish, rootOutputDirectory);
|
||||
|
||||
FS.CleanBinObj(c, srcDir);
|
||||
Rmdir(outputDir);
|
||||
Mkdirp(outputDir);
|
||||
Rmdir(sdkOutputDirectory);
|
||||
Mkdirp(sdkOutputDirectory);
|
||||
|
||||
foreach (var project in ProjectsToPublish)
|
||||
{
|
||||
dotnet.Publish(
|
||||
"--native-subdirectory",
|
||||
"--output", outputDir,
|
||||
"--output", sdkOutputDirectory,
|
||||
"--configuration", configuration,
|
||||
"--version-suffix", buildVersion.CommitCountString,
|
||||
Path.Combine(srcDir, project))
|
||||
|
@ -378,38 +179,36 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
.EnsureSuccessful();
|
||||
}
|
||||
|
||||
FixModeFlags(outputDir);
|
||||
FixModeFlags(sdkOutputDirectory);
|
||||
|
||||
string compilersProject = Path.Combine(Dirs.RepoRoot, "src", "compilers");
|
||||
dotnet.Publish(compilersProject,
|
||||
"--output",
|
||||
outputDir,
|
||||
sdkOutputDirectory,
|
||||
"--framework",
|
||||
"netstandard1.5")
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
|
||||
var compilersDeps = Path.Combine(outputDir, "compilers.deps.json");
|
||||
var compilersRuntimeConfig = Path.Combine(outputDir, "compilers.runtimeconfig.json");
|
||||
var compilersDeps = Path.Combine(sdkOutputDirectory, "compilers.deps.json");
|
||||
var compilersRuntimeConfig = Path.Combine(sdkOutputDirectory, "compilers.runtimeconfig.json");
|
||||
|
||||
File.Copy(Path.Combine(Dirs.CorehostLocked, DotnetHostBaseName), Path.Combine(outputDir, $"corehost{Constants.ExeSuffix}"), overwrite: true);
|
||||
File.Copy(Path.Combine(Dirs.CorehostLocked, $"{Constants.DynamicLibPrefix}hostfxr{Constants.DynamicLibSuffix}"), Path.Combine(outputDir, $"{Constants.DynamicLibPrefix}hostfxr{Constants.DynamicLibSuffix}"), overwrite: true);
|
||||
File.Copy(Path.Combine(Dirs.CorehostLatest, $"{Constants.DynamicLibPrefix}hostpolicy{Constants.DynamicLibSuffix}"), Path.Combine(outputDir, $"{Constants.DynamicLibPrefix}hostpolicy{Constants.DynamicLibSuffix}"), overwrite: true);
|
||||
|
||||
var binaryToCorehostifyRelDir = Path.Combine("runtimes", "any", "native");
|
||||
var binaryToCorehostifyOutDir = Path.Combine(outputDir, binaryToCorehostifyRelDir);
|
||||
var binaryToCorehostifyOutDir = Path.Combine(sdkOutputDirectory, binaryToCorehostifyRelDir);
|
||||
// Corehostify binaries
|
||||
foreach (var binaryToCorehostify in BinariesForCoreHost)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Yes, it is .exe even on Linux. This is the managed exe we're working with
|
||||
File.Copy(Path.Combine(binaryToCorehostifyOutDir, $"{binaryToCorehostify}.exe"), Path.Combine(outputDir, $"{binaryToCorehostify}.dll"));
|
||||
File.Copy(Path.Combine(binaryToCorehostifyOutDir, $"{binaryToCorehostify}.exe"), Path.Combine(sdkOutputDirectory, $"{binaryToCorehostify}.dll"));
|
||||
File.Delete(Path.Combine(binaryToCorehostifyOutDir, $"{binaryToCorehostify}.exe"));
|
||||
File.Copy(compilersDeps, Path.Combine(outputDir, binaryToCorehostify + ".deps.json"));
|
||||
File.Copy(compilersRuntimeConfig, Path.Combine(outputDir, binaryToCorehostify + ".runtimeconfig.json"));
|
||||
var binaryToCoreHostifyDeps = Path.Combine(outputDir, binaryToCorehostify + ".deps.json");
|
||||
ChangeEntryPointLibraryName(binaryToCoreHostifyDeps, binaryToCorehostify);
|
||||
var binaryToCoreHostifyDeps = Path.Combine(sdkOutputDirectory, binaryToCorehostify + ".deps.json");
|
||||
|
||||
File.Copy(compilersDeps, Path.Combine(sdkOutputDirectory, binaryToCorehostify + ".deps.json"));
|
||||
File.Copy(compilersRuntimeConfig, Path.Combine(sdkOutputDirectory, binaryToCorehostify + ".runtimeconfig.json"));
|
||||
PublishMutationUtilties.ChangeEntryPointLibraryName(binaryToCoreHostifyDeps, binaryToCorehostify);
|
||||
foreach (var binaryToRemove in new string[] { "csc", "vbc" })
|
||||
{
|
||||
var assetPath = Path.Combine(binaryToCorehostifyRelDir, $"{binaryToRemove}.exe").Replace(Path.DirectorySeparatorChar, '/');
|
||||
|
@ -423,16 +222,40 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
}
|
||||
|
||||
// cleanup compilers project output we don't need
|
||||
DeleteMainPublishOutput(outputDir, "compilers");
|
||||
File.Delete(compilersDeps);
|
||||
File.Delete(compilersRuntimeConfig);
|
||||
PublishMutationUtilties.CleanPublishOutput(
|
||||
sdkOutputDirectory,
|
||||
"compilers",
|
||||
deleteRuntimeConfigJson: true,
|
||||
deleteDepsJson: true);
|
||||
|
||||
CrossgenUtil.CrossgenDirectory(c, outputDir);
|
||||
// Crossgen SDK directory
|
||||
var sharedFrameworkNugetVersion = DependencyVersions.SharedFrameworkVersion;
|
||||
var sharedFrameworkNameVersionPath = SharedFrameworkPublisher.GetSharedFrameworkPublishPath(
|
||||
rootOutputDirectory,
|
||||
sharedFrameworkNugetVersion);
|
||||
|
||||
// Copy Host to SDK Directory
|
||||
File.Copy(
|
||||
Path.Combine(sharedFrameworkNameVersionPath, HostArtifactNames.DotnetHostBaseName),
|
||||
Path.Combine(sdkOutputDirectory, $"corehost{Constants.ExeSuffix}"),
|
||||
overwrite: true);
|
||||
File.Copy(
|
||||
Path.Combine(sharedFrameworkNameVersionPath, HostArtifactNames.DotnetHostFxrBaseName),
|
||||
Path.Combine(sdkOutputDirectory, HostArtifactNames.DotnetHostFxrBaseName),
|
||||
overwrite: true);
|
||||
File.Copy(
|
||||
Path.Combine(sharedFrameworkNameVersionPath, HostArtifactNames.HostPolicyBaseName),
|
||||
Path.Combine(sdkOutputDirectory, HostArtifactNames.HostPolicyBaseName),
|
||||
overwrite: true);
|
||||
|
||||
CrossgenUtil.CrossgenDirectory(
|
||||
sharedFrameworkNameVersionPath,
|
||||
sdkOutputDirectory);
|
||||
|
||||
// Generate .version file
|
||||
var version = buildVersion.NuGetVersion;
|
||||
var content = $@"{c.BuildContext["CommitHash"]}{Environment.NewLine}{version}{Environment.NewLine}";
|
||||
File.WriteAllText(Path.Combine(outputDir, ".version"), content);
|
||||
File.WriteAllText(Path.Combine(sdkOutputDirectory, ".version"), content);
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
@ -471,57 +294,9 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
}
|
||||
}
|
||||
|
||||
private static void ChangeEntryPointLibraryName(string depsFile, string newName)
|
||||
private static void CopySharedFramework(string sharedFrameworkPublish, string rootOutputDirectory)
|
||||
{
|
||||
JToken deps;
|
||||
using (var file = File.OpenText(depsFile))
|
||||
using (JsonTextReader reader = new JsonTextReader(file))
|
||||
{
|
||||
deps = JObject.ReadFrom(reader);
|
||||
}
|
||||
|
||||
string version = null;
|
||||
foreach (JProperty target in deps["targets"])
|
||||
{
|
||||
var targetLibrary = target.Value.Children<JProperty>().FirstOrDefault();
|
||||
if (targetLibrary == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
version = targetLibrary.Name.Substring(targetLibrary.Name.IndexOf('/') + 1);
|
||||
if (newName == null)
|
||||
{
|
||||
targetLibrary.Remove();
|
||||
}
|
||||
else
|
||||
{
|
||||
targetLibrary.Replace(new JProperty(newName + '/' + version, targetLibrary.Value));
|
||||
}
|
||||
}
|
||||
if (version != null)
|
||||
{
|
||||
var library = deps["libraries"].Children<JProperty>().First();
|
||||
if (newName == null)
|
||||
{
|
||||
library.Remove();
|
||||
}
|
||||
else
|
||||
{
|
||||
library.Replace(new JProperty(newName + '/' + version, library.Value));
|
||||
}
|
||||
using (var file = File.CreateText(depsFile))
|
||||
using (var writer = new JsonTextWriter(file) { Formatting = Formatting.Indented })
|
||||
{
|
||||
deps.WriteTo(writer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void DeleteMainPublishOutput(string path, string name)
|
||||
{
|
||||
File.Delete(Path.Combine(path, $"{name}{Constants.ExeSuffix}"));
|
||||
File.Delete(Path.Combine(path, $"{name}.dll"));
|
||||
File.Delete(Path.Combine(path, $"{name}.pdb"));
|
||||
CopyRecursive(sharedFrameworkPublish, rootOutputDirectory);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,9 +12,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
{
|
||||
public class DebTargets
|
||||
{
|
||||
[Target(nameof(GenerateSharedHostDeb),
|
||||
nameof(GenerateSharedFrameworkDeb),
|
||||
nameof(GenerateSdkDeb))]
|
||||
[Target(nameof(GenerateSdkDeb))]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||
public static BuildTargetResult GenerateDebs(BuildTargetContext c)
|
||||
{
|
||||
|
@ -52,7 +50,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
"-m", manPagesDir,
|
||||
"--framework-debian-package-name", sharedFxDebianPackageName,
|
||||
"--framework-nuget-name", Monikers.SharedFrameworkName,
|
||||
"--framework-nuget-version", c.BuildContext.Get<string>("SharedFrameworkNugetVersion"),
|
||||
"--framework-nuget-version", DependencyVersions.SharedFrameworkVersion,
|
||||
"--previous-version-url", previousVersionURL,
|
||||
"--obj-root", objRoot)
|
||||
.Execute()
|
||||
|
@ -60,59 +58,6 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||
public static BuildTargetResult GenerateSharedHostDeb(BuildTargetContext c)
|
||||
{
|
||||
var packageName = Monikers.GetDebianSharedHostPackageName(c);
|
||||
var version = c.BuildContext.Get<HostVersion>("HostVersion").LockedHostVersion;
|
||||
var inputRoot = c.BuildContext.Get<string>("SharedHostPublishRoot");
|
||||
var debFile = c.BuildContext.Get<string>("SharedHostInstallerFile");
|
||||
var objRoot = Path.Combine(Dirs.Output, "obj", "debian", "sharedhost");
|
||||
var manPagesDir = Path.Combine(Dirs.RepoRoot, "Documentation", "manpages");
|
||||
|
||||
if (Directory.Exists(objRoot))
|
||||
{
|
||||
Directory.Delete(objRoot, true);
|
||||
}
|
||||
|
||||
Directory.CreateDirectory(objRoot);
|
||||
|
||||
Cmd(Path.Combine(Dirs.RepoRoot, "scripts", "package", "package-sharedhost-debian.sh"),
|
||||
"--input", inputRoot, "--output", debFile, "-b", Monikers.SharedHostBrandName,
|
||||
"--obj-root", objRoot, "--version", version, "-m", manPagesDir)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(InstallSharedHost))]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||
public static BuildTargetResult GenerateSharedFrameworkDeb(BuildTargetContext c)
|
||||
{
|
||||
var packageName = Monikers.GetDebianSharedFrameworkPackageName(c);
|
||||
var version = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
|
||||
var inputRoot = c.BuildContext.Get<string>("SharedFrameworkPublishRoot");
|
||||
var debFile = c.BuildContext.Get<string>("SharedFrameworkInstallerFile");
|
||||
var objRoot = Path.Combine(Dirs.Output, "obj", "debian", "sharedframework");
|
||||
|
||||
if (Directory.Exists(objRoot))
|
||||
{
|
||||
Directory.Delete(objRoot, true);
|
||||
}
|
||||
|
||||
Directory.CreateDirectory(objRoot);
|
||||
|
||||
Cmd(Path.Combine(Dirs.RepoRoot, "scripts", "package", "package-sharedframework-debian.sh"),
|
||||
"--input", inputRoot, "--output", debFile, "--package-name", packageName, "-b", Monikers.SharedFxBrandName,
|
||||
"--framework-nuget-name", Monikers.SharedFrameworkName,
|
||||
"--framework-nuget-version", c.BuildContext.Get<string>("SharedFrameworkNugetVersion"),
|
||||
"--obj-root", objRoot, "--version", version)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(InstallSDK),
|
||||
nameof(RunE2ETest),
|
||||
nameof(RemovePackages))]
|
||||
|
|
|
@ -33,12 +33,8 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
private static string SharedFrameworkMsi { get; set; }
|
||||
|
||||
private static string SharedFrameworkBundle { get; set; }
|
||||
|
||||
private static string SdkEngine { get; set; }
|
||||
|
||||
private static string SharedFrameworkEngine { get; set; }
|
||||
|
||||
private static string MsiVersion { get; set; }
|
||||
|
||||
private static string CliDisplayVersion { get; set; }
|
||||
|
@ -85,10 +81,8 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
SdkMsi = Path.ChangeExtension(SdkBundle, "msi");
|
||||
SdkEngine = GetEngineName(SdkBundle);
|
||||
|
||||
SharedFrameworkBundle = c.BuildContext.Get<string>("CombinedFrameworkHostInstallerFile");
|
||||
SharedHostMsi = Path.ChangeExtension(c.BuildContext.Get<string>("SharedHostInstallerFile"), "msi");
|
||||
SharedFrameworkMsi = Path.ChangeExtension(c.BuildContext.Get<string>("SharedFrameworkInstallerFile"), "msi");
|
||||
SharedFrameworkEngine = GetEngineName(SharedFrameworkBundle);
|
||||
SharedHostMsi = Path.ChangeExtension(c.BuildContext.Get<string>("SharedHostInstallerFile"), "msi");
|
||||
|
||||
var buildVersion = c.BuildContext.Get<BuildVersion>("BuildVersion");
|
||||
MsiVersion = buildVersion.GenerateMsiVersion();
|
||||
|
@ -100,8 +94,6 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
}
|
||||
|
||||
[Target(nameof(MsiTargets.InitMsi),
|
||||
nameof(GenerateDotnetSharedHostMsi),
|
||||
nameof(GenerateDotnetSharedFrameworkMsi),
|
||||
nameof(GenerateCliSdkMsi))]
|
||||
[BuildPlatforms(BuildPlatform.Windows)]
|
||||
public static BuildTargetResult GenerateMsis(BuildTargetContext c)
|
||||
|
@ -110,8 +102,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
}
|
||||
|
||||
[Target(nameof(MsiTargets.InitMsi),
|
||||
nameof(GenerateCliSdkBundle),
|
||||
nameof(GenerateSharedFxBundle))]
|
||||
nameof(GenerateCliSdkBundle))]
|
||||
[BuildPlatforms(BuildPlatform.Windows)]
|
||||
public static BuildTargetResult GenerateBundles(BuildTargetContext c)
|
||||
{
|
||||
|
@ -134,58 +125,6 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.Windows)]
|
||||
public static BuildTargetResult GenerateDotnetSharedHostMsi(BuildTargetContext c)
|
||||
{
|
||||
var hostVersion = c.BuildContext.Get<HostVersion>("HostVersion");
|
||||
var hostMsiVersion = hostVersion.GenerateMsiVersion();
|
||||
var hostNugetVersion = hostVersion.LockedHostVersion;
|
||||
var inputDir = c.BuildContext.Get<string>("SharedHostPublishRoot");
|
||||
var wixObjRoot = Path.Combine(Dirs.Output, "obj", "wix", "sharedhost");
|
||||
var sharedHostBrandName = $"'{Monikers.SharedHostBrandName}'";
|
||||
|
||||
if (Directory.Exists(wixObjRoot))
|
||||
{
|
||||
Utils.DeleteDirectory(wixObjRoot);
|
||||
}
|
||||
Directory.CreateDirectory(wixObjRoot);
|
||||
|
||||
Cmd("powershell", "-NoProfile", "-NoLogo",
|
||||
Path.Combine(Dirs.RepoRoot, "packaging", "windows", "host", "generatemsi.ps1"),
|
||||
inputDir, SharedHostMsi, WixRoot, sharedHostBrandName, hostMsiVersion, hostNugetVersion, Arch, wixObjRoot)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.Windows)]
|
||||
public static BuildTargetResult GenerateDotnetSharedFrameworkMsi(BuildTargetContext c)
|
||||
{
|
||||
var inputDir = c.BuildContext.Get<string>("SharedFrameworkPublishRoot");
|
||||
var sharedFrameworkNuGetName = Monikers.SharedFrameworkName;
|
||||
var sharedFrameworkNuGetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
|
||||
var msiVerison = sharedFrameworkNuGetVersion.Split('-')[0];
|
||||
var upgradeCode = Utils.GenerateGuidFromName(SharedFrameworkMsi).ToString().ToUpper();
|
||||
var wixObjRoot = Path.Combine(Dirs.Output, "obj", "wix", "sharedframework");
|
||||
var sharedFxBrandName = $"'{Monikers.SharedFxBrandName}'";
|
||||
|
||||
if (Directory.Exists(wixObjRoot))
|
||||
{
|
||||
Utils.DeleteDirectory(wixObjRoot);
|
||||
}
|
||||
Directory.CreateDirectory(wixObjRoot);
|
||||
|
||||
Cmd("powershell", "-NoProfile", "-NoLogo",
|
||||
Path.Combine(Dirs.RepoRoot, "packaging", "windows", "sharedframework", "generatemsi.ps1"),
|
||||
inputDir, SharedFrameworkMsi, WixRoot, sharedFxBrandName, msiVerison, sharedFrameworkNuGetName, sharedFrameworkNuGetVersion, upgradeCode, Arch, wixObjRoot)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
|
||||
[Target(nameof(MsiTargets.InitMsi))]
|
||||
[BuildPlatforms(BuildPlatform.Windows)]
|
||||
public static BuildTargetResult GenerateCliSdkBundle(BuildTargetContext c)
|
||||
|
@ -202,29 +141,11 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(MsiTargets.InitMsi))]
|
||||
[BuildPlatforms(BuildPlatform.Windows)]
|
||||
public static BuildTargetResult GenerateSharedFxBundle(BuildTargetContext c)
|
||||
{
|
||||
var sharedFrameworkNuGetName = Monikers.SharedFrameworkName;
|
||||
var sharedFrameworkNuGetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
|
||||
var upgradeCode = Utils.GenerateGuidFromName(SharedFrameworkBundle).ToString().ToUpper();
|
||||
var sharedFxBrandName = $"'{Monikers.SharedFxBrandName}'";
|
||||
|
||||
Cmd("powershell", "-NoProfile", "-NoLogo",
|
||||
Path.Combine(Dirs.RepoRoot, "packaging", "windows", "sharedframework", "generatebundle.ps1"),
|
||||
SharedFrameworkMsi, SharedHostMsi, SharedFrameworkBundle, WixRoot, sharedFxBrandName, MsiVersion, CliDisplayVersion, sharedFrameworkNuGetName, sharedFrameworkNuGetVersion, upgradeCode, Arch)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(MsiTargets.InitMsi))]
|
||||
[BuildPlatforms(BuildPlatform.Windows)]
|
||||
public static BuildTargetResult ExtractEngineFromBundle(BuildTargetContext c)
|
||||
{
|
||||
ExtractEngineFromBundleHelper(SdkBundle, SdkEngine);
|
||||
ExtractEngineFromBundleHelper(SharedFrameworkBundle, SharedFrameworkEngine);
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
|
@ -233,16 +154,9 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
public static BuildTargetResult ReattachEngineToBundle(BuildTargetContext c)
|
||||
{
|
||||
ReattachEngineToBundleHelper(SdkBundle, SdkEngine);
|
||||
ReattachEngineToBundleHelper(SharedFrameworkBundle, SharedFrameworkEngine);
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
private static string GetEngineName(string bundle)
|
||||
{
|
||||
var engine = $"{Path.GetFileNameWithoutExtension(bundle)}-{ENGINE}";
|
||||
return Path.Combine(Path.GetDirectoryName(bundle), engine);
|
||||
}
|
||||
|
||||
private static void ExtractEngineFromBundleHelper(string bundle, string engine)
|
||||
{
|
||||
Cmd($"{WixRoot}\\insignia.exe", "-ib", bundle, "-o", engine)
|
||||
|
@ -258,5 +172,11 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
File.Delete(engine);
|
||||
}
|
||||
|
||||
private static string GetEngineName(string bundle)
|
||||
{
|
||||
var engine = $"{Path.GetFileNameWithoutExtension(bundle)}-{ENGINE}";
|
||||
return Path.Combine(Path.GetDirectoryName(bundle), engine);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,6 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
nameof(PackageTargets.CopySharedHostLayout),
|
||||
nameof(PackageTargets.CopySharedFxLayout),
|
||||
nameof(PackageTargets.CopyCombinedFrameworkSDKHostLayout),
|
||||
nameof(PackageTargets.CopyCombinedFrameworkHostLayout),
|
||||
nameof(PackageTargets.CopyCombinedFrameworkSDKLayout))]
|
||||
public static BuildTargetResult InitPackage(BuildTargetContext c)
|
||||
{
|
||||
|
@ -142,26 +141,6 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult CopyCombinedFrameworkHostLayout(BuildTargetContext c)
|
||||
{
|
||||
var combinedRoot = Path.Combine(Dirs.Output, "obj", "combined-framework-host");
|
||||
if (Directory.Exists(combinedRoot))
|
||||
{
|
||||
Utils.DeleteDirectory(combinedRoot);
|
||||
}
|
||||
|
||||
|
||||
string sharedFrameworkPublishRoot = c.BuildContext.Get<string>("SharedFrameworkPublishRoot");
|
||||
Utils.CopyDirectoryRecursively(sharedFrameworkPublishRoot, combinedRoot);
|
||||
|
||||
string sharedHostPublishRoot = c.BuildContext.Get<string>("SharedHostPublishRoot");
|
||||
Utils.CopyDirectoryRecursively(sharedHostPublishRoot, combinedRoot);
|
||||
|
||||
c.BuildContext["CombinedFrameworkHostRoot"] = combinedRoot;
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult CopyCombinedFrameworkSDKLayout(BuildTargetContext c)
|
||||
{
|
||||
|
@ -192,7 +171,6 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
public static BuildTargetResult GenerateZip(BuildTargetContext c)
|
||||
{
|
||||
CreateZipFromDirectory(c.BuildContext.Get<string>("CombinedFrameworkSDKHostRoot"), c.BuildContext.Get<string>("CombinedFrameworkSDKHostCompressedFile"));
|
||||
CreateZipFromDirectory(c.BuildContext.Get<string>("CombinedFrameworkHostRoot"), c.BuildContext.Get<string>("CombinedFrameworkHostCompressedFile"));
|
||||
CreateZipFromDirectory(c.BuildContext.Get<string>("CombinedFrameworkSDKRoot"), c.BuildContext.Get<string>("CombinedFrameworkSDKCompressedFile"));
|
||||
CreateZipFromDirectory(Path.Combine(Dirs.Stage2Symbols, "sdk"), c.BuildContext.Get<string>("SdkSymbolsCompressedFile"));
|
||||
|
||||
|
@ -204,7 +182,6 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
public static BuildTargetResult GenerateTarBall(BuildTargetContext c)
|
||||
{
|
||||
CreateTarBallFromDirectory(c.BuildContext.Get<string>("CombinedFrameworkSDKHostRoot"), c.BuildContext.Get<string>("CombinedFrameworkSDKHostCompressedFile"));
|
||||
CreateTarBallFromDirectory(c.BuildContext.Get<string>("CombinedFrameworkHostRoot"), c.BuildContext.Get<string>("CombinedFrameworkHostCompressedFile"));
|
||||
|
||||
CreateTarBallFromDirectory(Path.Combine(Dirs.Stage2Symbols, "sdk"), c.BuildContext.Get<string>("SdkSymbolsCompressedFile"));
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
SharedHostComponentId = $"com.microsoft.dotnet.sharedhost.component.osx.x64";
|
||||
|
||||
string sharedFrameworkNugetName = Monikers.SharedFrameworkName;
|
||||
SharedFrameworkNugetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
|
||||
SharedFrameworkNugetVersion = DependencyVersions.SharedFrameworkVersion;
|
||||
SharedFxComponentId = $"com.microsoft.dotnet.sharedframework.{sharedFrameworkNugetName}.{SharedFrameworkNugetVersion}.component.osx.x64";
|
||||
SharedFxPkgId = $"com.microsoft.dotnet.{sharedFrameworkNugetName}.{SharedFrameworkNugetVersion}.osx.x64";
|
||||
|
||||
|
@ -42,7 +42,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(InitPkg), nameof(GenerateSharedFrameworkProductArchive), nameof(GenerateCLISdkProductArchive))]
|
||||
[Target(nameof(InitPkg), nameof(GenerateCLISdkProductArchive))]
|
||||
[BuildPlatforms(BuildPlatform.OSX)]
|
||||
public static BuildTargetResult GeneratePkgs(BuildTargetContext c)
|
||||
{
|
||||
|
@ -107,85 +107,5 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(GenerateSharedFrameworkPkg), nameof(GenerateSharedHostPkg))]
|
||||
[BuildPlatforms(BuildPlatform.OSX)]
|
||||
public static BuildTargetResult GenerateSharedFrameworkProductArchive(BuildTargetContext c)
|
||||
{
|
||||
string resourcePath = Path.Combine(Dirs.RepoRoot, "packaging", "osx", "sharedframework", "resources");
|
||||
string outFilePath = Path.Combine(PkgsIntermediateDir, c.BuildContext.Get<string>("CombinedFrameworkHostInstallerFile"));
|
||||
|
||||
string inputDistTemplatePath = Path.Combine(
|
||||
Dirs.RepoRoot,
|
||||
"packaging",
|
||||
"osx",
|
||||
"sharedframework",
|
||||
"shared-framework-distribution-template.xml");
|
||||
string distTemplate = File.ReadAllText(inputDistTemplatePath);
|
||||
string distributionPath = Path.Combine(PkgsIntermediateDir, "shared-framework-formatted-distribution.xml");
|
||||
string formattedDistContents =
|
||||
distTemplate.Replace("{SharedFxComponentId}", SharedFxComponentId)
|
||||
.Replace("{SharedHostComponentId}", SharedHostComponentId)
|
||||
.Replace("{SharedFrameworkNugetName}", Monikers.SharedFrameworkName)
|
||||
.Replace("{SharedFrameworkNugetVersion}", SharedFrameworkNugetVersion)
|
||||
.Replace("{SharedFxBrandName}", Monikers.SharedFxBrandName)
|
||||
.Replace("{SharedHostBrandName}", Monikers.SharedHostBrandName);
|
||||
File.WriteAllText(distributionPath, formattedDistContents);
|
||||
|
||||
Cmd("productbuild",
|
||||
"--version", SharedFrameworkNugetVersion,
|
||||
"--identifier", SharedFxPkgId,
|
||||
"--package-path", PkgsIntermediateDir,
|
||||
"--resources", resourcePath,
|
||||
"--distribution", distributionPath,
|
||||
outFilePath)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.OSX)]
|
||||
public static BuildTargetResult GenerateSharedFrameworkPkg(BuildTargetContext c)
|
||||
{
|
||||
string outFilePath = Path.Combine(PkgsIntermediateDir, SharedFxComponentId + ".pkg");
|
||||
string installLocation = "/usr/local/share/dotnet";
|
||||
string scriptsLocation = Path.Combine(Dirs.RepoRoot, "packaging", "osx", "sharedframework", "scripts");
|
||||
|
||||
Cmd("pkgbuild",
|
||||
"--root", c.BuildContext.Get<string>("SharedFrameworkPublishRoot"),
|
||||
"--identifier", SharedFxComponentId,
|
||||
"--version", SharedFrameworkNugetVersion,
|
||||
"--install-location", installLocation,
|
||||
"--scripts", scriptsLocation,
|
||||
outFilePath)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.OSX)]
|
||||
public static BuildTargetResult GenerateSharedHostPkg(BuildTargetContext c)
|
||||
{
|
||||
string version = c.BuildContext.Get<HostVersion>("HostVersion").LockedHostVersion;
|
||||
string outFilePath = Path.Combine(PkgsIntermediateDir, SharedHostComponentId + ".pkg");
|
||||
string installLocation = "/usr/local/share/dotnet";
|
||||
string scriptsLocation = Path.Combine(Dirs.RepoRoot, "packaging", "osx", "sharedhost", "scripts");
|
||||
|
||||
Cmd("pkgbuild",
|
||||
"--root", c.BuildContext.Get<string>("SharedHostPublishRoot"),
|
||||
"--identifier", SharedHostComponentId,
|
||||
"--version", version,
|
||||
"--install-location", installLocation,
|
||||
"--scripts", scriptsLocation,
|
||||
outFilePath)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,12 +12,13 @@ using Newtonsoft.Json.Linq;
|
|||
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
|
||||
using static Microsoft.DotNet.Cli.Build.FS;
|
||||
using static Microsoft.DotNet.Cli.Build.Utils;
|
||||
using System.IO.Compression;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build
|
||||
{
|
||||
public class PrepareTargets
|
||||
{
|
||||
[Target(nameof(Init), nameof(RestorePackages))]
|
||||
[Target(nameof(Init), nameof(DownloadHostAndSharedFxArtifacts), nameof(RestorePackages))]
|
||||
public static BuildTargetResult Prepare(BuildTargetContext c) => c.Success();
|
||||
|
||||
[Target(nameof(CheckPrereqCmakePresent), nameof(CheckPlatformDependencies))]
|
||||
|
@ -75,16 +76,10 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
ReleaseSuffix = branchInfo["RELEASE_SUFFIX"],
|
||||
CommitCount = commitCount
|
||||
};
|
||||
|
||||
var hostVersion = new HostVersion()
|
||||
{
|
||||
CommitCount = commitCount
|
||||
};
|
||||
|
||||
|
||||
c.BuildContext["BuildVersion"] = buildVersion;
|
||||
c.BuildContext["HostVersion"] = hostVersion;
|
||||
c.BuildContext["CommitHash"] = commitHash;
|
||||
c.BuildContext["SharedFrameworkNugetVersion"] = buildVersion.NetCoreAppVersion;
|
||||
|
||||
c.Info($"Building Version: {buildVersion.SimpleVersion} (NuGet Packages: {buildVersion.NuGetVersion})");
|
||||
c.Info($"From Commit: {commitHash}");
|
||||
|
@ -106,7 +101,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
foreach (string templateFile in templateFiles)
|
||||
{
|
||||
JObject projectRoot = JsonUtils.ReadProject(templateFile);
|
||||
projectRoot["dependencies"]["Microsoft.NETCore.App"]["version"] = c.BuildContext.Get<BuildVersion>("BuildVersion").NetCoreAppVersion;
|
||||
projectRoot["dependencies"]["Microsoft.NETCore.App"]["version"] = DependencyVersions.SharedFrameworkVersion;
|
||||
JsonUtils.WriteProject(projectRoot, Path.ChangeExtension(templateFile, "template"));
|
||||
}
|
||||
|
||||
|
@ -146,17 +141,91 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
c.BuildContext["VersionBadge"] = Path.Combine(Dirs.Output, versionBadgeName);
|
||||
|
||||
var cliVersion = c.BuildContext.Get<BuildVersion>("BuildVersion").NuGetVersion;
|
||||
var sharedFrameworkVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
|
||||
var hostVersion = c.BuildContext.Get<HostVersion>("HostVersion").LockedHostVersion;
|
||||
var sharedFrameworkVersion = DependencyVersions.SharedFrameworkVersion;
|
||||
var hostVersion = DependencyVersions.SharedHostVersion;
|
||||
|
||||
// Generated Installers + Archives
|
||||
AddInstallerArtifactToContext(c, "dotnet-sdk", "Sdk", cliVersion);
|
||||
AddInstallerArtifactToContext(c, "dotnet-host", "SharedHost", hostVersion);
|
||||
AddInstallerArtifactToContext(c, "dotnet-sharedframework", "SharedFramework", sharedFrameworkVersion);
|
||||
AddInstallerArtifactToContext(c, "dotnet-dev", "CombinedFrameworkSDKHost", cliVersion);
|
||||
AddInstallerArtifactToContext(c, "dotnet", "CombinedFrameworkHost", sharedFrameworkVersion);
|
||||
AddInstallerArtifactToContext(c, "dotnet-sharedframework-sdk", "CombinedFrameworkSDK", cliVersion);
|
||||
AddInstallerArtifactToContext(c, "dotnet-sdk-debug", "SdkSymbols", cliVersion);
|
||||
|
||||
//Downloaded Installers + Archives
|
||||
AddInstallerArtifactToContext(c, "dotnet-host", "SharedHost", hostVersion);
|
||||
AddInstallerArtifactToContext(c, "dotnet-sharedframework", "SharedFramework", sharedFrameworkVersion);
|
||||
AddInstallerArtifactToContext(c, "dotnet", "CombinedFrameworkHost", sharedFrameworkVersion);
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(
|
||||
nameof(ExpectedBuildArtifacts),
|
||||
nameof(DownloadHostAndSharedFxArchives),
|
||||
nameof(DownloadHostAndSharedFxInstallers))]
|
||||
public static BuildTargetResult DownloadHostAndSharedFxArtifacts(BuildTargetContext c) => c.Success();
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult DownloadHostAndSharedFxArchives(BuildTargetContext c)
|
||||
{
|
||||
var sharedFrameworkVersion = DependencyVersions.SharedFrameworkVersion;
|
||||
var sharedFrameworkChannel = DependencyVersions.SharedFrameworkChannel;
|
||||
|
||||
var combinedSharedHostAndFrameworkArchiveFile = c.BuildContext.Get<string>("CombinedFrameworkHostCompressedFile");
|
||||
|
||||
Mkdirp(Path.GetDirectoryName(combinedSharedHostAndFrameworkArchiveFile));
|
||||
|
||||
AzurePublisher.DownloadFile(
|
||||
AzurePublisher.CalculateArchiveBlob(
|
||||
combinedSharedHostAndFrameworkArchiveFile,
|
||||
sharedFrameworkChannel,
|
||||
sharedFrameworkVersion),
|
||||
combinedSharedHostAndFrameworkArchiveFile).Wait();
|
||||
|
||||
// Unpack the combined archive to shared framework publish directory
|
||||
Rmdir(Dirs.SharedFrameworkPublish);
|
||||
Mkdirp(Dirs.SharedFrameworkPublish);
|
||||
if(CurrentPlatform.IsWindows)
|
||||
{
|
||||
ZipFile.ExtractToDirectory(combinedSharedHostAndFrameworkArchiveFile, Dirs.SharedFrameworkPublish);
|
||||
}
|
||||
else
|
||||
{
|
||||
Exec("tar", "xf", combinedSharedHostAndFrameworkArchiveFile, "-C", Dirs.SharedFrameworkPublish);
|
||||
}
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.Windows, BuildPlatform.OSX, BuildPlatform.Ubuntu)]
|
||||
public static BuildTargetResult DownloadHostAndSharedFxInstallers(BuildTargetContext c)
|
||||
{
|
||||
var sharedFrameworkVersion = DependencyVersions.SharedFrameworkVersion;
|
||||
var hostVersion = DependencyVersions.SharedHostVersion;
|
||||
|
||||
var sharedFrameworkChannel = DependencyVersions.SharedFrameworkChannel;
|
||||
var sharedHostChannel = DependencyVersions.SharedHostChannel;
|
||||
|
||||
var sharedFrameworkInstallerFile = c.BuildContext.Get<string>("SharedFrameworkInstallerFile");
|
||||
var sharedHostInstallerFile = c.BuildContext.Get<string>("SharedHostInstallerFile");
|
||||
|
||||
Mkdirp(Path.GetDirectoryName(sharedFrameworkInstallerFile));
|
||||
Mkdirp(Path.GetDirectoryName(sharedHostInstallerFile));
|
||||
|
||||
AzurePublisher.DownloadFile(
|
||||
AzurePublisher.CalculateInstallerBlob(
|
||||
sharedFrameworkInstallerFile,
|
||||
sharedFrameworkChannel,
|
||||
sharedFrameworkVersion),
|
||||
sharedFrameworkInstallerFile).Wait();
|
||||
|
||||
AzurePublisher.DownloadFile(
|
||||
AzurePublisher.CalculateInstallerBlob(
|
||||
sharedHostInstallerFile,
|
||||
sharedHostChannel,
|
||||
hostVersion),
|
||||
sharedHostInstallerFile).Wait();
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
|
@ -231,7 +300,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
{
|
||||
var dotnet = DotNetCli.Stage0;
|
||||
|
||||
dotnet.Restore("--verbosity", "verbose", "--disable-parallel", "--fallbacksource", Dirs.CorehostLocalPackages)
|
||||
dotnet.Restore("--verbosity", "verbose", "--disable-parallel")
|
||||
.WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "src"))
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
|
@ -424,7 +493,14 @@ cmake is required to build the native host 'corehost'";
|
|||
switch (CurrentPlatform.Current)
|
||||
{
|
||||
case BuildPlatform.Windows:
|
||||
installer = productName + ".exe";
|
||||
if (contextPrefix.Contains("Combined"))
|
||||
{
|
||||
installer = productName + ".exe";
|
||||
}
|
||||
else
|
||||
{
|
||||
installer = productName + ".msi";
|
||||
}
|
||||
break;
|
||||
case BuildPlatform.OSX:
|
||||
installer = productName + ".pkg";
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
CliVersion = c.BuildContext.Get<BuildVersion>("BuildVersion").SimpleVersion;
|
||||
CliNuGetVersion = c.BuildContext.Get<BuildVersion>("BuildVersion").NuGetVersion;
|
||||
SharedFrameworkNugetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
|
||||
SharedFrameworkNugetVersion = DependencyVersions.SharedFrameworkVersion;
|
||||
SharedHostNugetVersion = c.BuildContext.Get<HostVersion>("HostVersion").LockedHostVersion;
|
||||
Channel = c.BuildContext.Get<string>("Channel");
|
||||
|
||||
|
@ -91,28 +91,15 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
// Copy the latest CLI bits
|
||||
CopyBlobs($"{Channel}/Binaries/{CliNuGetVersion}/", targetContainer);
|
||||
|
||||
// Copy the shared framework
|
||||
CopyBlobs($"{Channel}/Binaries/{SharedFrameworkNugetVersion}/", targetContainer);
|
||||
|
||||
// Copy the latest installer files
|
||||
CopyBlobs($"{Channel}/Installers/{CliNuGetVersion}/", $"{Channel}/Installers/Latest/");
|
||||
|
||||
// Copy the shared framework installers
|
||||
CopyBlobs($"{Channel}/Installers/{SharedFrameworkNugetVersion}/", $"{Channel}/Installers/Latest/");
|
||||
|
||||
// Copy the shared host installers
|
||||
CopyBlobs($"{Channel}/Installers/{SharedHostNugetVersion}/", $"{Channel}/Installers/Latest/");
|
||||
|
||||
PublishCoreHostPackagesToFeed();
|
||||
|
||||
// Generate the CLI and SDK Version text files
|
||||
// Generate the SDK Version text files
|
||||
List<string> versionFiles = new List<string>() { "win.x86.version", "win.x64.version", "ubuntu.x64.version", "rhel.x64.version", "osx.x64.version", "debian.x64.version", "centos.x64.version" };
|
||||
string cliVersion = Utils.GetCliVersionFileContent(c);
|
||||
string sfxVersion = Utils.GetSharedFrameworkVersionFileContent(c);
|
||||
foreach (string version in versionFiles)
|
||||
{
|
||||
AzurePublisherTool.PublishStringToBlob($"{Channel}/dnvm/latest.{version}", cliVersion);
|
||||
AzurePublisherTool.PublishStringToBlob($"{Channel}/dnvm/latest.sharedfx.{version}", sfxVersion);
|
||||
}
|
||||
}
|
||||
finally
|
||||
|
@ -130,26 +117,13 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
{
|
||||
string source = blob.Replace("/dotnet/", "");
|
||||
string targetName = Path.GetFileName(blob)
|
||||
.Replace(CliNuGetVersion, "latest")
|
||||
.Replace(SharedFrameworkNugetVersion, "latest")
|
||||
.Replace(SharedHostNugetVersion, "latest");
|
||||
.Replace(CliNuGetVersion, "latest");
|
||||
|
||||
string target = $"{destinationFolder}{targetName}";
|
||||
AzurePublisherTool.CopyBlob(source, target);
|
||||
}
|
||||
}
|
||||
|
||||
private static void PublishCoreHostPackagesToFeed()
|
||||
{
|
||||
var hostBlob = $"{Channel}/Binaries/{SharedFrameworkNugetVersion}";
|
||||
|
||||
Directory.CreateDirectory(Dirs.PackagesNoRID);
|
||||
AzurePublisherTool.DownloadFiles(hostBlob, ".nupkg", Dirs.PackagesNoRID);
|
||||
|
||||
string nugetFeedUrl = EnvVars.EnsureVariable("NUGET_FEED_URL");
|
||||
string apiKey = EnvVars.EnsureVariable("NUGET_API_KEY");
|
||||
NuGetUtil.PushPackages(Dirs.PackagesNoRID, nugetFeedUrl, apiKey);
|
||||
}
|
||||
|
||||
private static bool CheckIfAllBuildsHavePublished()
|
||||
{
|
||||
Dictionary<string, bool> badges = new Dictionary<string, bool>()
|
||||
|
@ -198,29 +172,22 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
nameof(PublishTargets.PublishInstallerFilesToAzure),
|
||||
nameof(PublishTargets.PublishArchivesToAzure),
|
||||
/*nameof(PublishTargets.PublishDebFilesToDebianRepo),*/ //https://github.com/dotnet/cli/issues/2973
|
||||
nameof(PublishTargets.PublishCoreHostPackages),
|
||||
nameof(PublishTargets.PublishCliVersionBadge))]
|
||||
public static BuildTargetResult PublishArtifacts(BuildTargetContext c) => c.Success();
|
||||
|
||||
[Target(
|
||||
nameof(PublishTargets.PublishSharedHostInstallerFileToAzure),
|
||||
nameof(PublishTargets.PublishSharedFrameworkInstallerFileToAzure),
|
||||
nameof(PublishTargets.PublishSdkInstallerFileToAzure),
|
||||
nameof(PublishTargets.PublishCombinedFrameworkSDKHostInstallerFileToAzure),
|
||||
nameof(PublishTargets.PublishCombinedFrameworkHostInstallerFileToAzure))]
|
||||
nameof(PublishTargets.PublishCombinedFrameworkSDKHostInstallerFileToAzure))]
|
||||
public static BuildTargetResult PublishInstallerFilesToAzure(BuildTargetContext c) => c.Success();
|
||||
|
||||
[Target(
|
||||
nameof(PublishTargets.PublishCombinedHostFrameworkArchiveToAzure),
|
||||
nameof(PublishTargets.PublishCombinedHostFrameworkSdkArchiveToAzure),
|
||||
nameof(PublishTargets.PublishCombinedFrameworkSDKArchiveToAzure),
|
||||
nameof(PublishTargets.PublishSDKSymbolsArchiveToAzure))]
|
||||
public static BuildTargetResult PublishArchivesToAzure(BuildTargetContext c) => c.Success();
|
||||
|
||||
[Target(
|
||||
nameof(PublishSdkDebToDebianRepo),
|
||||
nameof(PublishSharedFrameworkDebToDebianRepo),
|
||||
nameof(PublishSharedHostDebToDebianRepo))]
|
||||
nameof(PublishSdkDebToDebianRepo))]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||
public static BuildTargetResult PublishDebFilesToDebianRepo(BuildTargetContext c)
|
||||
{
|
||||
|
@ -235,49 +202,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
AzurePublisherTool.PublishFile(versionBadgeBlob, versionBadge);
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult PublishCoreHostPackages(BuildTargetContext c)
|
||||
{
|
||||
foreach (var file in Directory.GetFiles(Dirs.CorehostLocalPackages, "*.nupkg"))
|
||||
{
|
||||
var hostBlob = $"{Channel}/Binaries/{SharedFrameworkNugetVersion}/{Path.GetFileName(file)}";
|
||||
AzurePublisherTool.PublishFile(hostBlob, file);
|
||||
Console.WriteLine($"Publishing package {hostBlob} to Azure.");
|
||||
}
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu, BuildPlatform.Windows)]
|
||||
public static BuildTargetResult PublishSharedHostInstallerFileToAzure(BuildTargetContext c)
|
||||
{
|
||||
var version = SharedHostNugetVersion;
|
||||
var installerFile = c.BuildContext.Get<string>("SharedHostInstallerFile");
|
||||
|
||||
if (CurrentPlatform.Current == BuildPlatform.Windows)
|
||||
{
|
||||
installerFile = Path.ChangeExtension(installerFile, "msi");
|
||||
}
|
||||
|
||||
AzurePublisherTool.PublishInstallerFile(installerFile, Channel, version);
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||
public static BuildTargetResult PublishSharedFrameworkInstallerFileToAzure(BuildTargetContext c)
|
||||
{
|
||||
var version = SharedFrameworkNugetVersion;
|
||||
var installerFile = c.BuildContext.Get<string>("SharedFrameworkInstallerFile");
|
||||
|
||||
AzurePublisherTool.PublishInstallerFile(installerFile, Channel, version);
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||
public static BuildTargetResult PublishSdkInstallerFileToAzure(BuildTargetContext c)
|
||||
|
@ -290,18 +215,6 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.Windows, BuildPlatform.OSX)]
|
||||
public static BuildTargetResult PublishCombinedFrameworkHostInstallerFileToAzure(BuildTargetContext c)
|
||||
{
|
||||
var version = SharedFrameworkNugetVersion;
|
||||
var installerFile = c.BuildContext.Get<string>("CombinedFrameworkHostInstallerFile");
|
||||
|
||||
AzurePublisherTool.PublishInstallerFile(installerFile, Channel, version);
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.Windows, BuildPlatform.OSX)]
|
||||
public static BuildTargetResult PublishCombinedFrameworkSDKHostInstallerFileToAzure(BuildTargetContext c)
|
||||
|
@ -348,16 +261,6 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult PublishCombinedHostFrameworkArchiveToAzure(BuildTargetContext c)
|
||||
{
|
||||
var version = SharedFrameworkNugetVersion;
|
||||
var archiveFile = c.BuildContext.Get<string>("CombinedFrameworkHostCompressedFile");
|
||||
|
||||
AzurePublisherTool.PublishArchive(archiveFile, Channel, version);
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||
public static BuildTargetResult PublishSdkDebToDebianRepo(BuildTargetContext c)
|
||||
|
@ -376,42 +279,6 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||
public static BuildTargetResult PublishSharedFrameworkDebToDebianRepo(BuildTargetContext c)
|
||||
{
|
||||
var version = SharedFrameworkNugetVersion;
|
||||
|
||||
var packageName = Monikers.GetDebianSharedFrameworkPackageName(c);
|
||||
var installerFile = c.BuildContext.Get<string>("SharedFrameworkInstallerFile");
|
||||
var uploadUrl = AzurePublisherTool.CalculateInstallerUploadUrl(installerFile, Channel, version);
|
||||
|
||||
DebRepoPublisherTool.PublishDebFileToDebianRepo(
|
||||
packageName,
|
||||
version,
|
||||
uploadUrl);
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||
public static BuildTargetResult PublishSharedHostDebToDebianRepo(BuildTargetContext c)
|
||||
{
|
||||
var version = SharedHostNugetVersion;
|
||||
|
||||
var packageName = Monikers.GetDebianSharedHostPackageName(c);
|
||||
var installerFile = c.BuildContext.Get<string>("SharedHostInstallerFile");
|
||||
var uploadUrl = AzurePublisherTool.CalculateInstallerUploadUrl(installerFile, Channel, version);
|
||||
|
||||
DebRepoPublisherTool.PublishDebFileToDebianRepo(
|
||||
packageName,
|
||||
version,
|
||||
uploadUrl);
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[Environment("DOCKER_HUB_REPO")]
|
||||
[Environment("DOCKER_HUB_TRIGGER_TOKEN")]
|
||||
|
|
|
@ -17,30 +17,14 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
public static readonly string[] TestProjects = new[]
|
||||
{
|
||||
"ArgumentForwardingTests",
|
||||
"crossgen.Tests",
|
||||
"EndToEnd",
|
||||
"dotnet.Tests",
|
||||
"dotnet-build.Tests",
|
||||
"dotnet-compile.Tests",
|
||||
"dotnet-compile.UnitTests",
|
||||
"dotnet-compile-fsc.Tests",
|
||||
"dotnet-new.Tests",
|
||||
"dotnet-pack.Tests",
|
||||
"dotnet-projectmodel-server.Tests",
|
||||
"dotnet-publish.Tests",
|
||||
"dotnet-resgen.Tests",
|
||||
"dotnet-run.Tests",
|
||||
"dotnet-run.UnitTests",
|
||||
"dotnet-test.Tests",
|
||||
"dotnet-test.UnitTests",
|
||||
// TODO: https://github.com/dotnet/cli/issues/3216
|
||||
//"Kestrel.Tests",
|
||||
"Microsoft.DotNet.Cli.Utils.Tests",
|
||||
"Microsoft.DotNet.Compiler.Common.Tests",
|
||||
"Microsoft.DotNet.ProjectModel.Tests",
|
||||
"Microsoft.Extensions.DependencyModel.Tests",
|
||||
"Performance"
|
||||
//"Microsoft.DotNet.Cli.Utils.Tests",
|
||||
//"Microsoft.DotNet.Compiler.Common.Tests",
|
||||
// "Microsoft.DotNet.ProjectModel.Tests",
|
||||
// "Microsoft.Extensions.DependencyModel.Tests",
|
||||
// "Performance"
|
||||
};
|
||||
|
||||
public static readonly string[] WindowsTestProjects = new[]
|
||||
|
@ -83,9 +67,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
CleanNuGetTempCache();
|
||||
|
||||
var dotnet = DotNetCli.Stage2;
|
||||
dotnet.Restore("--verbosity", "verbose",
|
||||
"--fallbacksource", Dirs.CorehostLocalPackages,
|
||||
"--fallbacksource", Dirs.CorehostDummyPackages)
|
||||
dotnet.Restore("--verbosity", "verbose")
|
||||
.WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "TestAssets", "TestPackages"))
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
|
@ -104,9 +86,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
var dotnet = DotNetCli.Stage2;
|
||||
dotnet.Restore(
|
||||
"--verbosity", "verbose",
|
||||
"--fallbacksource", Dirs.TestPackages,
|
||||
"--fallbacksource", Dirs.CorehostLocalPackages,
|
||||
"--fallbacksource", Dirs.CorehostDummyPackages)
|
||||
"--fallbacksource", Dirs.TestPackages)
|
||||
.WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "TestAssets", "TestProjects"))
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
|
@ -114,9 +94,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
// The 'ProjectModelServer' directory contains intentionally-unresolved dependencies, so don't check for success. Also, suppress the output
|
||||
dotnet.Restore(
|
||||
"--verbosity", "verbose",
|
||||
"--infer-runtimes",
|
||||
"--fallbacksource", Dirs.CorehostLocalPackages,
|
||||
"--fallbacksource", Dirs.CorehostDummyPackages)
|
||||
"--infer-runtimes")
|
||||
.WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "TestAssets", "ProjectModelServer", "DthTestProjects"))
|
||||
.Execute();
|
||||
|
||||
|
@ -137,9 +115,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
dotnet.Restore("--verbosity", "verbose",
|
||||
"--infer-runtimes",
|
||||
"--fallbacksource", Dirs.TestPackages,
|
||||
"--fallbacksource", Dirs.CorehostLocalPackages,
|
||||
"--fallbacksource", Dirs.CorehostDummyPackages)
|
||||
"--fallbacksource", Dirs.TestPackages)
|
||||
.WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "TestAssets", "DesktopTestProjects"))
|
||||
.Execute().EnsureSuccessful();
|
||||
|
||||
|
@ -267,9 +243,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
CleanNuGetTempCache();
|
||||
DotNetCli.Stage2.Restore("--verbosity", "verbose",
|
||||
"--fallbacksource", Dirs.TestPackages,
|
||||
"--fallbacksource", Dirs.CorehostLocalPackages,
|
||||
"--fallbacksource", Dirs.CorehostDummyPackages)
|
||||
"--fallbacksource", Dirs.TestPackages)
|
||||
.WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "test"))
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
|
|
|
@ -1,239 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using Microsoft.DotNet.Cli.Build.Framework;
|
||||
using Microsoft.DotNet.InternalAbstractions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Microsoft.DotNet.Cli.Build;
|
||||
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
|
||||
using static Microsoft.DotNet.Cli.Build.FS;
|
||||
|
||||
namespace Microsoft.DotNet.Host.Build
|
||||
{
|
||||
public class CompileTargets
|
||||
{
|
||||
public static readonly bool IsWinx86 = CurrentPlatform.IsWindows && CurrentArchitecture.Isx86;
|
||||
|
||||
public static string HostPackagePlatformRid => HostPackageSupportedRids[
|
||||
(RuntimeEnvironment.OperatingSystemPlatform == Platform.Windows)
|
||||
? $"win7-{RuntimeEnvironment.RuntimeArchitecture}"
|
||||
: RuntimeEnvironment.GetRuntimeIdentifier()];
|
||||
|
||||
public static readonly Dictionary<string, string> HostPackageSupportedRids = new Dictionary<string, string>()
|
||||
{
|
||||
// Key: Current platform RID. Value: The actual publishable (non-dummy) package name produced by the build system for this RID.
|
||||
{ "win7-x64", "win7-x64" },
|
||||
{ "win7-x86", "win7-x86" },
|
||||
{ "osx.10.10-x64", "osx.10.10-x64" },
|
||||
{ "osx.10.11-x64", "osx.10.10-x64" },
|
||||
{ "ubuntu.14.04-x64", "ubuntu.14.04-x64" },
|
||||
{ "centos.7-x64", "rhel.7-x64" },
|
||||
{ "rhel.7-x64", "rhel.7-x64" },
|
||||
{ "rhel.7.2-x64", "rhel.7-x64" },
|
||||
{ "debian.8-x64", "debian.8-x64" }
|
||||
};
|
||||
|
||||
|
||||
private static string DotnetHostBaseName => $"dotnet{Constants.ExeSuffix}";
|
||||
private static string DotnetHostFxrBaseName => $"{Constants.DynamicLibPrefix}hostfxr{Constants.DynamicLibSuffix}";
|
||||
private static string HostPolicyBaseName => $"{Constants.DynamicLibPrefix}hostpolicy{Constants.DynamicLibSuffix}";
|
||||
|
||||
[Target(nameof(PrepareTargets.Init),
|
||||
nameof(CompileCoreHost),
|
||||
nameof(PackagePkgProjects))]
|
||||
public static BuildTargetResult Compile(BuildTargetContext c)
|
||||
{
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
// We need to generate stub host packages so we can restore our standalone test assets against the metapackage
|
||||
// we built earlier in the build
|
||||
// https://github.com/dotnet/cli/issues/2438
|
||||
[Target]
|
||||
public static BuildTargetResult GenerateStubHostPackages(BuildTargetContext c)
|
||||
{
|
||||
var hostVersion = c.BuildContext.Get<HostVersion>("HostVersion");
|
||||
var currentRid = HostPackagePlatformRid;
|
||||
|
||||
var stubPackageBuilder = new StubPackageBuilder(DotNetCli.Stage0, Dirs.Intermediate, Dirs.CorehostDummyPackages);
|
||||
|
||||
foreach (var hostPackage in hostVersion.LatestHostPackages)
|
||||
{
|
||||
foreach (var rid in HostPackageSupportedRids.Values.Distinct())
|
||||
{
|
||||
if (!rid.Equals(currentRid))
|
||||
{
|
||||
var basePackageId = hostPackage.Key;
|
||||
var packageVersion = hostPackage.Value;
|
||||
|
||||
var packageId = $"runtime.{rid}.{basePackageId}";
|
||||
|
||||
stubPackageBuilder.GeneratePackage(packageId, packageVersion);
|
||||
}
|
||||
}
|
||||
}
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult CompileCoreHost(BuildTargetContext c)
|
||||
{
|
||||
var hostVersion = c.BuildContext.Get<HostVersion>("HostVersion");
|
||||
|
||||
// Generate build files
|
||||
var cmakeOut = Path.Combine(Dirs.CorehostLatest, "cmake");
|
||||
|
||||
Rmdir(cmakeOut);
|
||||
Mkdirp(cmakeOut);
|
||||
|
||||
var configuration = c.BuildContext.Get<string>("Configuration");
|
||||
|
||||
// Run the build
|
||||
string rid = DotNetCli.Stage0.GetRuntimeId();
|
||||
string corehostSrcDir = Path.Combine(c.BuildContext.BuildDirectory, "src", "corehost");
|
||||
string commitHash = c.BuildContext.Get<string>("CommitHash");
|
||||
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
// Why does Windows directly call cmake but Linux/Mac calls "build.sh" in the corehost dir?
|
||||
// See the comment in "src/corehost/build.sh" for details. It doesn't work for some reason.
|
||||
var visualStudio = IsWinx86 ? "Visual Studio 14 2015" : "Visual Studio 14 2015 Win64";
|
||||
var archMacro = IsWinx86 ? "-DCLI_CMAKE_PLATFORM_ARCH_I386=1" : "-DCLI_CMAKE_PLATFORM_ARCH_AMD64=1";
|
||||
var ridMacro = $"-DCLI_CMAKE_RUNTIME_ID:STRING={rid}";
|
||||
var arch = IsWinx86 ? "x86" : "x64";
|
||||
var baseSupportedRid = $"win7-{arch}";
|
||||
var cmakeHostVer = $"-DCLI_CMAKE_HOST_VER:STRING={hostVersion.LatestHostVersion}";
|
||||
var cmakeHostPolicyVer = $"-DCLI_CMAKE_HOST_POLICY_VER:STRING={hostVersion.LatestHostPolicyVersion}";
|
||||
var cmakeHostFxrVer = $"-DCLI_CMAKE_HOST_FXR_VER:STRING={hostVersion.LatestHostFxrVersion}";
|
||||
var cmakeBaseRid = $"-DCLI_CMAKE_PKG_RID:STRING={baseSupportedRid}";
|
||||
var cmakeCommitHash = $"-DCLI_CMAKE_COMMIT_HASH:STRING={commitHash}";
|
||||
|
||||
ExecIn(cmakeOut, "cmake",
|
||||
corehostSrcDir,
|
||||
archMacro,
|
||||
ridMacro,
|
||||
cmakeHostVer,
|
||||
cmakeHostFxrVer,
|
||||
cmakeHostPolicyVer,
|
||||
cmakeBaseRid,
|
||||
cmakeCommitHash,
|
||||
"-G",
|
||||
visualStudio);
|
||||
|
||||
var pf32 = RuntimeInformation.OSArchitecture == Architecture.X64 ?
|
||||
Environment.GetEnvironmentVariable("ProgramFiles(x86)") :
|
||||
Environment.GetEnvironmentVariable("ProgramFiles");
|
||||
|
||||
if (configuration.Equals("Release"))
|
||||
{
|
||||
// Cmake calls it "RelWithDebInfo" in the generated MSBuild
|
||||
configuration = "RelWithDebInfo";
|
||||
}
|
||||
|
||||
Exec(Path.Combine(pf32, "MSBuild", "14.0", "Bin", "MSBuild.exe"),
|
||||
Path.Combine(cmakeOut, "ALL_BUILD.vcxproj"),
|
||||
$"/p:Configuration={configuration}");
|
||||
|
||||
// Copy the output out
|
||||
File.Copy(Path.Combine(cmakeOut, "cli", configuration, "dotnet.exe"), Path.Combine(Dirs.CorehostLatest, "dotnet.exe"), overwrite: true);
|
||||
File.Copy(Path.Combine(cmakeOut, "cli", configuration, "dotnet.pdb"), Path.Combine(Dirs.CorehostLatest, "dotnet.pdb"), overwrite: true);
|
||||
File.Copy(Path.Combine(cmakeOut, "cli", "dll", configuration, "hostpolicy.dll"), Path.Combine(Dirs.CorehostLatest, "hostpolicy.dll"), overwrite: true);
|
||||
File.Copy(Path.Combine(cmakeOut, "cli", "dll", configuration, "hostpolicy.pdb"), Path.Combine(Dirs.CorehostLatest, "hostpolicy.pdb"), overwrite: true);
|
||||
File.Copy(Path.Combine(cmakeOut, "cli", "fxr", configuration, "hostfxr.dll"), Path.Combine(Dirs.CorehostLatest, "hostfxr.dll"), overwrite: true);
|
||||
File.Copy(Path.Combine(cmakeOut, "cli", "fxr", configuration, "hostfxr.pdb"), Path.Combine(Dirs.CorehostLatest, "hostfxr.pdb"), overwrite: true);
|
||||
}
|
||||
else
|
||||
{
|
||||
ExecIn(cmakeOut, Path.Combine(c.BuildContext.BuildDirectory, "src", "corehost", "build.sh"),
|
||||
"--arch",
|
||||
"x64",
|
||||
"--hostver",
|
||||
hostVersion.LatestHostVersion,
|
||||
"--fxrver",
|
||||
hostVersion.LatestHostFxrVersion,
|
||||
"--policyver",
|
||||
hostVersion.LatestHostPolicyVersion,
|
||||
"--rid",
|
||||
rid,
|
||||
"--commithash",
|
||||
commitHash);
|
||||
|
||||
// Copy the output out
|
||||
File.Copy(Path.Combine(cmakeOut, "cli", "dotnet"), Path.Combine(Dirs.CorehostLatest, "dotnet"), overwrite: true);
|
||||
File.Copy(Path.Combine(cmakeOut, "cli", "dll", HostPolicyBaseName), Path.Combine(Dirs.CorehostLatest, HostPolicyBaseName), overwrite: true);
|
||||
File.Copy(Path.Combine(cmakeOut, "cli", "fxr", DotnetHostFxrBaseName), Path.Combine(Dirs.CorehostLatest, DotnetHostFxrBaseName), overwrite: true);
|
||||
}
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(CompileTargets.GenerateStubHostPackages))]
|
||||
public static BuildTargetResult PackagePkgProjects(BuildTargetContext c)
|
||||
{
|
||||
var arch = IsWinx86 ? "x86" : "x64";
|
||||
|
||||
var hostVersion = c.BuildContext.Get<HostVersion>("HostVersion");
|
||||
var hostNugetversion = hostVersion.LatestHostVersion;
|
||||
var content = $@"{c.BuildContext["CommitHash"]}{Environment.NewLine}{hostNugetversion}{Environment.NewLine}";
|
||||
var pkgDir = Path.Combine(c.BuildContext.BuildDirectory, "pkg");
|
||||
File.WriteAllText(Path.Combine(pkgDir, "version.txt"), content);
|
||||
|
||||
if (CurrentPlatform.IsWindows)
|
||||
{
|
||||
Command.Create(Path.Combine(pkgDir, "pack.cmd"))
|
||||
// Workaround to arg escaping adding backslashes for arguments to .cmd scripts.
|
||||
.Environment("__WorkaroundCliCoreHostBuildArch", arch)
|
||||
.Environment("__WorkaroundCliCoreHostBinDir", Dirs.CorehostLatest)
|
||||
.Environment("__WorkaroundCliCoreHostPolicyVer", hostVersion.LatestHostPolicyVersionNoSuffix)
|
||||
.Environment("__WorkaroundCliCoreHostFxrVer", hostVersion.LatestHostFxrVersionNoSuffix)
|
||||
.Environment("__WorkaroundCliCoreHostVer", hostVersion.LatestHostVersionNoSuffix)
|
||||
.Environment("__WorkaroundCliCoreHostBuildMajor", hostVersion.LatestHostBuildMajor)
|
||||
.Environment("__WorkaroundCliCoreHostBuildMinor", hostVersion.LatestHostBuildMinor)
|
||||
.Environment("__WorkaroundCliCoreHostVersionTag", hostVersion.LatestHostPrerelease)
|
||||
.ForwardStdOut()
|
||||
.ForwardStdErr()
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
}
|
||||
else
|
||||
{
|
||||
Exec(Path.Combine(pkgDir, "pack.sh"),
|
||||
"--arch",
|
||||
"x64",
|
||||
"--hostbindir",
|
||||
Dirs.CorehostLatest,
|
||||
"--policyver",
|
||||
hostVersion.LatestHostPolicyVersionNoSuffix,
|
||||
"--fxrver",
|
||||
hostVersion.LatestHostFxrVersionNoSuffix,
|
||||
"--hostver",
|
||||
hostVersion.LatestHostVersionNoSuffix,
|
||||
"--build-major",
|
||||
hostVersion.LatestHostBuildMajor,
|
||||
"--build-minor",
|
||||
hostVersion.LatestHostBuildMinor,
|
||||
"--vertag",
|
||||
hostVersion.LatestHostPrerelease);
|
||||
}
|
||||
foreach (var file in Directory.GetFiles(Path.Combine(pkgDir, "bin", "packages"), "*.nupkg"))
|
||||
{
|
||||
var fileName = Path.GetFileName(file);
|
||||
File.Copy(file, Path.Combine(Dirs.CorehostLocalPackages, fileName), true);
|
||||
|
||||
Console.WriteLine($"Copying package {fileName} to artifacts directory {Dirs.CorehostLocalPackages}.");
|
||||
}
|
||||
foreach (var item in hostVersion.LatestHostPackages)
|
||||
{
|
||||
var fileFilter = $"runtime.{HostPackagePlatformRid}.{item.Key}.{item.Value}.nupkg";
|
||||
if (Directory.GetFiles(Dirs.CorehostLocalPackages, fileFilter).Length == 0)
|
||||
{
|
||||
throw new BuildFailureException($"Nupkg for {fileFilter} was not created.");
|
||||
}
|
||||
}
|
||||
return c.Success();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,198 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Microsoft.DotNet.Cli.Build.Framework;
|
||||
using Microsoft.DotNet.InternalAbstractions;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Microsoft.DotNet.Cli.Build;
|
||||
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
|
||||
using static Microsoft.DotNet.Cli.Build.FS;
|
||||
using static Microsoft.DotNet.Cli.Build.Utils;
|
||||
|
||||
namespace Microsoft.DotNet.Host.Build
|
||||
{
|
||||
public class PrepareTargets
|
||||
{
|
||||
[Target(nameof(Init))]
|
||||
public static BuildTargetResult Prepare(BuildTargetContext c) => c.Success();
|
||||
|
||||
[Target(nameof(CheckPrereqCmakePresent), nameof(CheckPlatformDependencies))]
|
||||
public static BuildTargetResult CheckPrereqs(BuildTargetContext c) => c.Success();
|
||||
|
||||
[Target(nameof(CheckCoreclrPlatformDependencies))]
|
||||
public static BuildTargetResult CheckPlatformDependencies(BuildTargetContext c) => c.Success();
|
||||
|
||||
[Target(nameof(CheckUbuntuCoreclrAndCoreFxDependencies), nameof(CheckCentOSCoreclrAndCoreFxDependencies))]
|
||||
public static BuildTargetResult CheckCoreclrPlatformDependencies(BuildTargetContext c) => c.Success();
|
||||
|
||||
// All major targets will depend on this in order to ensure variables are set up right if they are run independently
|
||||
[Target(nameof(GenerateVersions), nameof(CheckPrereqs), nameof(LocateStage0), nameof(ExpectedBuildArtifacts))]
|
||||
public static BuildTargetResult Init(BuildTargetContext c)
|
||||
{
|
||||
var configEnv = Environment.GetEnvironmentVariable("CONFIGURATION");
|
||||
|
||||
if (string.IsNullOrEmpty(configEnv))
|
||||
{
|
||||
configEnv = "Debug";
|
||||
}
|
||||
|
||||
c.BuildContext["Configuration"] = configEnv;
|
||||
c.BuildContext["Channel"] = Environment.GetEnvironmentVariable("CHANNEL");
|
||||
|
||||
c.Info($"Building {c.BuildContext["Configuration"]} to: {Dirs.Output}");
|
||||
c.Info("Build Environment:");
|
||||
c.Info($" Operating System: {RuntimeEnvironment.OperatingSystem} {RuntimeEnvironment.OperatingSystemVersion}");
|
||||
c.Info($" Platform: {RuntimeEnvironment.OperatingSystemPlatform}");
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult GenerateVersions(BuildTargetContext c)
|
||||
{
|
||||
var commitCount = GitUtils.GetCommitCount();
|
||||
var commitHash = GitUtils.GetCommitHash();
|
||||
|
||||
var hostVersion = new HostVersion()
|
||||
{
|
||||
CommitCount = commitCount
|
||||
};
|
||||
|
||||
c.BuildContext["HostVersion"] = hostVersion;
|
||||
c.BuildContext["CommitHash"] = commitHash;
|
||||
|
||||
c.Info($"Building Version: {hostVersion.LatestHostVersionNoSuffix} (NuGet Packages: {hostVersion.LatestHostVersion})");
|
||||
c.Info($"From Commit: {commitHash}");
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult LocateStage0(BuildTargetContext c)
|
||||
{
|
||||
// We should have been run in the repo root, so locate the stage 0 relative to current directory
|
||||
var stage0 = DotNetCli.Stage0.BinPath;
|
||||
|
||||
if (!Directory.Exists(stage0))
|
||||
{
|
||||
return c.Failed($"Stage 0 directory does not exist: {stage0}");
|
||||
}
|
||||
|
||||
// Identify the version
|
||||
string versionFile = Directory.GetFiles(stage0, ".version", SearchOption.AllDirectories).FirstOrDefault();
|
||||
|
||||
if (string.IsNullOrEmpty(versionFile))
|
||||
{
|
||||
throw new Exception($"'.version' file not found in '{stage0}' folder");
|
||||
}
|
||||
|
||||
var version = File.ReadAllLines(versionFile);
|
||||
c.Info($"Using Stage 0 Version: {version[1]}");
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult ExpectedBuildArtifacts(BuildTargetContext c)
|
||||
{
|
||||
var config = Environment.GetEnvironmentVariable("CONFIGURATION");
|
||||
var versionBadgeName = $"{CurrentPlatform.Current}_{CurrentArchitecture.Current}_{config}_version_badge.svg";
|
||||
c.BuildContext["VersionBadge"] = Path.Combine(Dirs.Output, versionBadgeName);
|
||||
|
||||
var hostVersion = c.BuildContext.Get<HostVersion>("HostVersion").LockedHostVersion;
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||
public static BuildTargetResult CheckUbuntuCoreclrAndCoreFxDependencies(BuildTargetContext c)
|
||||
{
|
||||
var errorMessageBuilder = new StringBuilder();
|
||||
var stage0 = DotNetCli.Stage0.BinPath;
|
||||
|
||||
foreach (var package in PackageDependencies.UbuntuCoreclrAndCoreFxDependencies)
|
||||
{
|
||||
if (!AptDependencyUtility.PackageIsInstalled(package))
|
||||
{
|
||||
errorMessageBuilder.Append($"Error: Coreclr package dependency {package} missing.");
|
||||
errorMessageBuilder.Append(Environment.NewLine);
|
||||
errorMessageBuilder.Append($"-> install with apt-get install {package}");
|
||||
errorMessageBuilder.Append(Environment.NewLine);
|
||||
}
|
||||
}
|
||||
|
||||
if (errorMessageBuilder.Length == 0)
|
||||
{
|
||||
return c.Success();
|
||||
}
|
||||
else
|
||||
{
|
||||
return c.Failed(errorMessageBuilder.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.CentOS)]
|
||||
public static BuildTargetResult CheckCentOSCoreclrAndCoreFxDependencies(BuildTargetContext c)
|
||||
{
|
||||
var errorMessageBuilder = new StringBuilder();
|
||||
|
||||
foreach (var package in PackageDependencies.CentosCoreclrAndCoreFxDependencies)
|
||||
{
|
||||
if (!YumDependencyUtility.PackageIsInstalled(package))
|
||||
{
|
||||
errorMessageBuilder.Append($"Error: Coreclr package dependency {package} missing.");
|
||||
errorMessageBuilder.Append(Environment.NewLine);
|
||||
errorMessageBuilder.Append($"-> install with yum install {package}");
|
||||
errorMessageBuilder.Append(Environment.NewLine);
|
||||
}
|
||||
}
|
||||
|
||||
if (errorMessageBuilder.Length == 0)
|
||||
{
|
||||
return c.Success();
|
||||
}
|
||||
else
|
||||
{
|
||||
return c.Failed(errorMessageBuilder.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult CheckPrereqCmakePresent(BuildTargetContext c)
|
||||
{
|
||||
try
|
||||
{
|
||||
Command.Create("cmake", "--version")
|
||||
.CaptureStdOut()
|
||||
.CaptureStdErr()
|
||||
.Execute();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string message = $@"Error running cmake: {ex.Message}
|
||||
cmake is required to build the native host 'corehost'";
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
message += Environment.NewLine + "Download it from https://www.cmake.org";
|
||||
}
|
||||
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
||||
{
|
||||
message += Environment.NewLine + "Ubuntu: 'sudo apt-get install cmake'";
|
||||
}
|
||||
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
|
||||
{
|
||||
message += Environment.NewLine + "OS X w/Homebrew: 'brew install cmake'";
|
||||
}
|
||||
return c.Failed(message);
|
||||
}
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
using Microsoft.DotNet.Cli.Build.Framework;
|
||||
|
||||
namespace Microsoft.DotNet.Host.Build
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
public static int Main(string[] args)
|
||||
{
|
||||
DebugHelper.HandleDebugSwitch(ref args);
|
||||
|
||||
return BuildSetup.Create(".NET Core Host")
|
||||
.UseStandardGoals()
|
||||
.UseAllTargetsFromAssembly<Program>()
|
||||
.Run(args);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,75 +0,0 @@
|
|||
using System.IO;
|
||||
using System.Text;
|
||||
using Microsoft.DotNet.Cli.Build;
|
||||
|
||||
namespace Microsoft.DotNet.Host.Build
|
||||
{
|
||||
public class StubPackageBuilder
|
||||
{
|
||||
private DotNetCli _dotnet;
|
||||
private string _intermediateDirectory;
|
||||
private string _outputDirectory;
|
||||
|
||||
private bool _dummyFileCreated;
|
||||
|
||||
public StubPackageBuilder(DotNetCli dotnet, string intermediateDirectory, string outputDirectory)
|
||||
{
|
||||
_dotnet = dotnet;
|
||||
_intermediateDirectory = intermediateDirectory;
|
||||
_outputDirectory = outputDirectory;
|
||||
}
|
||||
|
||||
public void GeneratePackage(string packageId, string version)
|
||||
{
|
||||
if (!_dummyFileCreated)
|
||||
{
|
||||
CreateDummyFile(_dotnet, _intermediateDirectory);
|
||||
}
|
||||
|
||||
CreateStubPackage(_dotnet, packageId, version, _intermediateDirectory, _outputDirectory);
|
||||
}
|
||||
|
||||
private void CreateDummyFile(DotNetCli dotnet, string intermediateDirectory)
|
||||
{
|
||||
var dummyTxt = "dummy text";
|
||||
|
||||
var tempPjDirectory = Path.Combine(intermediateDirectory, "dummyNuGetPackageIntermediate");
|
||||
FS.Rmdir(tempPjDirectory);
|
||||
|
||||
Directory.CreateDirectory(tempPjDirectory);
|
||||
|
||||
var dummyTextFile = Path.Combine(tempPjDirectory, "dummy.txt");
|
||||
|
||||
File.WriteAllText(dummyTextFile, dummyTxt);
|
||||
|
||||
_dummyFileCreated = true;
|
||||
}
|
||||
|
||||
private static void CreateStubPackage(DotNetCli dotnet,
|
||||
string packageId,
|
||||
string version,
|
||||
string intermediateDirectory,
|
||||
string outputDirectory)
|
||||
{
|
||||
var projectJson = new StringBuilder();
|
||||
projectJson.Append("{");
|
||||
projectJson.Append($" \"version\": \"{version}\",");
|
||||
projectJson.Append($" \"name\": \"{packageId}\",");
|
||||
projectJson.Append(" \"packOptions\": { \"files\": { \"include\": \"dummy.txt\" } },");
|
||||
projectJson.Append(" \"frameworks\": { \"netcoreapp1.0\": { } },");
|
||||
projectJson.Append("}");
|
||||
|
||||
var tempPjDirectory = Path.Combine(intermediateDirectory, "dummyNuGetPackageIntermediate");
|
||||
var tempPjFile = Path.Combine(tempPjDirectory, "project.json");
|
||||
|
||||
File.WriteAllText(tempPjFile, projectJson.ToString());
|
||||
|
||||
dotnet.Pack(
|
||||
tempPjFile, "--no-build",
|
||||
"--output", outputDirectory)
|
||||
.WorkingDirectory(tempPjDirectory)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,81 +0,0 @@
|
|||
#
|
||||
# Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
||||
param(
|
||||
[string]$Configuration="Debug",
|
||||
[string]$Architecture="x64",
|
||||
[string[]]$Targets=@("Default"),
|
||||
[switch]$NoPackage,
|
||||
[switch]$Help)
|
||||
|
||||
if($Help)
|
||||
{
|
||||
Write-Host "Usage: .\build.ps1 [-Configuration <CONFIGURATION>] [-NoPackage] [-Help] [-Targets <TARGETS...>]"
|
||||
Write-Host ""
|
||||
Write-Host "Options:"
|
||||
Write-Host " -Configuration <CONFIGURATION> Build the specified Configuration (Debug or Release, default: Debug)"
|
||||
Write-Host " -Architecture <ARCHITECTURE> Build the specified architecture (x64 or x86 (supported only on Windows), default: x64)"
|
||||
Write-Host " -Targets <TARGETS...> Comma separated build targets to run (Init, Compile, Publish, etc.; Default is a full build and publish)"
|
||||
Write-Host " -NoPackage Skip packaging targets"
|
||||
Write-Host " -Help Display this help message"
|
||||
exit 0
|
||||
}
|
||||
|
||||
$env:CONFIGURATION = $Configuration;
|
||||
$RepoRoot = "$PSScriptRoot\..\.."
|
||||
|
||||
if($NoPackage)
|
||||
{
|
||||
$env:DOTNET_BUILD_SKIP_PACKAGING=1
|
||||
}
|
||||
else
|
||||
{
|
||||
$env:DOTNET_BUILD_SKIP_PACKAGING=0
|
||||
}
|
||||
|
||||
# Load Branch Info
|
||||
cat "$RepoRoot\branchinfo.txt" | ForEach-Object {
|
||||
if(!$_.StartsWith("#") -and ![String]::IsNullOrWhiteSpace($_)) {
|
||||
$splat = $_.Split([char[]]@("="), 2)
|
||||
Set-Content "env:\$($splat[0])" -Value $splat[1]
|
||||
}
|
||||
}
|
||||
|
||||
# Use a repo-local install directory (but not the artifacts directory because that gets cleaned a lot
|
||||
if (!$env:DOTNET_INSTALL_DIR)
|
||||
{
|
||||
$env:DOTNET_INSTALL_DIR="$RepoRoot\.dotnet_stage0\Windows\$Architecture"
|
||||
}
|
||||
|
||||
if (!(Test-Path $env:DOTNET_INSTALL_DIR))
|
||||
{
|
||||
mkdir $env:DOTNET_INSTALL_DIR | Out-Null
|
||||
}
|
||||
|
||||
# Install a stage 0
|
||||
Write-Host "Installing .NET Core CLI Stage 0 from branchinfo channel"
|
||||
& "$RepoRoot\scripts\obtain\dotnet-install.ps1" -Channel $env:CHANNEL -Architecture $Architecture -Verbose
|
||||
if($LASTEXITCODE -ne 0) { throw "Failed to install stage0" }
|
||||
|
||||
# Put the stage0 on the path
|
||||
$env:PATH = "$env:DOTNET_INSTALL_DIR;$env:PATH"
|
||||
|
||||
# Restore the build scripts
|
||||
Write-Host "Restoring Build Script projects..."
|
||||
pushd "$PSScriptRoot\.."
|
||||
dotnet restore --infer-runtimes
|
||||
if($LASTEXITCODE -ne 0) { throw "Failed to restore" }
|
||||
popd
|
||||
|
||||
# Publish the builder
|
||||
Write-Host "Compiling Build Scripts..."
|
||||
dotnet publish "$PSScriptRoot" -o "$PSScriptRoot\bin" --framework netcoreapp1.0
|
||||
if($LASTEXITCODE -ne 0) { throw "Failed to compile build scripts" }
|
||||
|
||||
# Run the builder
|
||||
Write-Host "Invoking Build Scripts..."
|
||||
Write-Host " Configuration: $env:CONFIGURATION"
|
||||
& "$PSScriptRoot\bin\dotnet-host-build.exe" @Targets
|
||||
if($LASTEXITCODE -ne 0) { throw "Build failed" }
|
|
@ -1,118 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
SOURCE="$(readlink "$SOURCE")"
|
||||
[[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
|
||||
done
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
OLDPATH="$PATH"
|
||||
|
||||
REPOROOT="$DIR/../.."
|
||||
source "$REPOROOT/scripts/common/_prettyprint.sh"
|
||||
|
||||
while [[ $# > 0 ]]; do
|
||||
lowerI="$(echo $1 | awk '{print tolower($0)}')"
|
||||
case $lowerI in
|
||||
-c|--configuration)
|
||||
export CONFIGURATION=$2
|
||||
shift
|
||||
;;
|
||||
--targets)
|
||||
IFS=',' read -r -a targets <<< $2
|
||||
shift
|
||||
;;
|
||||
--nopackage)
|
||||
export DOTNET_BUILD_SKIP_PACKAGING=1
|
||||
;;
|
||||
--skip-prereqs)
|
||||
# Allow CI to disable prereqs check since the CI has the pre-reqs but not ldconfig it seems
|
||||
export DOTNET_INSTALL_SKIP_PREREQS=1
|
||||
;;
|
||||
--help)
|
||||
echo "Usage: $0 [--configuration <CONFIGURATION>] [--skip-prereqs] [--nopackage] [--docker <IMAGENAME>] [--help] [--targets <TARGETS...>]"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " --configuration <CONFIGURATION> Build the specified Configuration (Debug or Release, default: Debug)"
|
||||
echo " --targets <TARGETS...> Comma separated build targets to run (Init, Compile, Publish, etc.; Default is a full build and publish)"
|
||||
echo " --nopackage Skip packaging targets"
|
||||
echo " --skip-prereqs Skip checks for pre-reqs in dotnet_install"
|
||||
echo " --docker <IMAGENAME> Build in Docker using the Dockerfile located in scripts/docker/IMAGENAME"
|
||||
echo " --help Display this help message"
|
||||
echo " <TARGETS...> The build targets to run (Init, Compile, Publish, etc.; Default is a full build and publish)"
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
|
||||
shift
|
||||
done
|
||||
|
||||
# Set up the environment to be used for building with clang.
|
||||
if which "clang-3.5" > /dev/null 2>&1; then
|
||||
export CC="$(which clang-3.5)"
|
||||
export CXX="$(which clang++-3.5)"
|
||||
elif which "clang-3.6" > /dev/null 2>&1; then
|
||||
export CC="$(which clang-3.6)"
|
||||
export CXX="$(which clang++-3.6)"
|
||||
elif which clang > /dev/null 2>&1; then
|
||||
export CC="$(which clang)"
|
||||
export CXX="$(which clang++)"
|
||||
else
|
||||
error "Unable to find Clang Compiler"
|
||||
error "Install clang-3.5 or clang3.6"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Load Branch Info
|
||||
while read line; do
|
||||
if [[ $line != \#* ]]; then
|
||||
IFS='=' read -ra splat <<< "$line"
|
||||
export ${splat[0]}="${splat[1]}"
|
||||
fi
|
||||
done < "$REPOROOT/branchinfo.txt"
|
||||
|
||||
# Use a repo-local install directory (but not the artifacts directory because that gets cleaned a lot
|
||||
[ -z "$DOTNET_INSTALL_DIR" ] && export DOTNET_INSTALL_DIR=$REPOROOT/.dotnet_stage0/$(uname)
|
||||
[ -d "$DOTNET_INSTALL_DIR" ] || mkdir -p $DOTNET_INSTALL_DIR
|
||||
|
||||
$REPOROOT/scripts/obtain/dotnet-install.sh --channel $CHANNEL --verbose
|
||||
|
||||
# Put stage 0 on the PATH (for this shell only)
|
||||
PATH="$DOTNET_INSTALL_DIR:$PATH"
|
||||
|
||||
# Increases the file descriptors limit for this bash. It prevents an issue we were hitting during restore
|
||||
FILE_DESCRIPTOR_LIMIT=$( ulimit -n )
|
||||
if [ $FILE_DESCRIPTOR_LIMIT -lt 1024 ]
|
||||
then
|
||||
echo "Increasing file description limit to 1024"
|
||||
ulimit -n 1024
|
||||
fi
|
||||
|
||||
# Restore the build scripts
|
||||
echo "Restoring Build Script projects..."
|
||||
(
|
||||
cd "$DIR/.."
|
||||
dotnet restore --infer-runtimes
|
||||
)
|
||||
|
||||
# Build the builder
|
||||
echo "Compiling Build Scripts..."
|
||||
dotnet publish "$DIR" -o "$DIR/bin" --framework netcoreapp1.0
|
||||
|
||||
export PATH="$OLDPATH"
|
||||
# Run the builder
|
||||
echo "Invoking Build Scripts..."
|
||||
echo "Configuration: $CONFIGURATION"
|
||||
|
||||
$DIR/bin/dotnet-host-build ${targets[@]}
|
||||
exit $?
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>1dbb7542-0345-4f4b-a84b-3b00b185d416</ProjectGuid>
|
||||
<RootNamespace>Microsoft.DotNet.Cli.Build</RootNamespace>
|
||||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
|
||||
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin</OutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
</Project>
|
|
@ -1,40 +0,0 @@
|
|||
{
|
||||
"version": "1.0.0-*",
|
||||
"description": "Build scripts for dotnet-cli",
|
||||
"buildOptions": {
|
||||
"emitEntryPoint": true
|
||||
},
|
||||
"dependencies": {
|
||||
"NETStandard.Library": "1.5.0-rc3-24123-01",
|
||||
"Microsoft.NETCore.Runtime": "1.0.2-rc3-24123-01",
|
||||
"Microsoft.CSharp": "4.0.1-rc3-24123-01",
|
||||
"System.Dynamic.Runtime": "4.0.11-rc3-24123-01",
|
||||
"System.Reflection.Metadata": "1.3.0-rc3-24123-01",
|
||||
"System.Runtime.Serialization.Primitives": "4.1.1-rc3-24123-01",
|
||||
"System.Xml.XmlSerializer": "4.0.11-rc3-24123-01",
|
||||
"WindowsAzure.Storage": "6.2.2-preview",
|
||||
"Microsoft.DotNet.Cli.Build.Framework": {
|
||||
"target": "project"
|
||||
},
|
||||
"shared-build-targets-utils": {
|
||||
"target": "project"
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
"imports": [
|
||||
"dnxcore50",
|
||||
"portable-net45+win8"
|
||||
]
|
||||
}
|
||||
},
|
||||
"runtimes": {
|
||||
"win7-x64": {},
|
||||
"win7-x86": {},
|
||||
"osx.10.11-x64": {},
|
||||
"ubuntu.14.04-x64": {},
|
||||
"centos.7-x64": {},
|
||||
"rhel.7.2-x64": {},
|
||||
"debian.8-x64": {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build
|
||||
{
|
||||
public class DependencyVersions
|
||||
{
|
||||
public static readonly string CoreCLRVersion = "1.0.2-rc3-24123-01";
|
||||
|
||||
public static readonly string SharedFrameworkVersion = "1.0.0-rc3-004306";
|
||||
public static readonly string SharedHostVersion = "1.0.1-rc3-004306-00";
|
||||
|
||||
public static readonly string SharedFrameworkChannel = "preview";
|
||||
public static readonly string SharedHostChannel = "preview";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
using Microsoft.DotNet.Cli.Build.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build
|
||||
{
|
||||
public class HostArtifactNames
|
||||
{
|
||||
public static string DotnetHostBaseName => $"dotnet{Constants.ExeSuffix}";
|
||||
public static string DotnetHostFxrBaseName => $"{Constants.DynamicLibPrefix}hostfxr{Constants.DynamicLibSuffix}";
|
||||
public static string HostPolicyBaseName => $"{Constants.DynamicLibPrefix}hostpolicy{Constants.DynamicLibSuffix}";
|
||||
}
|
||||
}
|
|
@ -9,6 +9,7 @@ using Microsoft.WindowsAzure.Storage;
|
|||
using Microsoft.WindowsAzure.Storage.Blob;
|
||||
|
||||
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build
|
||||
{
|
||||
|
@ -22,7 +23,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
public AzurePublisher()
|
||||
{
|
||||
_connectionString = Environment.GetEnvironmentVariable("CONNECTION_STRING").Trim('"');
|
||||
_connectionString = EnvVars.EnsureVariable("CONNECTION_STRING").Trim('"');
|
||||
_blobContainer = GetDotnetBlobContainer(_connectionString);
|
||||
}
|
||||
|
||||
|
@ -173,22 +174,38 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
return $"{s_dotnetBlobRootUrl}{CalculateInstallerBlob(installerFile, channel, version)}";
|
||||
}
|
||||
|
||||
public string CalculateInstallerBlob(string installerFile, string channel, string version)
|
||||
public static string CalculateInstallerBlob(string installerFile, string channel, string version)
|
||||
{
|
||||
return $"{channel}/Installers/{version}/{Path.GetFileName(installerFile)}";
|
||||
}
|
||||
|
||||
public string CalculateArchiveUploadUrl(string archiveFile, string channel, string version)
|
||||
{
|
||||
return $"{s_dotnetBlobRootUrl}{CalculateArchiveBlob(archiveFile, channel, version)}";
|
||||
}
|
||||
|
||||
public string CalculateArchiveBlob(string archiveFile, string channel, string version)
|
||||
public static string CalculateArchiveBlob(string archiveFile, string channel, string version)
|
||||
{
|
||||
return $"{channel}/Binaries/{version}/{Path.GetFileName(archiveFile)}";
|
||||
}
|
||||
|
||||
public void DownloadFiles(string blobVirtualDirectory, string fileExtension, string downloadPath)
|
||||
public static async Task DownloadFile(string blobFilePath, string localDownloadPath)
|
||||
{
|
||||
var blobUrl = $"{s_dotnetBlobRootUrl}{blobFilePath}";
|
||||
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
var request = new HttpRequestMessage(HttpMethod.Get, blobUrl);
|
||||
var sendTask = client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead);
|
||||
var response = sendTask.Result.EnsureSuccessStatusCode();
|
||||
|
||||
var httpStream = await response.Content.ReadAsStreamAsync();
|
||||
|
||||
using (var fileStream = File.Create(localDownloadPath))
|
||||
using (var reader = new StreamReader(httpStream))
|
||||
{
|
||||
httpStream.CopyTo(fileStream);
|
||||
fileStream.Flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void DownloadFilesWithExtension(string blobVirtualDirectory, string fileExtension, string localDownloadPath)
|
||||
{
|
||||
CloudBlobDirectory blobDir = _blobContainer.GetDirectoryReference(blobVirtualDirectory);
|
||||
BlobContinuationToken continuationToken = new BlobContinuationToken();
|
||||
|
@ -199,7 +216,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
{
|
||||
if (Path.GetExtension(blobFile.Uri.AbsoluteUri) == fileExtension)
|
||||
{
|
||||
string localBlobFile = Path.Combine(downloadPath, Path.GetFileName(blobFile.Uri.AbsoluteUri));
|
||||
string localBlobFile = Path.Combine(localDownloadPath, Path.GetFileName(blobFile.Uri.AbsoluteUri));
|
||||
Console.WriteLine($"Downloading {blobFile.Uri.AbsoluteUri} to {localBlobFile}...");
|
||||
blobFile.DownloadToFileAsync(localBlobFile, FileMode.Create).Wait();
|
||||
}
|
||||
|
|
|
@ -110,17 +110,18 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
return rid;
|
||||
}
|
||||
|
||||
public void CrossgenDirectory(BuildTargetContext c, string pathToAssemblies)
|
||||
public void CrossgenDirectory(string sharedFxPath, string pathToAssemblies)
|
||||
{
|
||||
// Check if we need to skip crossgen
|
||||
if (string.Equals(Environment.GetEnvironmentVariable("DISABLE_CROSSGEN"), "1"))
|
||||
{
|
||||
c.Warn("Skipping crossgen for because DISABLE_CROSSGEN is set to 1");
|
||||
var originalColor = Console.ForegroundColor;
|
||||
Console.ForegroundColor = ConsoleColor.Yellow;
|
||||
Console.WriteLine("Skipping crossgen for because DISABLE_CROSSGEN is set to 1");
|
||||
Console.ForegroundColor = originalColor;
|
||||
return;
|
||||
}
|
||||
|
||||
string sharedFxPath = c.BuildContext.Get<string>("SharedFrameworkPath");
|
||||
|
||||
// HACK
|
||||
// The input directory can be a portable FAT app (example the CLI itself).
|
||||
// In that case there can be RID specific managed dependencies which are not right next to the app binary (example System.Diagnostics.TraceSource).
|
||||
|
|
|
@ -27,6 +27,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
public static readonly string CorehostLocked = Path.Combine(Output, "corehost", "locked");
|
||||
public static readonly string CorehostLocalPackages = Path.Combine(Output, "corehost");
|
||||
public static readonly string CorehostDummyPackages = Path.Combine(Output, "corehostdummypackages");
|
||||
public static readonly string SharedFrameworkPublish = Path.Combine(Intermediate, "sharedFrameworkPublish");
|
||||
public static readonly string TestOutput = Path.Combine(Output, "tests");
|
||||
public static readonly string TestArtifacts = Path.Combine(TestOutput, "artifacts");
|
||||
public static readonly string TestPackages = Path.Combine(TestOutput, "packages");
|
||||
|
|
|
@ -70,7 +70,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
public static string GetDebianSharedFrameworkPackageName(BuildTargetContext c)
|
||||
{
|
||||
var sharedFrameworkNugetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
|
||||
var sharedFrameworkNugetVersion = DependencyVersions.SharedFrameworkVersion;
|
||||
|
||||
return $"dotnet-sharedframework-{SharedFrameworkName}-{sharedFrameworkNugetVersion}".ToLower();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
using Microsoft.DotNet.Cli.Build.Framework;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build
|
||||
{
|
||||
public class PublishMutationUtilties
|
||||
{
|
||||
public static void CleanPublishOutput(
|
||||
string path,
|
||||
string name,
|
||||
bool deleteRuntimeConfigJson=false,
|
||||
bool deleteDepsJson=false)
|
||||
{
|
||||
File.Delete(Path.Combine(path, $"{name}{Constants.ExeSuffix}"));
|
||||
File.Delete(Path.Combine(path, $"{name}.dll"));
|
||||
File.Delete(Path.Combine(path, $"{name}.pdb"));
|
||||
|
||||
if (deleteRuntimeConfigJson)
|
||||
{
|
||||
File.Delete(Path.Combine(path, $"{name}.runtimeconfig.json"));
|
||||
}
|
||||
|
||||
if (deleteDepsJson)
|
||||
{
|
||||
File.Delete(Path.Combine(path, $"{name}.deps.json"));
|
||||
}
|
||||
}
|
||||
|
||||
public static void ChangeEntryPointLibraryName(string depsFile, string newName)
|
||||
{
|
||||
JToken deps;
|
||||
using (var file = File.OpenText(depsFile))
|
||||
using (JsonTextReader reader = new JsonTextReader(file))
|
||||
{
|
||||
deps = JObject.ReadFrom(reader);
|
||||
}
|
||||
|
||||
string version = null;
|
||||
foreach (JProperty target in deps["targets"])
|
||||
{
|
||||
var targetLibrary = target.Value.Children<JProperty>().FirstOrDefault();
|
||||
if (targetLibrary == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
version = targetLibrary.Name.Substring(targetLibrary.Name.IndexOf('/') + 1);
|
||||
if (newName == null)
|
||||
{
|
||||
targetLibrary.Remove();
|
||||
}
|
||||
else
|
||||
{
|
||||
targetLibrary.Replace(new JProperty(newName + '/' + version, targetLibrary.Value));
|
||||
}
|
||||
}
|
||||
if (version != null)
|
||||
{
|
||||
var library = deps["libraries"].Children<JProperty>().First();
|
||||
if (newName == null)
|
||||
{
|
||||
library.Remove();
|
||||
}
|
||||
else
|
||||
{
|
||||
library.Replace(new JProperty(newName + '/' + version, library.Value));
|
||||
}
|
||||
using (var file = File.CreateText(depsFile))
|
||||
using (var writer = new JsonTextWriter(file) { Formatting = Formatting.Indented })
|
||||
{
|
||||
deps.WriteTo(writer);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue