Merge remote-tracking branch 'refs/remotes/origin/feature/msbuild'
Conflicts: Microsoft.DotNet.Cli.sln build_projects/dotnet-cli-build/DebTargets.cs build_projects/dotnet-cli-build/TestTargets.cs scripts/package/package-debian.sh src/Microsoft.Extensions.DependencyModel/DependencyContextJsonReader.cs src/dotnet/commands/dotnet-new/Program.cs src/dotnet/commands/dotnet-pack/PackageGenerator.cs test/Microsoft.Extensions.DependencyModel.Tests/DependencyContextJsonReaderTest.cs
This commit is contained in:
commit
2db1997bc0
450 changed files with 7134 additions and 18741 deletions
7
.gitignore
vendored
7
.gitignore
vendored
|
@ -37,6 +37,9 @@ cmake/
|
|||
# stage0 install directory
|
||||
.dotnet_stage0
|
||||
|
||||
# build tools directory
|
||||
build_tools
|
||||
|
||||
# `dotnet new` template zip files are generated by a pre-build step.
|
||||
/src/dotnet/commands/dotnet-new/*.zip
|
||||
|
||||
|
@ -61,7 +64,6 @@ cmake/
|
|||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
build/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
|
@ -184,9 +186,6 @@ DocProject/Help/*.hhp
|
|||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
|
|
1
BuildToolsCliVersion.txt
Normal file
1
BuildToolsCliVersion.txt
Normal file
|
@ -0,0 +1 @@
|
|||
1.0.0-preview2-002733
|
1
BuildToolsVersion.txt
Normal file
1
BuildToolsVersion.txt
Normal file
|
@ -0,0 +1 @@
|
|||
1.0.26-prerelease-00621-06
|
|
@ -53,7 +53,7 @@ For E2E and functional tests, they all depend on the binaries located under `art
|
|||
1. `cd src\dotnet\`
|
||||
2. `dotnet build`
|
||||
3. `cp bin\debug\netstandardapp1.5\dotnet.dll artifacts\rid\stage2`
|
||||
4. `cd ..\..\test\dotnet-build.Tests`
|
||||
4. `cd ..\..\test\dotnet.Tests`
|
||||
5. `dotnet test`
|
||||
|
||||
##Adding a Command
|
||||
|
|
|
@ -18,12 +18,12 @@ This section describes placeholders used inside this spec.
|
|||
# Build Output
|
||||
Each official, successful build should create and upload packages to location described by following URLs:
|
||||
```
|
||||
https://dotnetcli.blob.core.windows.net/dotnet/<Channel>/<Version>/dotnet.<OSID>.<Version>.<Extension>
|
||||
https://dotnetcli.azureedge.net/dotnet/<Channel>/<Version>/dotnet.<OSID>.<Version>.<Extension>
|
||||
|
||||
Currently:
|
||||
https://dotnetcli.blob.core.windows.net/dotnet/<Channel>/Binaries/<Version>/dotnet-sharedframework-<OSName>-<Architecture>.<Version>.zip
|
||||
https://dotnetcli.blob.core.windows.net/dotnet/<Channel>/Binaries/<Version>/dotnet-host-<OSName>-<Architecture>.<Version>.zip
|
||||
https://dotnetcli.blob.core.windows.net/dotnet/<Channel>/Binaries/<Version>/dotnet-<OSName>-<Architecture>.<Version>.zip
|
||||
https://dotnetcli.azureedge.net/dotnet/<Channel>/Binaries/<Version>/dotnet-sharedframework-<OSName>-<Architecture>.<Version>.zip
|
||||
https://dotnetcli.azureedge.net/dotnet/<Channel>/Binaries/<Version>/dotnet-host-<OSName>-<Architecture>.<Version>.zip
|
||||
https://dotnetcli.azureedge.net/dotnet/<Channel>/Binaries/<Version>/dotnet-<OSName>-<Architecture>.<Version>.zip
|
||||
```
|
||||
Content of the package should contain binaries which layout will be described later.
|
||||
|
||||
|
@ -105,7 +105,7 @@ WIP: Exact script action description.
|
|||
| -DryRun | --dry-run | `<not set>` | If switch present, installation will not be performed and instead deterministic invocation with specific version and zip location will be displayed. |
|
||||
| -NoPath | --no-path | `<not set>` | If switch present the script will not set PATH environmental variable for the current process. |
|
||||
| -Verbose | --verbose | `<not set>` | If switch present displays diagnostics information. |
|
||||
| -AzureFeed | --azure-feed | See description | Azure feed URL, default: `https://dotnetcli.blob.core.windows.net/dotnet` |
|
||||
| -AzureFeed | --azure-feed | See description | Azure feed URL, default: `https://dotnetcli.azureedge.net/dotnet` |
|
||||
|
||||
### Script location
|
||||
WIP: permanent link for obtaining latest version
|
||||
|
@ -143,7 +143,7 @@ Version files can be found in multiple places:
|
|||
|
||||
URL:
|
||||
```
|
||||
https://dotnetcli.blob.core.windows.net/dotnet/<Channel>/<VersionPointer>.<OSID>.version
|
||||
https://dotnetcli.azureedge.net/dotnet/<Channel>/<VersionPointer>.<OSID>.version
|
||||
```
|
||||
|
||||
### File content
|
||||
|
@ -156,7 +156,7 @@ Each version file contains two lines describing the build:
|
|||
## Version badge
|
||||
Version badge (SVG) is an image with textual representation of `<Version>`. It can be found under following URL:
|
||||
```
|
||||
https://dotnetcli.blob.core.windows.net/dotnet/<Channel>/<VersionPointer>.<OSID>.svg
|
||||
https://dotnetcli.azureedge.net/dotnet/<Channel>/<VersionPointer>.<OSID>.svg
|
||||
```
|
||||
|
||||
## Questions/gaps
|
||||
|
|
|
@ -7,6 +7,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{ED2FE3E2-F7E
|
|||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{5A29E8E3-A0FC-4C57-81DD-297B56D1A119}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
build.proj = build.proj
|
||||
global.json = global.json
|
||||
NuGet.Config = NuGet.Config
|
||||
EndProjectSection
|
||||
|
@ -27,24 +28,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{0722D325
|
|||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "MultiProjectValidator", "tools\MultiProjectValidator\MultiProjectValidator.xproj", "{08A68C6A-86F6-4ED2-89A7-B166D33E9F85}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Extensions.DependencyModel", "src\Microsoft.Extensions.DependencyModel\Microsoft.Extensions.DependencyModel.xproj", "{688870C8-9843-4F9E-8576-D39290AD0F25}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "EndToEnd", "test\EndToEnd\EndToEnd.xproj", "{65741CB1-8AEE-4C66-8198-10A7EA0E4258}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.DotNet.Tools.Test.Utilities", "test\Microsoft.DotNet.Tools.Tests.Utilities\Microsoft.DotNet.Tools.Test.Utilities.xproj", "{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestProjects", "TestProjects", "{713CBFBB-5392-438D-B766-A9A585EF1BB8}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "dotnet", "src\dotnet\dotnet.xproj", "{60CF7E6C-D6C8-439D-B7B7-D8A27E29BE2C}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "dotnet-build.Tests", "test\dotnet-build.Tests\dotnet-build.Tests.xproj", "{833FFEE1-7EED-4F51-8DFD-946D48833333}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "dotnet-compile.Tests", "test\dotnet-compile.Tests\dotnet-compile.Tests.xproj", "{833FFEE1-7EED-4F51-8DFD-946D48893D6E}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "dotnet-publish.Tests", "test\dotnet-publish.Tests\dotnet-publish.Tests.xproj", "{386D412C-003C-47B1-8258-0E35865CB7C4}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "dotnet-projectmodel-server.Tests", "test\dotnet-projectmodel-server.Tests\dotnet-projectmodel-server.Tests.xproj", "{11C77123-E4DA-499F-8900-80C88C2C69F2}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.DotNet.Files", "src\Microsoft.DotNet.Files\Microsoft.DotNet.Files.xproj", "{D521DD9F-0614-4929-93B4-D8FA5682C174}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "dotnet.Tests", "test\dotnet.Tests\dotnet.Tests.xproj", "{CB710268-4A82-48E4-9531-FAF1C8F78F4B}"
|
||||
|
@ -65,8 +58,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Installer", "Installer", "{
|
|||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.DotNet.Cli.Msi.Tests", "test\Installer\Microsoft.DotNet.Cli.Msi.Tests\Microsoft.DotNet.Cli.Msi.Tests.xproj", "{0B31C336-149D-471A-B7B1-27B0F1E80F83}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Extensions.DependencyModel.Tests", "test\Microsoft.Extensions.DependencyModel.Tests\Microsoft.Extensions.DependencyModel.Tests.xproj", "{4A4711D8-4312-49FC-87B5-4F183F4C6A51}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.DotNet.TestFramework", "src\Microsoft.DotNet.TestFramework\Microsoft.DotNet.TestFramework.xproj", "{0724ED7C-56E3-4604-9970-25E600611383}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "dotnet-test.UnitTests", "test\dotnet-test.UnitTests\dotnet-test.UnitTests.xproj", "{857274AC-E741-4266-A7FD-14DEE0C1CC96}"
|
||||
|
@ -125,6 +116,50 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.DotNet.Archive",
|
|||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "dotnet-new.Tests", "test\dotnet-new.Tests\dotnet-new.Tests.xproj", "{712A4AFF-D758-49B0-AB46-B6DD2FFC9D26}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "dotnet-build3.Tests", "test\dotnet-build3.Tests\dotnet-build3.Tests.xproj", "{49D7318E-D198-4E2B-BBEA-3A24D805F88D}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{89905EC4-BC0F-443B-8ADF-691321F10108}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
build\Microsoft.DotNet.Cli.Compile.targets = build\Microsoft.DotNet.Cli.Compile.targets
|
||||
build\Microsoft.DotNet.Cli.Monikers.props = build\Microsoft.DotNet.Cli.Monikers.props
|
||||
build\Microsoft.DotNet.Cli.Package.targets = build\Microsoft.DotNet.Cli.Package.targets
|
||||
build\Microsoft.DotNet.Cli.Prepare.targets = build\Microsoft.DotNet.Cli.Prepare.targets
|
||||
build\Microsoft.DotNet.Cli.Publish.targets = build\Microsoft.DotNet.Cli.Publish.targets
|
||||
build\Microsoft.DotNet.Cli.Run.targets = build\Microsoft.DotNet.Cli.Run.targets
|
||||
build\Microsoft.DotNet.Cli.tasks = build\Microsoft.DotNet.Cli.tasks
|
||||
build\Microsoft.DotNet.Cli.Test.targets = build\Microsoft.DotNet.Cli.Test.targets
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "package", "package", "{FD7D515A-D10F-4F49-B8AE-21CF7ED071AE}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
build\package\Microsoft.DotNet.Cli.Archive.targets = build\package\Microsoft.DotNet.Cli.Archive.targets
|
||||
build\package\Microsoft.DotNet.Cli.Installer.DEB.targets = build\package\Microsoft.DotNet.Cli.Installer.DEB.targets
|
||||
build\package\Microsoft.DotNet.Cli.Installer.MSI.targets = build\package\Microsoft.DotNet.Cli.Installer.MSI.targets
|
||||
build\package\Microsoft.DotNet.Cli.Installer.PKG.targets = build\package\Microsoft.DotNet.Cli.Installer.PKG.targets
|
||||
build\package\Microsoft.DotNet.Cli.Layout.targets = build\package\Microsoft.DotNet.Cli.Layout.targets
|
||||
build\package\Microsoft.DotNet.Cli.Nupkg.targets = build\package\Microsoft.DotNet.Cli.Nupkg.targets
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "compile", "compile", "{8E3354BD-827F-41B7-9EE6-6BE1F1EDD8E9}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
build\compile\Microsoft.DotNet.Cli.LzmaArchive.targets = build\compile\Microsoft.DotNet.Cli.LzmaArchive.targets
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{FF498306-2DE2-47F6-8C35-3CF0589CF2B8}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
build\test\TestAssetProjects.targets = build\test\TestAssetProjects.targets
|
||||
build\test\TestPackageProjects.targets = build\test\TestPackageProjects.targets
|
||||
build\test\TestProjects.targets = build\test\TestProjects.targets
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.DotNet.Tools.Tests.Utilities", "test\Microsoft.DotNet.Tools.Tests.Utilities\Microsoft.DotNet.Tools.Tests.Utilities.xproj", "{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "publish", "publish", "{27B12960-ABB0-4903-9C60-5E9157E659C8}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
build\publish\Microsoft.DotNet.Cli.Badge.targets = build\publish\Microsoft.DotNet.Cli.Badge.targets
|
||||
build\publish\PublishContent.targets = build\publish\PublishContent.targets
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -217,22 +252,6 @@ Global
|
|||
{DCDFE282-03DE-4DBC-B90C-CC3CE3EC8162}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||
{DCDFE282-03DE-4DBC-B90C-CC3CE3EC8162}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
|
||||
{DCDFE282-03DE-4DBC-B90C-CC3CE3EC8162}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
||||
{08A68C6A-86F6-4ED2-89A7-B166D33E9F85}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{08A68C6A-86F6-4ED2-89A7-B166D33E9F85}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{08A68C6A-86F6-4ED2-89A7-B166D33E9F85}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{08A68C6A-86F6-4ED2-89A7-B166D33E9F85}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{08A68C6A-86F6-4ED2-89A7-B166D33E9F85}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{08A68C6A-86F6-4ED2-89A7-B166D33E9F85}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
|
||||
{08A68C6A-86F6-4ED2-89A7-B166D33E9F85}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
|
||||
{08A68C6A-86F6-4ED2-89A7-B166D33E9F85}.MinSizeRel|x64.Build.0 = Debug|Any CPU
|
||||
{08A68C6A-86F6-4ED2-89A7-B166D33E9F85}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{08A68C6A-86F6-4ED2-89A7-B166D33E9F85}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{08A68C6A-86F6-4ED2-89A7-B166D33E9F85}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{08A68C6A-86F6-4ED2-89A7-B166D33E9F85}.Release|x64.Build.0 = Release|Any CPU
|
||||
{08A68C6A-86F6-4ED2-89A7-B166D33E9F85}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{08A68C6A-86F6-4ED2-89A7-B166D33E9F85}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||
{08A68C6A-86F6-4ED2-89A7-B166D33E9F85}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
|
||||
{08A68C6A-86F6-4ED2-89A7-B166D33E9F85}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
||||
{688870C8-9843-4F9E-8576-D39290AD0F25}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{688870C8-9843-4F9E-8576-D39290AD0F25}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{688870C8-9843-4F9E-8576-D39290AD0F25}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
|
@ -265,22 +284,6 @@ Global
|
|||
{65741CB1-8AEE-4C66-8198-10A7EA0E4258}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||
{65741CB1-8AEE-4C66-8198-10A7EA0E4258}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
|
||||
{65741CB1-8AEE-4C66-8198-10A7EA0E4258}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.MinSizeRel|x64.Build.0 = Debug|Any CPU
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.Release|x64.Build.0 = Release|Any CPU
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
||||
{60CF7E6C-D6C8-439D-B7B7-D8A27E29BE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{60CF7E6C-D6C8-439D-B7B7-D8A27E29BE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{60CF7E6C-D6C8-439D-B7B7-D8A27E29BE2C}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
|
@ -297,22 +300,6 @@ Global
|
|||
{60CF7E6C-D6C8-439D-B7B7-D8A27E29BE2C}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||
{60CF7E6C-D6C8-439D-B7B7-D8A27E29BE2C}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
|
||||
{60CF7E6C-D6C8-439D-B7B7-D8A27E29BE2C}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
||||
{833FFEE1-7EED-4F51-8DFD-946D48833333}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{833FFEE1-7EED-4F51-8DFD-946D48833333}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{833FFEE1-7EED-4F51-8DFD-946D48833333}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{833FFEE1-7EED-4F51-8DFD-946D48833333}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{833FFEE1-7EED-4F51-8DFD-946D48833333}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{833FFEE1-7EED-4F51-8DFD-946D48833333}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
|
||||
{833FFEE1-7EED-4F51-8DFD-946D48833333}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
|
||||
{833FFEE1-7EED-4F51-8DFD-946D48833333}.MinSizeRel|x64.Build.0 = Debug|Any CPU
|
||||
{833FFEE1-7EED-4F51-8DFD-946D48833333}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{833FFEE1-7EED-4F51-8DFD-946D48833333}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{833FFEE1-7EED-4F51-8DFD-946D48833333}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{833FFEE1-7EED-4F51-8DFD-946D48833333}.Release|x64.Build.0 = Release|Any CPU
|
||||
{833FFEE1-7EED-4F51-8DFD-946D48833333}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{833FFEE1-7EED-4F51-8DFD-946D48833333}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||
{833FFEE1-7EED-4F51-8DFD-946D48833333}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
|
||||
{833FFEE1-7EED-4F51-8DFD-946D48833333}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
||||
{833FFEE1-7EED-4F51-8DFD-946D48893D6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{833FFEE1-7EED-4F51-8DFD-946D48893D6E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{833FFEE1-7EED-4F51-8DFD-946D48893D6E}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
|
@ -345,22 +332,6 @@ Global
|
|||
{386D412C-003C-47B1-8258-0E35865CB7C4}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||
{386D412C-003C-47B1-8258-0E35865CB7C4}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
|
||||
{386D412C-003C-47B1-8258-0E35865CB7C4}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
||||
{11C77123-E4DA-499F-8900-80C88C2C69F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{11C77123-E4DA-499F-8900-80C88C2C69F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{11C77123-E4DA-499F-8900-80C88C2C69F2}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{11C77123-E4DA-499F-8900-80C88C2C69F2}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{11C77123-E4DA-499F-8900-80C88C2C69F2}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{11C77123-E4DA-499F-8900-80C88C2C69F2}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
|
||||
{11C77123-E4DA-499F-8900-80C88C2C69F2}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
|
||||
{11C77123-E4DA-499F-8900-80C88C2C69F2}.MinSizeRel|x64.Build.0 = Debug|Any CPU
|
||||
{11C77123-E4DA-499F-8900-80C88C2C69F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{11C77123-E4DA-499F-8900-80C88C2C69F2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{11C77123-E4DA-499F-8900-80C88C2C69F2}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{11C77123-E4DA-499F-8900-80C88C2C69F2}.Release|x64.Build.0 = Release|Any CPU
|
||||
{11C77123-E4DA-499F-8900-80C88C2C69F2}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{11C77123-E4DA-499F-8900-80C88C2C69F2}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||
{11C77123-E4DA-499F-8900-80C88C2C69F2}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
|
||||
{11C77123-E4DA-499F-8900-80C88C2C69F2}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
||||
{D521DD9F-0614-4929-93B4-D8FA5682C174}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D521DD9F-0614-4929-93B4-D8FA5682C174}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D521DD9F-0614-4929-93B4-D8FA5682C174}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
|
@ -489,22 +460,6 @@ Global
|
|||
{0B31C336-149D-471A-B7B1-27B0F1E80F83}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||
{0B31C336-149D-471A-B7B1-27B0F1E80F83}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
|
||||
{0B31C336-149D-471A-B7B1-27B0F1E80F83}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
||||
{4A4711D8-4312-49FC-87B5-4F183F4C6A51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4A4711D8-4312-49FC-87B5-4F183F4C6A51}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4A4711D8-4312-49FC-87B5-4F183F4C6A51}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{4A4711D8-4312-49FC-87B5-4F183F4C6A51}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{4A4711D8-4312-49FC-87B5-4F183F4C6A51}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4A4711D8-4312-49FC-87B5-4F183F4C6A51}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4A4711D8-4312-49FC-87B5-4F183F4C6A51}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
|
||||
{4A4711D8-4312-49FC-87B5-4F183F4C6A51}.MinSizeRel|x64.Build.0 = Debug|Any CPU
|
||||
{4A4711D8-4312-49FC-87B5-4F183F4C6A51}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4A4711D8-4312-49FC-87B5-4F183F4C6A51}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4A4711D8-4312-49FC-87B5-4F183F4C6A51}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{4A4711D8-4312-49FC-87B5-4F183F4C6A51}.Release|x64.Build.0 = Release|Any CPU
|
||||
{4A4711D8-4312-49FC-87B5-4F183F4C6A51}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4A4711D8-4312-49FC-87B5-4F183F4C6A51}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||
{4A4711D8-4312-49FC-87B5-4F183F4C6A51}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
|
||||
{4A4711D8-4312-49FC-87B5-4F183F4C6A51}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
||||
{0724ED7C-56E3-4604-9970-25E600611383}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0724ED7C-56E3-4604-9970-25E600611383}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0724ED7C-56E3-4604-9970-25E600611383}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
|
@ -921,6 +876,38 @@ Global
|
|||
{712A4AFF-D758-49B0-AB46-B6DD2FFC9D26}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||
{712A4AFF-D758-49B0-AB46-B6DD2FFC9D26}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
|
||||
{712A4AFF-D758-49B0-AB46-B6DD2FFC9D26}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
||||
{49D7318E-D198-4E2B-BBEA-3A24D805F88D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{49D7318E-D198-4E2B-BBEA-3A24D805F88D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{49D7318E-D198-4E2B-BBEA-3A24D805F88D}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{49D7318E-D198-4E2B-BBEA-3A24D805F88D}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{49D7318E-D198-4E2B-BBEA-3A24D805F88D}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{49D7318E-D198-4E2B-BBEA-3A24D805F88D}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
|
||||
{49D7318E-D198-4E2B-BBEA-3A24D805F88D}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
|
||||
{49D7318E-D198-4E2B-BBEA-3A24D805F88D}.MinSizeRel|x64.Build.0 = Debug|Any CPU
|
||||
{49D7318E-D198-4E2B-BBEA-3A24D805F88D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{49D7318E-D198-4E2B-BBEA-3A24D805F88D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{49D7318E-D198-4E2B-BBEA-3A24D805F88D}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{49D7318E-D198-4E2B-BBEA-3A24D805F88D}.Release|x64.Build.0 = Release|Any CPU
|
||||
{49D7318E-D198-4E2B-BBEA-3A24D805F88D}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{49D7318E-D198-4E2B-BBEA-3A24D805F88D}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||
{49D7318E-D198-4E2B-BBEA-3A24D805F88D}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
|
||||
{49D7318E-D198-4E2B-BBEA-3A24D805F88D}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.MinSizeRel|x64.Build.0 = Debug|Any CPU
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.Release|x64.Build.0 = Release|Any CPU
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -931,16 +918,12 @@ Global
|
|||
{A16958E1-24C7-4F1E-B317-204AD91625DD} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
|
||||
{BD7833F8-3209-4682-BF75-B4BCA883E279} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
|
||||
{DCDFE282-03DE-4DBC-B90C-CC3CE3EC8162} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
|
||||
{08A68C6A-86F6-4ED2-89A7-B166D33E9F85} = {0722D325-24C8-4E83-B5AF-0A083E7F0749}
|
||||
{688870C8-9843-4F9E-8576-D39290AD0F25} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
|
||||
{65741CB1-8AEE-4C66-8198-10A7EA0E4258} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||
{713CBFBB-5392-438D-B766-A9A585EF1BB8} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||
{60CF7E6C-D6C8-439D-B7B7-D8A27E29BE2C} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
|
||||
{833FFEE1-7EED-4F51-8DFD-946D48833333} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||
{833FFEE1-7EED-4F51-8DFD-946D48893D6E} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||
{386D412C-003C-47B1-8258-0E35865CB7C4} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||
{11C77123-E4DA-499F-8900-80C88C2C69F2} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||
{D521DD9F-0614-4929-93B4-D8FA5682C174} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
|
||||
{CB710268-4A82-48E4-9531-FAF1C8F78F4B} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||
{920B71D8-62DA-4F5E-8A26-926C113F1D97} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||
|
@ -950,7 +933,6 @@ Global
|
|||
{0745410A-6629-47EB-AAB5-08D6288CAD72} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||
{0E3300A4-DF54-40BF-87D8-E7658330C288} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||
{0B31C336-149D-471A-B7B1-27B0F1E80F83} = {0E3300A4-DF54-40BF-87D8-E7658330C288}
|
||||
{4A4711D8-4312-49FC-87B5-4F183F4C6A51} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||
{0724ED7C-56E3-4604-9970-25E600611383} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
|
||||
{857274AC-E741-4266-A7FD-14DEE0C1CC96} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||
{60C33D0A-A5D8-4AB0-9956-1F804654DF05} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||
|
@ -980,5 +962,11 @@ Global
|
|||
{4C3B06D5-B6D5-4E5B-A44F-3EBE52A1C759} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||
{35B19F22-B8C0-4849-9C35-3F809B7588B8} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
|
||||
{712A4AFF-D758-49B0-AB46-B6DD2FFC9D26} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||
{49D7318E-D198-4E2B-BBEA-3A24D805F88D} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||
{FD7D515A-D10F-4F49-B8AE-21CF7ED071AE} = {89905EC4-BC0F-443B-8ADF-691321F10108}
|
||||
{8E3354BD-827F-41B7-9EE6-6BE1F1EDD8E9} = {89905EC4-BC0F-443B-8ADF-691321F10108}
|
||||
{FF498306-2DE2-47F6-8C35-3CF0589CF2B8} = {89905EC4-BC0F-443B-8ADF-691321F10108}
|
||||
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||
{27B12960-ABB0-4903-9C60-5E9157E659C8} = {89905EC4-BC0F-443B-8ADF-691321F10108}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<clear />
|
||||
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
|
||||
<add key="cli-deps" value="https://dotnet.myget.org/F/cli-deps/api/v3/index.json" />
|
||||
<add key="xunit" value="https://www.myget.org/F/xunit/api/v3/index.json" />
|
||||
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
|
||||
</packageSources>
|
||||
</configuration>
|
||||
|
|
|
@ -41,7 +41,7 @@ Build Status
|
|||
Installers and Binaries
|
||||
-----------------------
|
||||
|
||||
You can download .NET Core as either an installer (MSI, PKG) or a zip (zip, gzip). You can download the product in two flavours:
|
||||
You can download .NET Core as either an installer (MSI, PKG) or a zip (zip, gzip). You can download the product in two flavors:
|
||||
|
||||
- .NET Core - .NET Core runtime and framework
|
||||
- .NET Core SDK - .NET Core + CLI tools
|
||||
|
@ -122,4 +122,3 @@ License
|
|||
--------------------
|
||||
|
||||
By downloading the .zip you are agreeing to the terms in the project [EULA](https://aka.ms/dotnet-core-eula).
|
||||
|
||||
|
|
|
@ -57,5 +57,9 @@
|
|||
"ClassLibrary2",
|
||||
"ClassLibrary3"
|
||||
]
|
||||
},
|
||||
"packageFolders": {
|
||||
"/foo/packages": {},
|
||||
"/foo/packages2": {}
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"projects": ["src"]
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0",
|
||||
"EmptyLibrary": "1.0.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {}
|
||||
}
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
using System;
|
||||
|
||||
namespace Misc.DthTestProjects.EmptyConsoleApp
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
public int Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("Hello, world.");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"dependencies": {},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0"
|
||||
}
|
||||
},
|
||||
"dnx451": {}
|
||||
}
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
using System;
|
||||
|
||||
namespace Misc.DthTestProjects.EmptyLibrary
|
||||
{
|
||||
public class Class
|
||||
{
|
||||
}
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"dependencies": { },
|
||||
"frameworks": {
|
||||
"dnxcore50": {
|
||||
"dependencies":{
|
||||
"NETStandard.Library": "1.0.0-rc2-23811",
|
||||
"System.Console": "4.0.0-beta-*"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
"version": "1.0.0-*",
|
||||
"dependencies": {},
|
||||
"frameworks": {
|
||||
"netstandard1.3": {
|
||||
"imports": "dnxcore50",
|
||||
"dependencies": {
|
||||
"NETStandard.Library": "1.6.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
using System;
|
||||
|
||||
namespace Misc.DthTestProjects.SimpleConsoleApp
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
public int Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("Hello, world.");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
namespace FailReleaseProject
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
public int Main(string[] args)
|
||||
{
|
||||
#if RELEASE
|
||||
// fail the compilation under Release configuration
|
||||
i
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
"imports": "dnxcore50",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0",
|
||||
"Microsoft.Web.Administration": "7.0.0"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {}
|
||||
}
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"NoSuchPackage": "1.0.0"
|
||||
},
|
||||
"frameworks": {
|
||||
"dnx451": { }
|
||||
}
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"EmptyLibrary": "1.0.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"dnx451": { }
|
||||
}
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"version": "9.0.1",
|
||||
"dependencies": {
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard1.5": { }
|
||||
}
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"projects": [
|
||||
"src",
|
||||
"../ext"
|
||||
]
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"Newtonsoft.Json": "9.0.1"
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard1.5": {}
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"projects": ["src"]]
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
<?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="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
|
||||
</packageSources>
|
||||
</configuration>
|
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
"version": "1.0.0-*",
|
||||
"buildOptions": {
|
||||
"emitEntryPoint": true
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {}
|
||||
}
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"version": "1.0.0-*",
|
||||
"dependencies": {
|
||||
"
|
||||
},
|
||||
"frameworks": {
|
||||
[]
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
# Negates the lock file
|
||||
# MSBuiild references' project model server tests requires these lock files, since they can't be created without VS tooling.
|
||||
!project.lock.json
|
|
@ -1,12 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ClassLibrary1
|
||||
{
|
||||
public class Class1
|
||||
{
|
||||
}
|
||||
}
|
|
@ -1,62 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{FD073258-550B-4E57-86AE-DC4874015EB1}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ClassLibrary1</RootNamespace>
|
||||
<AssemblyName>ClassLibrary1</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Class1.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -1,36 +0,0 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("ClassLibrary1")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("ClassLibrary1")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2016")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("fd073258-550b-4e57-86ae-dc4874015eb1")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net452" />
|
||||
</packages>
|
|
@ -1,12 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ClassLibrary2
|
||||
{
|
||||
public class Class1
|
||||
{
|
||||
}
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>0f2d2a48-e867-496c-85a7-e97b64cfeda4</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ClassLibrary2</RootNamespace>
|
||||
<AssemblyName>ClassLibrary2</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System"/>
|
||||
|
||||
<Reference Include="System.Core"/>
|
||||
<Reference Include="System.Xml.Linq"/>
|
||||
<Reference Include="System.Data.DataSetExtensions"/>
|
||||
|
||||
|
||||
<Reference Include="Microsoft.CSharp"/>
|
||||
|
||||
<Reference Include="System.Data"/>
|
||||
|
||||
<Reference Include="System.Net.Http"/>
|
||||
|
||||
<Reference Include="System.Xml"/>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Class1.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
|
||||
</Project>
|
|
@ -1,36 +0,0 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("ClassLibrary2")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("ClassLibrary2")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2016")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("0f2d2a48-e867-496c-85a7-e97b64cfeda4")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -1,12 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ClassLibrary3
|
||||
{
|
||||
public class Class1
|
||||
{
|
||||
}
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>428e95cb-8435-414b-a313-9d734c633b3e</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ClassLibrary3</RootNamespace>
|
||||
<AssemblyName>ClassLibrary3</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System"/>
|
||||
|
||||
<Reference Include="System.Core"/>
|
||||
<Reference Include="System.Xml.Linq"/>
|
||||
<Reference Include="System.Data.DataSetExtensions"/>
|
||||
|
||||
|
||||
<Reference Include="Microsoft.CSharp"/>
|
||||
|
||||
<Reference Include="System.Data"/>
|
||||
|
||||
<Reference Include="System.Net.Http"/>
|
||||
|
||||
<Reference Include="System.Xml"/>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Class1.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
|
||||
</Project>
|
|
@ -1,36 +0,0 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("ClassLibrary3")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("ClassLibrary3")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2016")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("428e95cb-8435-414b-a313-9d734c633b3e")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -1,53 +0,0 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25029.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{1443ACE0-3065-4C20-AD59-D561798AE0A5}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{0AE82780-22C8-4DC8-8F1E-86977FDD092F}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
global.json = global.json
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ConsoleApp13", "src\ConsoleApp13\ConsoleApp13.xproj", "{767D3038-AC3A-4722-B21F-F85F2CBC3AA3}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassLibrary1", "ClassLibrary1\ClassLibrary1.csproj", "{FD073258-550B-4E57-86AE-DC4874015EB1}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassLibrary2", "ClassLibrary2\ClassLibrary2.csproj", "{0F2D2A48-E867-496C-85A7-E97B64CFEDA4}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassLibrary3", "ClassLibrary3\ClassLibrary3.csproj", "{428E95CB-8435-414B-A313-9D734C633B3E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{767D3038-AC3A-4722-B21F-F85F2CBC3AA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{767D3038-AC3A-4722-B21F-F85F2CBC3AA3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{767D3038-AC3A-4722-B21F-F85F2CBC3AA3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{767D3038-AC3A-4722-B21F-F85F2CBC3AA3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{FD073258-550B-4E57-86AE-DC4874015EB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FD073258-550B-4E57-86AE-DC4874015EB1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FD073258-550B-4E57-86AE-DC4874015EB1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FD073258-550B-4E57-86AE-DC4874015EB1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0F2D2A48-E867-496C-85A7-E97B64CFEDA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0F2D2A48-E867-496C-85A7-E97B64CFEDA4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0F2D2A48-E867-496C-85A7-E97B64CFEDA4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0F2D2A48-E867-496C-85A7-E97B64CFEDA4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{428E95CB-8435-414B-A313-9D734C633B3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{428E95CB-8435-414B-A313-9D734C633B3E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{428E95CB-8435-414B-A313-9D734C633B3E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{428E95CB-8435-414B-A313-9D734C633B3E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{767D3038-AC3A-4722-B21F-F85F2CBC3AA3} = {1443ACE0-3065-4C20-AD59-D561798AE0A5}
|
||||
{FD073258-550B-4E57-86AE-DC4874015EB1} = {1443ACE0-3065-4C20-AD59-D561798AE0A5}
|
||||
{0F2D2A48-E867-496C-85A7-E97B64CFEDA4} = {1443ACE0-3065-4C20-AD59-D561798AE0A5}
|
||||
{428E95CB-8435-414B-A313-9D734C633B3E} = {1443ACE0-3065-4C20-AD59-D561798AE0A5}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"projects": [ "src", "test" ]
|
||||
}
|
|
@ -1,24 +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)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>767d3038-ac3a-4722-b21f-f85f2cbc3aa3</ProjectGuid>
|
||||
<RootNamespace>ConsoleApp13</RootNamespace>
|
||||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
|
||||
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\</OutputPath>
|
||||
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\ClassLibrary1\ClassLibrary1.csproj" />
|
||||
<ProjectReference Include="..\..\ClassLibrary2\ClassLibrary2.csproj" />
|
||||
<ProjectReference Include="..\..\ClassLibrary3\ClassLibrary3.csproj" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
</Project>
|
|
@ -1,15 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ConsoleApp13
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
var q = new ClassLibrary1.Class1();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("ConsoleApp13")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("767d3038-ac3a-4722-b21f-f85f2cbc3aa3")]
|
|
@ -1,36 +0,0 @@
|
|||
{
|
||||
"version": 2,
|
||||
"exports": {
|
||||
"ClassLibrary1/1.0.0": {
|
||||
"type": "project",
|
||||
"framework": ".NETFramework,Version=v4.5.2",
|
||||
"compile": {
|
||||
"bin/Debug/ClassLibrary1.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"../packages/Newtonsoft.Json.8.0.3/lib/net45/Newtonsoft.Json.dll": {},
|
||||
"bin/Debug/ClassLibrary1.dll": {}
|
||||
}
|
||||
},
|
||||
"ClassLibrary2/1.0.0": {
|
||||
"type": "project",
|
||||
"framework": ".NETFramework,Version=v4.6",
|
||||
"compile": {
|
||||
"bin/Debug/ClassLibrary2.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"bin/Debug/ClassLibrary2.dll": {}
|
||||
}
|
||||
},
|
||||
"ClassLibrary3/1.0.0": {
|
||||
"type": "project",
|
||||
"framework": ".NETFramework,Version=v4.6",
|
||||
"compile": {
|
||||
"bin/Debug/ClassLibrary3.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"bin/Debug/ClassLibrary3.dll": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"version": "1.0.0-*",
|
||||
"buildOptions": {
|
||||
"emitEntryPoint": true
|
||||
},
|
||||
"frameworks": {
|
||||
"net46": {
|
||||
"dependencies": {
|
||||
"ClassLibrary1": {
|
||||
"target": "project"
|
||||
},
|
||||
"ClassLibrary2": {
|
||||
"target": "project"
|
||||
},
|
||||
"ClassLibrary3": {
|
||||
"target": "project"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
{
|
||||
"locked": false,
|
||||
"version": 2,
|
||||
"targets": {
|
||||
".NETFramework,Version=v4.6": {
|
||||
"ClassLibrary1/1.0.0": {
|
||||
"type": "project"
|
||||
},
|
||||
"ClassLibrary2/1.0.0": {
|
||||
"type": "project"
|
||||
},
|
||||
"ClassLibrary3/1.0.0": {
|
||||
"type": "project"
|
||||
}
|
||||
},
|
||||
".NETFramework,Version=v4.6/win7-x64": {
|
||||
"ClassLibrary1/1.0.0": {
|
||||
"type": "project"
|
||||
},
|
||||
"ClassLibrary2/1.0.0": {
|
||||
"type": "project"
|
||||
},
|
||||
"ClassLibrary3/1.0.0": {
|
||||
"type": "project"
|
||||
}
|
||||
},
|
||||
".NETFramework,Version=v4.6/win7-x86": {
|
||||
"ClassLibrary1/1.0.0": {
|
||||
"type": "project"
|
||||
},
|
||||
"ClassLibrary2/1.0.0": {
|
||||
"type": "project"
|
||||
},
|
||||
"ClassLibrary3/1.0.0": {
|
||||
"type": "project"
|
||||
}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"ClassLibrary1/1.0.0": {
|
||||
"type": "project",
|
||||
"msbuildProject": "../../ClassLibrary1/ClassLibrary1.csproj"
|
||||
},
|
||||
"ClassLibrary2/1.0.0": {
|
||||
"type": "project",
|
||||
"msbuildProject": "../../ClassLibrary2/ClassLibrary2.csproj"
|
||||
},
|
||||
"ClassLibrary3/1.0.0": {
|
||||
"type": "project",
|
||||
"msbuildProject": "../../ClassLibrary3/ClassLibrary3.csproj"
|
||||
}
|
||||
},
|
||||
"projectFileDependencyGroups": {
|
||||
"": [],
|
||||
".NETFramework,Version=v4.6": [
|
||||
"ClassLibrary1",
|
||||
"ClassLibrary2",
|
||||
"ClassLibrary3"
|
||||
]
|
||||
}
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"dependencies": {
|
||||
},
|
||||
"frameworks": {
|
||||
"net45": {
|
||||
"frameworkAssemblies": {
|
||||
"mscorlib": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -8,9 +8,7 @@
|
|||
"type": "platform",
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"Microsoft.Extensions.DependencyModel": {
|
||||
"target": "project"
|
||||
}
|
||||
"Microsoft.Extensions.DependencyModel": "1.0.1-beta-000914"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
{
|
||||
"version": "1.0.0-*",
|
||||
"dependencies": {
|
||||
"Microsoft.Extensions.DependencyModel": {
|
||||
"target": "project"
|
||||
}
|
||||
"Microsoft.Extensions.DependencyModel": "1.0.1-beta-003395"
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard1.6": {
|
||||
|
|
18
TestAssets/TestProjects/MSBuildTestApp/MSBuildTestApp.csproj
Normal file
18
TestAssets/TestProjects/MSBuildTestApp/MSBuildTestApp.csproj
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFrameworkIdentifier>.NETCoreApp</TargetFrameworkIdentifier>
|
||||
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
|
||||
<OutputPath>bin\$(Configuration)\netcoreapp1.0</OutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="**\*.cs" />
|
||||
<None Include="project.json" />
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
|
@ -1,11 +1,12 @@
|
|||
using System;
|
||||
using System;
|
||||
|
||||
namespace ConsoleApplication
|
||||
namespace MSBuildTestApp
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("Hello World!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
13
TestAssets/TestProjects/MSBuildTestApp/project.json
Normal file
13
TestAssets/TestProjects/MSBuildTestApp/project.json
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
"dependencies": {
|
||||
"Microsoft.DotNet.Core.Sdk": "1.0.0-alpha-20160811-3",
|
||||
"Microsoft.NETCore.App": {
|
||||
"version": "1.0.0",
|
||||
"type": "platform"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="Local" value="Packages" />
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
{
|
||||
"version": "1.0.0-*",
|
||||
"dependencies": {
|
||||
"dotnet-test-xunit": "1.0.0-rc2-192208-24",
|
||||
"Microsoft.NETCore.Platforms": "1.0.1",
|
||||
"xunit": "2.1.0"
|
||||
"dotnet-test-xunit": "1.0.0-rc2-318883-21",
|
||||
"xunit": "2.2.0-beta3-build3330"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
|
|
|
@ -7,8 +7,11 @@
|
|||
},
|
||||
"System.Linq.Expressions": "4.1.0",
|
||||
"System.Runtime.Serialization.Primitives": "4.1.1",
|
||||
"xunit": "2.1.0",
|
||||
"dotnet-test-xunit": "1.0.0-rc2-192208-24"
|
||||
"xunit": "2.2.0-beta3-build3330",
|
||||
"dotnet-test-xunit": "1.0.0-rc2-318883-21",
|
||||
"Microsoft.DotNet.InternalAbstractions": {
|
||||
"target": "project"
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
MAJOR_VERSION=1
|
||||
MINOR_VERSION=0
|
||||
PATCH_VERSION=0
|
||||
RELEASE_SUFFIX=preview3
|
||||
CHANNEL=rel-1.0.0
|
||||
BRANCH_NAME=rel/1.0.0
|
||||
RELEASE_SUFFIX=featmsbuild
|
||||
CHANNEL=feature-msbuild
|
||||
BRANCH_NAME=feature/msbuild
|
||||
|
|
|
@ -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-cli-build\build.ps1\" %*; exit $LastExitCode;"
|
||||
powershell -NoProfile -NoLogo -Command "& \"%~dp0run-build.ps1\" %*; exit $LastExitCode;"
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
|
76
build.proj
Normal file
76
build.proj
Normal file
|
@ -0,0 +1,76 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="BuildTheWholeCli" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="build/Microsoft.DotNet.Cli.Monikers.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!--
|
||||
$(OS) is set to Unix/Windows_NT. This comes from an environment variable on Windows and MSBuild on Unix.
|
||||
-->
|
||||
<PlatformScriptHost Condition=" '$(OS)' == 'Windows_NT' ">powershell -NoProfile -NoLogo -Command </PlatformScriptHost>
|
||||
<PlatformScriptHost Condition=" '$(OS)' != 'Windows_NT' "></PlatformScriptHost>
|
||||
|
||||
<PlatformScriptExtension Condition=" '$(OS)' == 'Windows_NT' ">.ps1</PlatformScriptExtension>
|
||||
<PlatformScriptExtension Condition=" '$(OS)' != 'Windows_NT' ">.sh</PlatformScriptExtension>
|
||||
|
||||
<CLITargets Condition=" '$(CLITargets)' == '' ">Prepare;Compile;Test;Package;Publish</CLITargets>
|
||||
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
|
||||
<CLIBuildFileName>$(RepoRoot)/build_projects/dotnet-cli-build/bin/dotnet-cli-build</CLIBuildFileName>
|
||||
<CLIBuildDll>$(CLIBuildFileName).dll</CLIBuildDll>
|
||||
|
||||
<CoreSetupChannel>preview</CoreSetupChannel>
|
||||
<SharedFrameworkName>Microsoft.NETCore.App</SharedFrameworkName>
|
||||
<SharedFrameworkVersion>1.0.0</SharedFrameworkVersion>
|
||||
<SharedHostVersion>1.0.1</SharedHostVersion>
|
||||
<HostFxrVersion>1.0.1</HostFxrVersion>
|
||||
|
||||
<CoreCLRVersion>1.0.2</CoreCLRVersion>
|
||||
<JitVersion>1.0.2</JitVersion>
|
||||
|
||||
<ExeExtension>.exe</ExeExtension>
|
||||
<ExeExtension Condition=" '$(OS)' != 'Windows_NT' "></ExeExtension>
|
||||
|
||||
<Stage0Directory>$(RepoRoot)/.dotnet_stage0/$(Architecture)</Stage0Directory>
|
||||
<DotnetStage0>$(Stage0Directory)/dotnet$(ExeExtension)</DotnetStage0>
|
||||
<DotnetCliBuildDirectory>$(RepoRoot)/build_projects/dotnet-cli-build</DotnetCliBuildDirectory>
|
||||
<PackagesDir>$(RepoRoot)/.nuget</PackagesDir>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotnetCliBuildFrameworkInputs Include="build_projects/**/*.cs" Exclude="build_projects/**/obj/**/*.cs" />
|
||||
<DotnetCliBuildFrameworkInputs Include="build_projects/**/project.json;build_projects/**/project.lock.json" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Workaround to "Native image cannot be loaded multiple times" issue
|
||||
A target in the top level file needs to run and invoke a task
|
||||
https://github.com/Microsoft/msbuild/issues/750 -->
|
||||
<Target Name="MSBuildWorkaroundTarget">
|
||||
<Message Text="Dont remove this target" />
|
||||
</Target>
|
||||
|
||||
<Target Name="BuildDotnetCliBuildFramework"
|
||||
Inputs="@(DotnetCliBuildFrameworkInputs)"
|
||||
Outputs="$(CLIBuildDll)"
|
||||
DependsOnTargets="MSBuildWorkaroundTarget;
|
||||
RestoreDotnetCliBuildFramework">
|
||||
|
||||
<Exec Command="$(DotnetStage0) publish -o $(DotnetCliBuildDirectory)/bin --framework netcoreapp1.0" WorkingDirectory="$(DotnetCliBuildDirectory)"/>
|
||||
</Target>
|
||||
|
||||
<Target Name="RestoreDotnetCliBuildFramework"
|
||||
Inputs="$(DotnetCliBuildDirectory)/project.json"
|
||||
Outputs="$(DotnetCliBuildDirectory)/project.lock.json">
|
||||
|
||||
<Exec Command="$(DotnetStage0) restore" WorkingDirectory="$(DotnetCliBuildDirectory)"/>
|
||||
</Target>
|
||||
|
||||
<Target DependsOnTargets="$(CLITargets)" Name="BuildTheWholeCli"></Target>
|
||||
|
||||
<Import Project="build/Microsoft.DotNet.Cli.Prepare.targets" />
|
||||
<Import Project="build/Microsoft.DotNet.Cli.Compile.targets" />
|
||||
<Import Project="build/Microsoft.DotNet.Cli.Package.targets" />
|
||||
<Import Project="build/Microsoft.DotNet.Cli.Test.targets" />
|
||||
<Import Project="build/Microsoft.DotNet.Cli.Publish.targets" />
|
||||
<Import Project="build/Microsoft.DotNet.Cli.Run.targets" />
|
||||
</Project>
|
6
build.sh
6
build.sh
|
@ -44,17 +44,19 @@ done
|
|||
|
||||
# $args array may have empty elements in it.
|
||||
# The easiest way to remove them is to cast to string and back to array.
|
||||
# This will actually break quoted arguments, arguments like
|
||||
# -test "hello world" will be broken into three arguments instead of two, as it should.
|
||||
temp="${args[@]}"
|
||||
args=($temp)
|
||||
|
||||
dockerbuild()
|
||||
{
|
||||
BUILD_COMMAND=/opt/code/build_projects/dotnet-cli-build/build.sh $DIR/scripts/dockerrun.sh --non-interactive "$@"
|
||||
BUILD_COMMAND=/opt/code/run-build.sh $DIR/scripts/dockerrun.sh --non-interactive "$@"
|
||||
}
|
||||
|
||||
# Check if we need to build in docker
|
||||
if [ ! -z "$BUILD_IN_DOCKER" ]; then
|
||||
dockerbuild "${args[@]}"
|
||||
else
|
||||
$DIR/build_projects/dotnet-cli-build/build.sh "${args[@]}"
|
||||
$DIR/run-build.sh "${args[@]}"
|
||||
fi
|
||||
|
|
250
build/Microsoft.DotNet.Cli.Compile.targets
Normal file
250
build/Microsoft.DotNet.Cli.Compile.targets
Normal file
|
@ -0,0 +1,250 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="compile/Microsoft.DotNet.Cli.LzmaArchive.targets" />
|
||||
<Import Project="crossgen/Microsoft.DotNet.Cli.Crossgen.targets" />
|
||||
|
||||
<PropertyGroup>
|
||||
<BinaryToCorehostifyRelDir>runtimes/any/native</BinaryToCorehostifyRelDir>
|
||||
<CoreSDKDir>$(RepoRoot)/resources/MSBuildImports</CoreSDKDir>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PublishOutputExtensions Include="$(ExeExtension);.dll;.pdb;.deps.json;.runtimeconfig.json" />
|
||||
<FilesToMove Include="$(BinaryToCorehostifyRelDir)/csc.exe;$(BinaryToCorehostifyRelDir)/MSBuild.exe;" />
|
||||
<BundledTools Include="csc;MSBuild;NuGet.CommandLine.XPlat;dotnet" />
|
||||
<CoreSDKContent Include="$(CoreSDKDir)/**/*" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="Compile" DependsOnTargets="Prepare;
|
||||
SetupStage;
|
||||
CompileStage;
|
||||
BuildProjectsForNuGetPackages;
|
||||
GenerateNuGetPackagesArchive" />
|
||||
|
||||
<Target Name="SetupStage"
|
||||
DependsOnTargets="Prepare">
|
||||
<PropertyGroup>
|
||||
<SrcDirectory>$(RepoRoot)/src</SrcDirectory>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<CompileStageInputs Include="$(SrcDirectory)/**/*.cs" Exclude="$(SrcDirectory)/**/obj/**/*.cs" />
|
||||
<CompileStageInputs Include="$(SrcDirectory)/**/project.json;$(SrcDirectory)/**/project.lock.json" />
|
||||
|
||||
<Stage Include="Stage1">
|
||||
<Inputs>@(CompileStageInputs)</Inputs>
|
||||
<StageDirectory>$(Stage1Directory)</StageDirectory>
|
||||
<StageSymbolsDirectory>$(Stage1SymbolsDirectory)</StageSymbolsDirectory>
|
||||
<DotnetDir>$(Stage0Directory)</DotnetDir>
|
||||
</Stage>
|
||||
<Stage Include="Stage2">
|
||||
<Inputs>@(CompileStageInputs)</Inputs>
|
||||
<StageDirectory>$(Stage2Directory)</StageDirectory>
|
||||
<StageSymbolsDirectory>$(Stage2SymbolsDirectory)</StageSymbolsDirectory>
|
||||
<DotnetDir>$(Stage1Directory)</DotnetDir>
|
||||
</Stage>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="CompileStage"
|
||||
DependsOnTargets="SetupStage;
|
||||
InitCrossgenProps;"
|
||||
Inputs="%(Stage.Inputs)"
|
||||
Outputs="%(StageDirectory)/sdk/$(SdkVersion)/dotnet.dll">
|
||||
<PropertyGroup>
|
||||
<DynamicLibPrefix Condition=" '$(OSName)' == 'win' "></DynamicLibPrefix>
|
||||
<DynamicLibPrefix Condition=" '$(OSName)' != 'win' ">lib</DynamicLibPrefix>
|
||||
|
||||
<DynamicLibSuffix Condition=" '$(OSName)' == 'win' ">.dll</DynamicLibSuffix>
|
||||
<DynamicLibSuffix Condition=" '$(OSName)' == 'osx' ">.dylib</DynamicLibSuffix>
|
||||
<DynamicLibSuffix Condition=" '$(DynamicLibSuffix)' == '' ">.so</DynamicLibSuffix>
|
||||
|
||||
<DotnetHostBaseName>dotnet$(ExeExtension)</DotnetHostBaseName>
|
||||
<DotnetHostFxrBaseName>$(DynamicLibPrefix)hostfxr$(DynamicLibSuffix)</DotnetHostFxrBaseName>
|
||||
<HostPolicyBaseName>$(DynamicLibPrefix)hostpolicy$(DynamicLibSuffix)</HostPolicyBaseName>
|
||||
|
||||
<StageDirectory>%(Stage.StageDirectory)</StageDirectory>
|
||||
<StageSymbolsDirectory>%(Stage.StageSymbolsDirectory)</StageSymbolsDirectory>
|
||||
<SdkOutputDirectory>$(StageDirectory)/sdk/$(SdkVersion)</SdkOutputDirectory>
|
||||
<BinaryToCorehostifyOutDir>$(SdkOutputDirectory)/$(BinaryToCorehostifyRelDir)</BinaryToCorehostifyOutDir>
|
||||
<MSBuildTargetsDirectory>$(SdkOutputDirectory)/runtimes/any/native</MSBuildTargetsDirectory>
|
||||
|
||||
<SharedFrameworkNameVersionPath>$(StageDirectory)/shared/$(SharedFrameworkName)/$(SharedFrameworkVersion)</SharedFrameworkNameVersionPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<BinObj Remove="*" />
|
||||
<BinObj Include="$(SrcDirectory)/**/bin/**/*" />
|
||||
<BinObj Include="$(SrcDirectory)/**/obj/**/*" />
|
||||
|
||||
<SharedFramework Remove="*" />
|
||||
<SharedFramework Include="$(SharedFrameworkPublishDirectory)/**/*" />
|
||||
|
||||
<AssetsToRemoveFromDeps Remove="*" />
|
||||
<AssetsToRemoveFromDeps Include="csc" />
|
||||
<AssetsToRemoveFromDeps Include="vbc" />
|
||||
<AssetsToRemoveFromDeps Include="MSBuild" />
|
||||
</ItemGroup>
|
||||
|
||||
<Delete Files="@(BinObj)" />
|
||||
|
||||
<RemoveDir Directories="$(StageDirectory)" />
|
||||
<MakeDir Directories="$(StageDirectory)"/>
|
||||
|
||||
<!-- CopySharedFramework -->
|
||||
<Copy SourceFiles="@(SharedFramework)"
|
||||
DestinationFiles="@(SharedFramework->'$(StageDirectory)/%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
|
||||
<!-- Publish DotNet -->
|
||||
<DotNetPublish ToolPath="%(Stage.DotnetDir)"
|
||||
NativeSubdirectory="True"
|
||||
Output="$(SdkOutputDirectory)"
|
||||
Configuration="$(Configuration)"
|
||||
VersionSuffix="$(CommitCount)"
|
||||
ProjectPath="$(SrcDirectory)/redist" />
|
||||
|
||||
<!-- Corehostify Binaries -->
|
||||
<ItemGroup Condition=" '$(OSName)' != 'win' ">
|
||||
<SdkOutputChmodTargets Remove="*" />
|
||||
<SdkOutputChmodTargets Include="$(SdkOutputDirectory)/**/*.exe;
|
||||
$(SdkOutputDirectory)/**/*.dll" >
|
||||
<!-- Managed assemblies do not need execute -->
|
||||
<Mode>u=rw,g=r,o=r</Mode>
|
||||
</SdkOutputChmodTargets>
|
||||
|
||||
<SdkOutputChmodTargets Include="$(SdkOutputDirectory)/**/*.dylib;
|
||||
$(SdkOutputDirectory)/**/*.so" >
|
||||
<!-- Generally, dylibs and sos have 'x' -->
|
||||
<Mode>u=rwx,g=rx,o=rx</Mode>
|
||||
</SdkOutputChmodTargets>
|
||||
|
||||
<SdkOutputChmodTargets Include="$(SdkOutputDirectory)/**/*"
|
||||
Exclude="$(SdkOutputDirectory)/**/*.*" >
|
||||
<!-- Executables need x -->
|
||||
<Mode>u=rwx,g=rx,o=rx</Mode>
|
||||
</SdkOutputChmodTargets>
|
||||
</ItemGroup>
|
||||
|
||||
<Chmod Condition=" '$(OSName)' != 'win' "
|
||||
File="%(SdkOutputChModTargets.FullPath)"
|
||||
Mode="%(SdkOutputChModTargets.Mode)" />
|
||||
|
||||
<RemoveAssetFromDepsPackages DepsFile="$(SdkOutputDirectory)/redist.deps.json"
|
||||
SectionName="runtimeTargets"
|
||||
AssetPath="$(BinaryToCorehostifyRelDir)/%(AssetsToRemoveFromDeps.Identity).exe" />
|
||||
|
||||
<Copy SourceFiles="$(SdkOutputDirectory)/%(FilesToMove.Identity)"
|
||||
DestinationFiles="$(SdkOutputDirectory)/%(FilesToMove.Filename).dll" />
|
||||
|
||||
<!-- MSBuild needs csc.exe to be in the SdkOutputDirectory, or else it can't invoke it -->
|
||||
<Move SourceFiles="$(BinaryToCorehostifyOutDir)/csc.exe"
|
||||
DestinationFiles="$(SdkOutputDirectory)/csc.exe" />
|
||||
|
||||
<Copy SourceFiles="$(SdkOutputDirectory)/redist.deps.json"
|
||||
DestinationFiles="$(SdkOutputDirectory)/%(BundledTools.Identity).deps.json" />
|
||||
|
||||
<Copy SourceFiles="$(SdkOutputDirectory)/redist.runtimeconfig.json"
|
||||
DestinationFiles="$(SdkOutputDirectory)/%(BundledTools.Identity).runtimeconfig.json" />
|
||||
|
||||
<ChangeEntryPointLibraryName
|
||||
DepsFile="$(SdkOutputDirectory)/%(BundledTools.Identity).deps.json"
|
||||
NewName="%(BundledTools.Identity).deps.json" />
|
||||
|
||||
<!-- cleanup project output we don't need -->
|
||||
<Delete Files="$(SdkOutputDirectory)/redist%(PublishOutputExtensions.Identity)" />
|
||||
<Delete Files="$(SdkOutputDirectory)/tool_msbuild%(PublishOutputExtensions.Identity)" />
|
||||
|
||||
<!-- Copy Host to SDK Directory -->
|
||||
<Copy SourceFiles="$(SharedFrameworkNameVersionPath)/$(DotnetHostBaseName)"
|
||||
DestinationFiles="$(SdkOutputDirectory)/corehost$(ExeExtension)" />
|
||||
|
||||
<Copy SourceFiles="$(SharedFrameworkNameVersionPath)/$(DotnetHostFxrBaseName)"
|
||||
DestinationFiles="$(SdkOutputDirectory)/$(DotnetHostFxrBaseName)" />
|
||||
|
||||
<Copy SourceFiles="$(SharedFrameworkNameVersionPath)/$(HostPolicyBaseName)"
|
||||
DestinationFiles="$(SdkOutputDirectory)/$(HostPolicyBaseName)" />
|
||||
|
||||
<!-- copy core sdk -->
|
||||
<Copy SourceFiles="@(CoreSDKContent)"
|
||||
DestinationFolder="$(SdkOutputDirectory)/%(RecursiveDir)" />
|
||||
|
||||
<!-- Crossgen the Shared Framework -->
|
||||
<ItemGroup>
|
||||
<SdkFiles Remove="*" />
|
||||
<SdkFiles Include="$(SdkOutputDirectory)/**/*" />
|
||||
<SdkFilesWithPEMarker Remove="*" />
|
||||
</ItemGroup>
|
||||
|
||||
<AddMetadataIsPE Items="@(SdkFiles)">
|
||||
<Output TaskParameter="ResultItems" ItemName="SdkFilesWithPEMarker" />
|
||||
</AddMetadataIsPE>
|
||||
|
||||
<ItemGroup>
|
||||
<CrossgenTargets Remove="*" />
|
||||
<CrossgenTargets Include="%(SdkFilesWithPEMarker.FullPath)" Condition=" '%(SdkFilesWithPEMarker.IsPE)' == 'True' " />
|
||||
|
||||
<CompileStageSdkDirectories Remove="*" />
|
||||
</ItemGroup>
|
||||
|
||||
<RemoveDuplicates Inputs="@(SdkFiles->'%(RootDir)%(Directory)')">
|
||||
<Output TaskParameter="Filtered" ItemName="CompileStageSdkDirectories" />
|
||||
</RemoveDuplicates>
|
||||
|
||||
<Crossgen Condition=" '$(DISABLE_CROSSGEN)' != '1' "
|
||||
SourceAssembly="%(CrossgenTargets.FullPath)"
|
||||
DestinationPath="%(CrossgenTargets.FullPath)"
|
||||
JITPath="$(LibCLRJitPath)"
|
||||
CrossgenPath="$(CrossgenPath)"
|
||||
ReadyToRun="True"
|
||||
PlatformAssemblyPaths="@(PlatformAssemblies);
|
||||
$(SharedFrameworkNameVersionPath);
|
||||
@(CompileStageSdkDirectories)" />
|
||||
|
||||
<!-- Generate .version file -->
|
||||
<WriteLinesToFile File="$(SdkOutputDirectory)/.version"
|
||||
Lines="$(CommitHash);$(SdkVersion)"
|
||||
Overwrite="true" />
|
||||
|
||||
<ItemGroup>
|
||||
<MSBuildTargetsToCopy Include="$(MSBuildTargetsDirectory)/**/*.targets" />
|
||||
<MSBuildTargetsToCopy Include="$(MSBuildTargetsDirectory)/**/*.Targets" />
|
||||
<MSBuildTargetsToCopy Include="$(MSBuildTargetsDirectory)/**/*.props" />
|
||||
<MSBuildTargetsToCopy Include="$(MSBuildTargetsDirectory)/**/*.overridetasks" />
|
||||
<MSBuildTargetsToCopy Include="$(MSBuildTargetsDirectory)/**/*.tasks" />
|
||||
</ItemGroup>
|
||||
|
||||
<Copy SourceFiles="@(MSBuildTargetsToCopy)"
|
||||
DestinationFiles="@(MSBuildTargetsToCopy->'$(SdkOutputDirectory)/%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
|
||||
<!-- Temporary workaround for MSBuild placing their .props files in the old 14.1 directory -->
|
||||
<Move SourceFiles="$(SdkOutputDirectory)/14.1/Microsoft.Common.props"
|
||||
DestinationFolder="$(SdkOutputDirectory)/15.0" />
|
||||
<RemoveDir Directories="$(SdkOutputDirectory)/14.1" />
|
||||
|
||||
<ItemGroup>
|
||||
<FilesToClean Include="$(StageDirectory)/sdk/**/vbc.exe" />
|
||||
</ItemGroup>
|
||||
|
||||
<Delete Files="@(FilesToClean)" />
|
||||
|
||||
<ItemGroup>
|
||||
<FilesToCopy Include="$(StageDirectory)/**/*" />
|
||||
<PdbsToClean Include="$(StageDirectory)/sdk/**/*.pdb" />
|
||||
</ItemGroup>
|
||||
|
||||
<Copy SourceFiles="@(FilesToCopy)"
|
||||
DestinationFiles="@(FilesToCopy->'$(StageSymbolsDirectory)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
|
||||
<Delete Files="@(PdbsToClean)" />
|
||||
|
||||
<!-- workaround for https://github.com/Microsoft/msbuild/issues/872 -->
|
||||
<Copy SourceFiles="$(MSBuildTargetsDirectory)/MSBuild.exe"
|
||||
DestinationFiles="$(SdkOutputDirectory)/MSBuild.exe" />
|
||||
|
||||
<Copy SourceFiles="$(RepoRoot)/resources/MSBuild.exe.config"
|
||||
DestinationFiles="$(SdkOutputDirectory)/MSBuild.exe.config" />
|
||||
|
||||
<Copy SourceFiles="$(RepoRoot)/resources/MSBuild.exe.config"
|
||||
DestinationFiles="$(MSBuildTargetsDirectory)/MSBuild.exe.config" />
|
||||
</Target>
|
||||
</Project>
|
11
build/Microsoft.DotNet.Cli.Monikers.props
Normal file
11
build/Microsoft.DotNet.Cli.Monikers.props
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<SdkBrandName>Microsoft .NET Core 1.0.0 - SDK Preview 2</SdkBrandName>
|
||||
<SharedFrameworkBrandName>Microsoft .NET Core 1.0.0 - Runtime</SharedFrameworkBrandName>
|
||||
<SharedHostBrandName>Microsoft .NET Core 1.0.0 - Host</SharedHostBrandName>
|
||||
<HostFxrBrandName>Microsoft .NET Core 1.0.0 - Host FX Resolver</HostFxrBrandName>
|
||||
|
||||
<SharedFrameworkNugetName>Microsoft.NETCore.App</SharedFrameworkNugetName>
|
||||
</PropertyGroup>
|
||||
</Project>
|
20
build/Microsoft.DotNet.Cli.Package.targets
Normal file
20
build/Microsoft.DotNet.Cli.Package.targets
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Layout" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildThisFileDirectory)/package/Microsoft.DotNet.Cli.Layout.targets" />
|
||||
<Import Project="$(MSBuildThisFileDirectory)/package/Microsoft.DotNet.Cli.Archive.targets" />
|
||||
<Import Project="$(MSBuildThisFileDirectory)/package/Microsoft.DotNet.Cli.Nupkg.targets" />
|
||||
<Import Project="$(MSBuildThisFileDirectory)/package/Microsoft.DotNet.Cli.Installer.DEB.targets" />
|
||||
<Import Project="$(MSBuildThisFileDirectory)/package/Microsoft.DotNet.Cli.Installer.MSI.targets" />
|
||||
<Import Project="$(MSBuildThisFileDirectory)/package/Microsoft.DotNet.Cli.Installer.PKG.targets" />
|
||||
|
||||
<Target Name="GenerateInstallers"
|
||||
DependsOnTargets="Init;Layout;GeneratePkgs;GenerateDebs;GenerateMsis" />
|
||||
|
||||
<Target Name="Package"
|
||||
DependsOnTargets="BuildDotnetCliBuildFramework;
|
||||
Init;
|
||||
Layout;
|
||||
GenerateNugetPackages;
|
||||
GenerateArchives;
|
||||
GenerateInstallers" />
|
||||
</Project>
|
233
build/Microsoft.DotNet.Cli.Prepare.targets
Normal file
233
build/Microsoft.DotNet.Cli.Prepare.targets
Normal file
|
@ -0,0 +1,233 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="Microsoft.DotNet.Cli.tasks" />
|
||||
<Import Project="prepare/CheckPrereqs.targets" />
|
||||
|
||||
<Target Name="Prepare"
|
||||
DependsOnTargets="Init;DownloadHostAndSharedFxArtifacts;RestorePackages;ZipTemplates" />
|
||||
|
||||
<Target Name="Init"
|
||||
DependsOnTargets="InitializeCommonProps;
|
||||
BuildDotnetCliBuildFramework;
|
||||
CheckPrereqs;">
|
||||
</Target>
|
||||
|
||||
<Target Name="InitializeCommonProps"
|
||||
DependsOnTargets="BuildDotnetCliBuildFramework" >
|
||||
|
||||
<!-- Current Runtime Information -->
|
||||
<GetCurrentRuntimeInformation>
|
||||
<Output TaskParameter="Rid" PropertyName="Rid" />
|
||||
<Output TaskParameter="Architecture" PropertyName="Architecture" />
|
||||
<Output TaskParameter="OSName" PropertyName="OSName" />
|
||||
</GetCurrentRuntimeInformation>
|
||||
|
||||
<!-- NuGet Information -->
|
||||
<PropertyGroup>
|
||||
<NuGetPackagesDir>$(NUGET_PACKAGES)</NuGetPackagesDir>
|
||||
<NuGetPackagesDir Condition=" '$(NuGetPackagesDir)' == '' ">$(RepoRoot)/.nuget/packages</NuGetPackagesDir>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Common Properties -->
|
||||
<PropertyGroup>
|
||||
<IsDesktopAvailable>False</IsDesktopAvailable>
|
||||
<IsDesktopAvailable Condition=" '$(OSName)' == 'win' ">True</IsDesktopAvailable>
|
||||
<DotNetPath>$(Stage0Directory)</DotNetPath>
|
||||
|
||||
<BaseOutputDirectory>$(RepoRoot)/artifacts/$(Rid)</BaseOutputDirectory>
|
||||
<ToolsOutputDirectory>$(BaseOutputDirectory)/tools</ToolsOutputDirectory>
|
||||
<Stage1Directory>$(BaseOutputDirectory)/stage1</Stage1Directory>
|
||||
<Stage1SymbolsDirectory>$(BaseOutputDirectory)/stage1symbols</Stage1SymbolsDirectory>
|
||||
<DotnetStage1>$(Stage1Directory)/dotnet$(ExeExtension)</DotnetStage1>
|
||||
<Stage2Directory>$(BaseOutputDirectory)/stage2</Stage2Directory>
|
||||
<Stage2SymbolsDirectory>$(BaseOutputDirectory)/stage2symbols</Stage2SymbolsDirectory>
|
||||
<DotnetStage2>$(Stage2Directory)/dotnet$(ExeExtension)</DotnetStage2>
|
||||
<OutputDirectory>$(Stage2Directory)/</OutputDirectory>
|
||||
<Stage2CompilationDirectory>$(BaseOutputDirectory)/stage2compilation</Stage2CompilationDirectory>
|
||||
<IntermediateDirectory>$(BaseOutputDirectory)/intermediate</IntermediateDirectory>
|
||||
<PackagesDirectory>$(BaseOutputDirectory)/packages</PackagesDirectory>
|
||||
<SharedFrameworkPublishDirectory>$(IntermediateDirectory)/sharedFrameworkPublish</SharedFrameworkPublishDirectory>
|
||||
</PropertyGroup>
|
||||
|
||||
<GetCommitHash RepoRoot="$(RepoRoot)">
|
||||
<Output TaskParameter="CommitHash" PropertyName="CommitHash" />
|
||||
</GetCommitHash>
|
||||
|
||||
<GenerateBuildVersionInfo RepoRoot="$(RepoRoot)">
|
||||
<Output TaskParameter="VersionMajor" PropertyName="VersionMajor" />
|
||||
<Output TaskParameter="VersionMinor" PropertyName="VersionMinor" />
|
||||
<Output TaskParameter="VersionPatch" PropertyName="VersionPatch" />
|
||||
<Output TaskParameter="CommitCount" PropertyName="CommitCount" />
|
||||
<Output TaskParameter="ReleaseSuffix" PropertyName="ReleaseSuffix" />
|
||||
<Output TaskParameter="VersionSuffix" PropertyName="VersionSuffix" />
|
||||
<Output TaskParameter="SimpleVersion" PropertyName="SimpleVersion" />
|
||||
<Output TaskParameter="NugetVersion" PropertyName="NugetVersion" />
|
||||
<Output TaskParameter="MsiVersion" PropertyName="MsiVersion" />
|
||||
<Output TaskParameter="VersionBadgeMoniker" PropertyName="VersionBadgeMoniker" />
|
||||
<Output TaskParameter="Channel" PropertyName="Channel" />
|
||||
<Output TaskParameter="BranchName" PropertyName="BranchName" />
|
||||
</GenerateBuildVersionInfo>
|
||||
|
||||
<PropertyGroup>
|
||||
<VersionBadge>$(BaseOutputDirectory)/$(VersionBadgeMoniker)_$(Configuration)_version_badge.svg</VersionBadge>
|
||||
<SdkVersion>$(NugetVersion)</SdkVersion>
|
||||
|
||||
<SdkNugetVersion>$(VersionMajor).$(VersionMinor).$(VersionPatch)-preview3-$(CommitCount)</SdkNugetVersion>
|
||||
<ProjectModelNugetVersion>$(VersionMajor).$(VersionMinor).$(VersionPatch)-rc4-$(CommitCount)</ProjectModelNugetVersion>
|
||||
<DependencyModelAndInternalAbstractionsNugetVersion>$(VersionMajor).$(VersionMinor).1-beta-$(CommitCount)</DependencyModelAndInternalAbstractionsNugetVersion>
|
||||
|
||||
<ArchiveExtension Condition=" '$(OSName)' == 'win' ">.zip</ArchiveExtension>
|
||||
<ArchiveExtension Condition=" '$(OSName)' != 'win' ">.tar.gz</ArchiveExtension>
|
||||
|
||||
<InstallerExtension Condition=" '$(OSName)' == 'win' ">.msi</InstallerExtension>
|
||||
<InstallerExtension Condition=" '$(OSName)' == 'osx' ">.pkg</InstallerExtension>
|
||||
<InstallerExtension Condition=" '$(OSName)' == 'ubuntu' ">.deb</InstallerExtension>
|
||||
|
||||
<BundleExtension Condition=" '$(OSName)' == 'win' ">.exe</BundleExtension>
|
||||
<BundleExtension Condition=" '$(OSName)' == 'osx' ">$(InstallerExtension)</BundleExtension>
|
||||
<BundleExtension Condition=" '$(OSName)' == 'ubuntu' ">$(InstallerExtension)</BundleExtension>
|
||||
|
||||
<ProductMonikerRid Condition=" '$(Rid)' == 'ubuntu.16.04-x64' Or '$(Rid)' == 'fedora.23-x64' Or '$(Rid)' == 'opensuse.13.2-x64' ">$(Rid)</ProductMonikerRid>
|
||||
<ProductMonikerRid Condition=" '$(ProductMonikerRid)' == '' ">$(OSName)-$(Architecture)</ProductMonikerRid>
|
||||
|
||||
<DynamicLibPrefix>lib</DynamicLibPrefix>
|
||||
<DynamicLibPrefix Condition=" '$(OSName)' == 'win' "></DynamicLibPrefix>
|
||||
<DynamicLibExtension>.so</DynamicLibExtension>
|
||||
<DynamicLibExtension Condition=" '$(OSName)' == 'win' ">.dll</DynamicLibExtension>
|
||||
<DynamicLibExtension Condition=" '$(OSName)' == 'osx' ">.dylib</DynamicLibExtension>
|
||||
|
||||
<ArtifactNameSdk>dotnet-sdk</ArtifactNameSdk>
|
||||
<ArtifactNameSdkDebug>dotnet-sdk-debug</ArtifactNameSdkDebug>
|
||||
<ArtifactNameCombinedHostHostFxrFrameworkSdk>dotnet-dev</ArtifactNameCombinedHostHostFxrFrameworkSdk>
|
||||
<ArtifactNameCombinedFrameworkSdk>dotnet-sharedframework-sdk</ArtifactNameCombinedFrameworkSdk>
|
||||
|
||||
<ArtifactNameWithVersionSdk>$(ArtifactNameSdk)-$(ProductMonikerRid).$(SdkVersion)</ArtifactNameWithVersionSdk>
|
||||
<ArtifactNameWithVersionSdkDebug>$(ArtifactNameSdkDebug)-$(ProductMonikerRid).$(SdkVersion)</ArtifactNameWithVersionSdkDebug>
|
||||
<ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(ProductMonikerRid).$(SdkVersion)</ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>
|
||||
<ArtifactNameWithVersionCombinedFrameworkSdk>$(ArtifactNameCombinedFrameworkSdk)-$(ProductMonikerRid).$(SdkVersion)</ArtifactNameWithVersionCombinedFrameworkSdk>
|
||||
|
||||
<!-- Downloaded Installers + Archives -->
|
||||
<DownloadedSharedHostInstallerFileName Condition=" '$(InstallerExtension)' != '' ">dotnet-host-$(ProductMonikerRid).$(SharedHostVersion)$(InstallerExtension)</DownloadedSharedHostInstallerFileName>
|
||||
<DownloadedSharedHostInstallerFile Condition=" '$(InstallerExtension)' != '' ">$(PackagesDirectory)/$(DownloadedSharedHostInstallerFileName)</DownloadedSharedHostInstallerFile>
|
||||
|
||||
<DownloadedHostFxrInstallerFileName Condition=" '$(InstallerExtension)' != '' ">dotnet-hostfxr-$(ProductMonikerRid).$(HostFxrVersion)$(InstallerExtension)</DownloadedHostFxrInstallerFileName>
|
||||
<DownloadedHostFxrInstallerFile Condition=" '$(InstallerExtension)' != '' ">$(PackagesDirectory)/$(DownloadedHostFxrInstallerFileName)</DownloadedHostFxrInstallerFile>
|
||||
|
||||
<DownloadedSharedFrameworkInstallerFileName Condition=" '$(InstallerExtension)' != '' ">dotnet-sharedframework-$(ProductMonikerRid).$(SharedFrameworkVersion)$(InstallerExtension)</DownloadedSharedFrameworkInstallerFileName>
|
||||
<DownloadedSharedFrameworkInstallerFile Condition=" '$(InstallerExtension)' != '' ">$(PackagesDirectory)/$(DownloadedSharedFrameworkInstallerFileName)</DownloadedSharedFrameworkInstallerFile>
|
||||
|
||||
<CombinedFrameworkHostCompressedFileName>dotnet-$(ProductMonikerRid).$(SharedFrameworkVersion)$(ArchiveExtension)</CombinedFrameworkHostCompressedFileName>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- SetTelemetryProfile -->
|
||||
<SetEnvVar Name="DOTNET_CLI_TELEMETRY_PROFILE" Value="$(DOTNET_CLI_TELEMETRY_PROFILE);https://github.com/dotnet/cli;$(CommitHash)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="SetupDownloadHostAndSharedFxInputsOutputs" DependsOnTargets="Init">
|
||||
<PropertyGroup>
|
||||
<CoreSetupBlobRootUrl>https://dotnetcli.azureedge.net/dotnet/$(CoreSetupChannel)</CoreSetupBlobRootUrl>
|
||||
<SharedFrameworkArchiveBlobRootUrl>$(CoreSetupBlobRootUrl)/Binaries/$(SharedFrameworkVersion)</SharedFrameworkArchiveBlobRootUrl>
|
||||
<CoreSetupInstallerBlobRootUrl>$(CoreSetupBlobRootUrl)/Installers</CoreSetupInstallerBlobRootUrl>
|
||||
|
||||
<CoreSetupDownloadDirectory>$(IntermediateDirectory)/coreSetupDownload/$(SharedFrameworkVersion)</CoreSetupDownloadDirectory>
|
||||
<CombinedSharedHostAndFrameworkArchive>$(CoreSetupDownloadDirectory)/combinedSharedHostAndFrameworkArchive</CombinedSharedHostAndFrameworkArchive>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<_DownloadAndExtractItem Include="CombinedSharedHostAndFrameworkArchive"
|
||||
Condition="!Exists('$(CombinedSharedHostAndFrameworkArchive)')">
|
||||
<Url>$(SharedFrameworkArchiveBlobRootUrl)/$(CombinedFrameworkHostCompressedFileName)</Url>
|
||||
<DownloadFileName>$(CombinedSharedHostAndFrameworkArchive)</DownloadFileName>
|
||||
<ExtractDestination>$(SharedFrameworkPublishDirectory)</ExtractDestination>
|
||||
</_DownloadAndExtractItem>
|
||||
|
||||
<_DownloadAndExtractItem Include="DownloadedSharedFrameworkInstallerFile"
|
||||
Condition="!Exists('$(DownloadedSharedFrameworkInstallerFile)') And '$(InstallerExtension)' != ''">
|
||||
<Url>$(CoreSetupInstallerBlobRootUrl)/$(SharedFrameworkVersion)/$(DownloadedSharedFrameworkInstallerFileName)</Url>
|
||||
<DownloadFileName>$(DownloadedSharedFrameworkInstallerFile)</DownloadFileName>
|
||||
<ExtractDestination></ExtractDestination>
|
||||
</_DownloadAndExtractItem>
|
||||
|
||||
<_DownloadAndExtractItem Include="DownloadedSharedHostInstallerFile"
|
||||
Condition="!Exists('$(DownloadedSharedHostInstallerFile)') And '$(InstallerExtension)' != ''">
|
||||
<Url>$(CoreSetupInstallerBlobRootUrl)/$(SharedHostVersion)/$(DownloadedSharedHostInstallerFileName)</Url>
|
||||
<DownloadFileName>$(DownloadedSharedHostInstallerFile)</DownloadFileName>
|
||||
<ExtractDestintation></ExtractDestintation>
|
||||
</_DownloadAndExtractItem>
|
||||
|
||||
<_DownloadAndExtractItem Include="DownloadedHostFxrInstallerFile"
|
||||
Condition="!Exists('$(DownloadedHostFxrInstallerFile)') And '$(InstallerExtension)' != ''">
|
||||
<Url>$(CoreSetupInstallerBlobRootUrl)/$(HostFxrVersion)/$(DownloadedHostFxrInstallerFileName)</Url>
|
||||
<DownloadFileName>$(DownloadedHostFxrInstallerFile)</DownloadFileName>
|
||||
<ExtractDestintation></ExtractDestintation>
|
||||
</_DownloadAndExtractItem>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="DownloadHostAndSharedFxArtifacts"
|
||||
DependsOnTargets="SetupDownloadHostAndSharedFxInputsOutputs">
|
||||
|
||||
<DownloadFile Condition=" '@(_DownloadAndExtractItem)' != '' "
|
||||
Uri="%(_DownloadAndExtractItem.Url)"
|
||||
DestinationPath="%(_DownloadAndExtractItem.DownloadFileName)" />
|
||||
|
||||
<ZipFileExtractToDirectory Condition=" '%(_DownloadAndExtractItem.ExtractDestination)' != '' AND '$(OSName)' == 'win' "
|
||||
SourceArchive="%(_DownloadAndExtractItem.DownloadFileName)"
|
||||
DestinationDirectory="%(_DownloadAndExtractItem.ExtractDestination)"
|
||||
OverwriteDestination="True" />
|
||||
|
||||
<TarGzFileExtractToDirectory Condition=" '%(_DownloadAndExtractItem.ExtractDestination)' != '' AND '$(OSName)' != 'win' "
|
||||
SourceArchive="%(_DownloadAndExtractItem.DownloadFileName)"
|
||||
DestinationDirectory="%(_DownloadAndExtractItem.ExtractDestination)"
|
||||
OverwriteDestination="True" />
|
||||
</Target>
|
||||
|
||||
<Target Name="RestorePackages"
|
||||
DependsOnTargets="SetupRestorePackagesInputsOutputs;Init"
|
||||
Inputs="@(RestorePackagesInput)"
|
||||
Outputs="@(RestorePackagesInput->'%(RelativeDir)/project.lock.json')">
|
||||
|
||||
<CallTarget Targets="CleanSrcToolsLockFiles" />
|
||||
<DotNetRestore WorkingDirectory="$(RepoRoot)/src" ToolPath="$(DotNetPath)" />
|
||||
<DotNetRestore WorkingDirectory="$(RepoRoot)/tools" ToolPath="$(DotNetPath)" />
|
||||
|
||||
</Target>
|
||||
|
||||
<Target Name="CleanSrcToolsLockFiles" >
|
||||
<ItemGroup>
|
||||
<SrcToolsLockFiles Include="$(RepoRoot)/src/**/project.lock.json;$(RepoRoot)/tools/**/project.lock.json" />
|
||||
</ItemGroup>
|
||||
<Delete Files="@(SrcToolsLockFiles)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="SetupRestorePackagesInputsOutputs">
|
||||
<ItemGroup>
|
||||
<RestorePackagesInput Include="$(RepoRoot)/src/**/project.json" />
|
||||
<RestorePackagesInput Include="$(RepoRoot)/tools/**/project.json" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="SetupZipTemplatesInputsOutputs">
|
||||
<PropertyGroup>
|
||||
<_DotNetNewFolder>$(RepoRoot)/src/dotnet/commands/dotnet-new</_DotNetNewFolder>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<DotNetNewArchive Include="$([System.IO.Directory]::GetDirectories($(_DotNetNewFolder)))" />
|
||||
|
||||
<ZipTemplatesInput Include="$(_DotNetNewFolder)/**" Exclude="$(_DotNetNewFolder)/*.zip" />
|
||||
<ZipTemplatesOutput Include="@(DotNetNewArchive->'%(RelativeDir)/$([System.IO.Path]::GetFileName('%(DotNetNewArchive.FullPath)')).zip')" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="ZipTemplates"
|
||||
DependsOnTargets="SetupZipTemplatesInputsOutputs"
|
||||
Inputs="@(ZipTemplatesInput)"
|
||||
Outputs="@(ZipTemplatesOutput)">
|
||||
|
||||
<ZipFileCreateFromDirectory
|
||||
SourceDirectory="%(DotNetNewArchive.FullPath)"
|
||||
DestinationArchive="%(DotNetNewArchive.RelativeDir)/$([System.IO.Path]::GetFileName(%(DotNetNewArchive.FullPath))).zip"
|
||||
OverwriteDestination="True" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
107
build/Microsoft.DotNet.Cli.Publish.targets
Normal file
107
build/Microsoft.DotNet.Cli.Publish.targets
Normal file
|
@ -0,0 +1,107 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildThisFileDirectory)/publish/PublishContent.targets" />
|
||||
<Import Project="$(MSBuildThisFileDirectory)/publish/Microsoft.DotNet.Cli.Badge.targets" />
|
||||
|
||||
<!-- PUBLISH_TO_AZURE_BLOB env variable set by CI -->
|
||||
<Target Name="Publish"
|
||||
Condition=" '$(PUBLISH_TO_AZURE_BLOB)' != '' "
|
||||
DependsOnTargets="Init;
|
||||
Package;
|
||||
PublishArtifacts;
|
||||
FinishBuild" />
|
||||
|
||||
<!-- UploadToAzure target comes from Build Tools -->
|
||||
<Target Name="PublishArtifacts"
|
||||
DependsOnTargets="SetupAzureBlobInformation;
|
||||
GenerateVersionBadge;
|
||||
GatherItemsForPattern;
|
||||
UploadToAzure;
|
||||
PublishDebFilesToDebianRepo;
|
||||
PublishCliVersionBadge" />
|
||||
|
||||
<Target Name="FinishBuild">
|
||||
<FinalizeBuild AccountName="$(CloudDropAccountName)"
|
||||
AccountKey="$(CloudDropAccessToken)"
|
||||
NugetVersion="$(NugetVersion)"
|
||||
Channel="$(Channel)"
|
||||
CommitHash="$(CommitHash)"
|
||||
BranchName="$(BranchName)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="SetupAzureBlobInformation">
|
||||
<PropertyGroup>
|
||||
<Product>Sdk</Product>
|
||||
<ContainerName>$(STORAGE_CONTAINER)</ContainerName>
|
||||
<CloudDropAccessToken>$(STORAGE_KEY)</CloudDropAccessToken>
|
||||
<CloudDropAccountName>$(STORAGE_ACCOUNT)</CloudDropAccountName>
|
||||
<DotnetBlobRootUrl>https://$(CloudDropAccountName).blob.core.windows.net/$(ContainerName)</DotnetBlobRootUrl>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="GatherItemsForPattern">
|
||||
<ItemGroup>
|
||||
<ForPublishing Include="@(GeneratedInstallers)" />
|
||||
<ForPublishing Include="%(GenerateArchivesInputsOutputs.Outputs)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ForPublishing>
|
||||
<RelativeBlobPath>$(Product)/$(NugetVersion)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath>
|
||||
</ForPublishing>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="PublishDebFilesToDebianRepo" Condition=" '$(OSName)' == 'ubuntu' ">
|
||||
<Error Condition="'$(REPO_ID)' == ''" Text="REPO_ID must be set as an environment variable for debian publishing." />
|
||||
<Error Condition="'$(REPO_USER)' == ''" Text="REPO_USER must be set as an environment variable for debian publishing." />
|
||||
<Error Condition="'$(REPO_PASS)' == ''" Text="REPO_PASS must be set as an environment variable for debian publishing." />
|
||||
<Error Condition="'$(REPO_SERVER)' == ''" Text="REPO_SERVER must be set as an environment variable for debian publishing." />
|
||||
|
||||
<ItemGroup>
|
||||
<SdkInstallerFileItemGroup Include="$(SdkInstallerFile)" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<SdkDebianUploadUrl>$(DotnetBlobRootUrl)/$(Product)/$(NugetVersion)/%(SdkInstallerFileItemGroup.Filename)%(SdkInstallerFileItemGroup.Extension)</SdkDebianUploadUrl>
|
||||
<DebianUploadJsonFile>$(SdkDebianIntermediateDirectory)/package_upload.json</DebianUploadJsonFile>
|
||||
<DebianRevisionNumber>1</DebianRevisionNumber>
|
||||
|
||||
<DebianUploadJsonContent>
|
||||
{
|
||||
"name":"$(SdkDebianPackageName)",
|
||||
"version":"$(NugetVersion)-$(DebianRevisionNumber)",
|
||||
"repositoryId":"$(REPO_ID)",
|
||||
"sourceUrl": "$(SdkDebianUploadUrl)"
|
||||
}
|
||||
</DebianUploadJsonContent>
|
||||
</PropertyGroup>
|
||||
|
||||
<Delete Files="$(DebianUploadJsonFile)" />
|
||||
<WriteLinesToFile File="$(DebianUploadJsonFile)" Lines="$(DebianUploadJsonContent)" />
|
||||
|
||||
<Exec Command="$(RepoRoot)/scripts/publish/repoapi_client.sh -addpkg $(DebianUploadJsonFile)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="PublishCliVersionBadge">
|
||||
<ItemGroup>
|
||||
<CliVersionBadgeToUpload Include="$(VersionBadge)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<CliVersionBadgeToUpload>
|
||||
<RelativeBlobPath>$(Product)/$(NugetVersion)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath>
|
||||
</CliVersionBadgeToUpload>
|
||||
</ItemGroup>
|
||||
|
||||
<UploadToAzure
|
||||
AccountKey="$(CloudDropAccessToken)"
|
||||
AccountName="$(CloudDropAccountName)"
|
||||
ContainerName="$(ContainerName)"
|
||||
Items="@(CliVersionBadgeToUpload)" />
|
||||
|
||||
<SetBlobPropertiesBasedOnFileType
|
||||
AccountKey="$(CloudDropAccessToken)"
|
||||
AccountName="$(CloudDropAccountName)"
|
||||
Items="@(CliVersionBadgeToUpload)" />
|
||||
</Target>
|
||||
</Project>
|
12
build/Microsoft.DotNet.Cli.Run.targets
Normal file
12
build/Microsoft.DotNet.Cli.Run.targets
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<Target Name="CleanArtifacts" >
|
||||
<RemoveDir Directories="$(BaseOutputDirectory)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="CleanRepo">
|
||||
<Exec Command="git clean -fdx" WorkingDirectory="$(RepoRoot)" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
230
build/Microsoft.DotNet.Cli.Test.targets
Normal file
230
build/Microsoft.DotNet.Cli.Test.targets
Normal file
|
@ -0,0 +1,230 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Test" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<PropertyGroup>
|
||||
<PathSeparator>/</PathSeparator>
|
||||
<PathSeparator Condition=" '$(OSName)' == 'win' ">\</PathSeparator>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="test/TestPackageProjects.targets" />
|
||||
<Import Project="test/TestAssetProjects.targets" />
|
||||
<Import Project="test/TestProjects.targets" />
|
||||
|
||||
<Target Name="Test"
|
||||
DependsOnTargets="PrepareTests;
|
||||
BuildTestAssets;
|
||||
BuildTests;">
|
||||
<PropertyGroup>
|
||||
<PathListSeparator>:</PathListSeparator>
|
||||
<PathListSeparator Condition=" '$(OSName)' == 'win' ">%3b</PathListSeparator>
|
||||
<ExecPath>$(Stage2Directory)$(PathListSeparator)$(PATH)</ExecPath>
|
||||
<ExecPath Condition=" '$(OSName)' == 'win' ">$(Stage2Directory)</ExecPath>
|
||||
<TestArtifactsEnv>$(TestArtifactsDir)</TestArtifactsEnv>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<TestTaskEnvironmentVariables Include="PATH=$(ExecPath)" />
|
||||
<TestTaskEnvironmentVariables Include="TEST_ARTIFACTS=$(TestArtifactsEnv)" />
|
||||
</ItemGroup>
|
||||
|
||||
<DotNetTest WorkingDirectory="%(TestProjects.ProjectDir)"
|
||||
EnvironmentVariables="@(TestTaskEnvironmentVariables)"
|
||||
ToolPath="$(Stage2Directory)"
|
||||
Configuration="$(Configuration)"
|
||||
NoBuild="True"
|
||||
NoTrait="category=failing"
|
||||
Xml="$(TestResultXmlDir)/%(TestProjects.OutputName)-testResults.xml" />
|
||||
</Target>
|
||||
|
||||
<Target Name="PrepareTests"
|
||||
DependsOnTargets="Init">
|
||||
<PropertyGroup>
|
||||
<TestPackageBuildVersionSuffix>$(CommitCount)</TestPackageBuildVersionSuffix>
|
||||
<TestOutputDir>$(BaseOutputDirectory)/tests/</TestOutputDir>
|
||||
<TestPackagesBuildDir>$(TestOutputDir)/packagesBuild/</TestPackagesBuildDir>
|
||||
<TestPackagesDir>$(TestOutputDir)/packages/</TestPackagesDir>
|
||||
<TestArtifactsDir>$(TestOutputDir)/artifacts/</TestArtifactsDir>
|
||||
<TestResultXmlDir>$(TestOutputDir)/results/</TestResultXmlDir>
|
||||
<TestDirectory>$(RepoRoot)/test/</TestDirectory>
|
||||
<DotnetUnderTest>$(Stage2Directory)</DotnetUnderTest>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="BuildTests"
|
||||
DependsOnTargets="RestoreTests;
|
||||
SetupTestProjectData;"
|
||||
Inputs="%(TestProjects.BuildInputs)"
|
||||
Outputs="%(TestProjects.BuildOutput)">
|
||||
<DotNetBuild Configuration="$(Configuration)"
|
||||
Framework="%(TestProjects.Framework)"
|
||||
ToolPath="$(DotnetUnderTest)"
|
||||
WorkingDirectory="%(TestProjects.RelativeDir)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="RestoreTests"
|
||||
DependsOnTargets="CreateTestAssetPackageNuPkgs;
|
||||
CleanTestProjectsBinObj;
|
||||
SetupRestoreTestsInputs;"
|
||||
Inputs="@(RestoreTestsInputs)"
|
||||
Outputs="@(RestoreTestsInputs->'%(RelativeDir)project.lock.json')">
|
||||
<CallTarget Targets="CleanTestProjectsLockFiles"/>
|
||||
|
||||
<DotNetRestore FallbackSource="$(TestPackagesDir)"
|
||||
ToolPath="$(DotnetUnderTest)"
|
||||
WorkingDirectory="$(TestDirectory)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="CleanTestProjectsBinObj"
|
||||
DependsOnTargets="SetupRestoreTestsInputs;"
|
||||
Inputs="@(RestoreTestsInputs)"
|
||||
Outputs="@(RestoreTestsInputs->'%(RelativeDir)project.lock.json')">
|
||||
<ItemGroup>
|
||||
<FilesToDelete Include="$(TestDirectory)**/bin/**/*.*" />
|
||||
<FilesToDelete Include="$(TestDirectory)**/obj/**/*.*" />
|
||||
</ItemGroup>
|
||||
|
||||
<Delete Files="@(FilesToDelete)" />
|
||||
|
||||
<ItemGroup>
|
||||
<FilesToDelete Remove="*" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="SetupRestoreTestsInputs"
|
||||
DependsOnTargets="PrepareTests;" >
|
||||
<ItemGroup>
|
||||
<RestoreTestsInputs Include="$(TestDirectory)/**/project.json"
|
||||
Exclude="$(TestDirectory)/**/bin/**/project.json" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="BuildTestAssets"
|
||||
DependsOnTargets="BuildTestAssetProjects;
|
||||
BuildDesktopTestAssetProjects;">
|
||||
</Target>
|
||||
|
||||
<Target Name="BuildTestAssetProjects"
|
||||
DependsOnTargets="RestoreTestAssetProjects;
|
||||
SetupTestAssetProjectData;"
|
||||
Inputs="%(TestAssetProjects.BuildInputs)"
|
||||
Outputs="%(TestAssetProjects.BuildOutput)">
|
||||
|
||||
<DotNetBuild Framework="netcoreapp1.0"
|
||||
ProjectPath="$(RepoRoot)%(TestAssetProjects.ProjectPath)"
|
||||
ToolPath="$(DotnetUnderTest)"
|
||||
WorkingDirectory="%(TestAssetProjects.RelativeDir)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="RestoreTestAssetProjects"
|
||||
DependsOnTargets="CreateTestAssetPackageNuPkgs;
|
||||
SetupRestoreTestAssetProjectsInputs;"
|
||||
Inputs="@(RestoreTestAssetProjectsInputs)"
|
||||
Outputs="@(RestoreTestAssetProjectsInputs->'%(RelativeDir)/project.lock.json')">
|
||||
|
||||
<DotNetRestore FallbackSource="$(TestPackagesDir)"
|
||||
ToolPath="$(DotnetUnderTest)"
|
||||
WorkingDirectory="$(RepoRoot)TestAssets/TestProjects/" />
|
||||
</Target>
|
||||
|
||||
<Target Name="SetupRestoreTestAssetProjectsInputs" >
|
||||
<ItemGroup>
|
||||
<RestoreTestAssetProjectsInputs Include="$(RepoRoot)/TestAssets/TestProjects/**/project.json" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="CleanTestAssetProjectsLockFiles" >
|
||||
<ItemGroup>
|
||||
<TestAssetProjectsLockFiles Include="$(RepoRoot)/TestAssets/TestProjects/**/project.lock.json" />
|
||||
</ItemGroup>
|
||||
<Delete Files="@(TestAssetProjectsLockFiles)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="CleanTestProjectsLockFiles" >
|
||||
<ItemGroup>
|
||||
<TestProjectsLockFiles Include="$(RepoRoot)/test/**/project.lock.json" />
|
||||
</ItemGroup>
|
||||
<Delete Files="@(TestProjectsLockFiles)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="BuildDesktopTestAssetProjects"
|
||||
Condition=" '$(IsDesktopAvailable)' == 'True' "
|
||||
DependsOnTargets="RestoreDesktopTestAssetProjects">
|
||||
<ItemGroup>
|
||||
<NoAutoBuildDesktopTestAssets Include="$(RepoRoot)TestAssets\DesktopTestProjects\**\.noautobuild" />
|
||||
<NoAutoBuildDesktopTestAssetProjects Include="%(NoAutoBuildDesktopTestAssets.RelativeDir)project.json" />
|
||||
<BuildableDesktopTestAssetProjects Include="$(RepoRoot)TestAssets\DesktopTestProjects\**\project.json"
|
||||
Exclude="@(NoAutoBuildDesktopTestAssetProjects)" />
|
||||
</ItemGroup>
|
||||
|
||||
<Message Text="Skipping projects with .noautobuild files:" />
|
||||
<Message Text="%(NoAutoBuildDesktopTestAssetProjects.FullPath)" />
|
||||
|
||||
<DotNetBuild Configuration="$(Configuration)"
|
||||
Framework="net451"
|
||||
ProjectPath="%(BuildableDesktopTestAssetProjects.FullPath)"
|
||||
ToolPath="$(DotnetUnderTest)"
|
||||
WorkingDirectory="%(BuildableDesktopTestAssetProjects.RelativeDir)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="RestoreDesktopTestAssetProjects"
|
||||
Condition=" '$(IsDesktopAvailable)' == 'True' "
|
||||
DependsOnTargets="CreateTestAssetPackageNuPkgs;
|
||||
SetupRestoreDesktopTestAssetProjectsInputs;"
|
||||
Inputs="@(RestoreDesktopTestAssetProjectsInputs)"
|
||||
Outputs="@(RestoreDesktopTestAssetProjectsInputs->'%(RelativeDir)/project.lock.json')">
|
||||
|
||||
<DotNetRestore FallbackSource="$(TestPackagesDir)"
|
||||
ToolPath="$(DotnetUnderTest)"
|
||||
WorkingDirectory="$(RepoRoot)TestAssets\DesktopTestProjects\" />
|
||||
</Target>
|
||||
|
||||
<Target Name="SetupRestoreDesktopTestAssetProjectsInputs">
|
||||
<ItemGroup>
|
||||
<RestoreDesktopTestAssetProjectsInputs Include="$(RepoRoot)TestAssets\DesktopTestProjects\**\project.json" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="CreateTestAssetPackageNuPkgs"
|
||||
DependsOnTargets="BuildTestAssetPackageProjects;
|
||||
SetupTestPackageProjectData;"
|
||||
Inputs="%(TestPackageProject.PackInputs)"
|
||||
Outputs="%(TestPackageProject.PackOutputs)">
|
||||
|
||||
<DotNetPack BuildBasePath="$(TestPackagesBuildDir)"
|
||||
NoBuild="True"
|
||||
Output="$(TestPackagesDir)"
|
||||
ProjectPath="%(TestPackageProject.FullPath)"
|
||||
ToolPath="$(DotnetUnderTest)"
|
||||
VersionSuffix="%(TestPackageProject.VersionSuffix)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="BuildTestAssetPackageProjects"
|
||||
DependsOnTargets="RestoreTestAssetPackageProjects;
|
||||
SetupTestPackageProjectData;"
|
||||
Inputs="%(TestPackageProject.BuildInputs)"
|
||||
Outputs="%(TestPackageProject.BuildOutputs)">
|
||||
|
||||
<DotNetBuild BuildBasePath="$(TestPackagesBuildDir)"
|
||||
Framework="%(TestPackageProject.Framework)"
|
||||
ProjectPath="%(TestPackageProject.FullPath)"
|
||||
ToolPath="$(DotnetUnderTest)"
|
||||
WorkingDirectory="%(BuildableTestAssetProjects.RelativeDir)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="RestoreTestAssetPackageProjects"
|
||||
DependsOnTargets="PrepareTests;
|
||||
SetupRestoreTestAssetPackageProjectsInputs;"
|
||||
Inputs="@(RestoreTestAssetPackageProjectsInputs)"
|
||||
Outputs="@(RestoreTestAssetPackageProjectsInputs->'%(RelativeDir)/project.lock.json')">
|
||||
|
||||
<DotNetRestore ToolPath="$(DotnetUnderTest)"
|
||||
WorkingDirectory="$(RepoRoot)/TestAssets/TestPackages/" />
|
||||
</Target>
|
||||
|
||||
<Target Name="SetupRestoreTestAssetPackageProjectsInputs"
|
||||
DependsOnTargets="Init;">
|
||||
<ItemGroup>
|
||||
<RestoreTestAssetPackageProjectsInputs Include="$(RepoRoot)/TestAssets/TestPackages/**/project.json" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
</Project>
|
30
build/Microsoft.DotNet.Cli.tasks
Normal file
30
build/Microsoft.DotNet.Cli.tasks
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Test" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<UsingTask TaskName="AddMetadataIsPE" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="ChangeEntryPointLibraryName" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="ChMod" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="Crossgen" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="DotNetBuild" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="DotNetNew" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="DotNetPack" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="DotNetPublish" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="DotNetRestore" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="DotNetTest" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="DownloadFile" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="FinalizeBuild" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="GenerateBuildVersionInfo" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="GenerateGuidFromName" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="GetCommitHash" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="GetCurrentRuntimeInformation" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="MakeRelative" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="RemoveAssetFromDepsPackages" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="ReplaceFileContents" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="SetBlobPropertiesBasedOnFileType" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="SetEnvVar" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="TarGzFileCreateFromDirectory" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="TarGzFileExtractToDirectory" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="CreateAzureContainer" AssemblyFile="$(CLIBuildDll)"/>
|
||||
<UsingTask TaskName="UploadToAzure" AssemblyFile="$(CLIBuildDll)"/>
|
||||
<UsingTask TaskName="ZipFileCreateFromDirectory" AssemblyFile="$(CLIBuildDll)"/>
|
||||
<UsingTask TaskName="ZipFileExtractToDirectory" AssemblyFile="$(CLIBuildDll)"/>
|
||||
</Project>
|
56
build/compile/Microsoft.DotNet.Cli.LzmaArchive.targets
Normal file
56
build/compile/Microsoft.DotNet.Cli.LzmaArchive.targets
Normal file
|
@ -0,0 +1,56 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Target Name="GenerateNuGetPackagesArchive"
|
||||
DependsOnTargets="SetupNuGetPackagesArchiveInputsOutputs"
|
||||
Inputs="@(GenerateNuGetPackagesArchiveInputs)"
|
||||
Outputs="$(FinalArchive)">
|
||||
<ItemGroup>
|
||||
<FilesToClean Include="$(NuGetPackagesArchiveProject)/**/*" />
|
||||
<FilesToClean Include="$(NuGetPackagesArchiveFolder)/**/*" />
|
||||
</ItemGroup>
|
||||
|
||||
<Delete Files="@(FilesToClean)" />
|
||||
<RemoveDir Directories="$(NuGetPackagesArchiveProject);$(NuGetPackagesArchiveFolder)" />
|
||||
<MakeDir Directories="$(NuGetPackagesArchiveProject);$(NuGetPackagesArchiveFolder)"/>
|
||||
|
||||
<DotNetNew ToolPath="$(Stage2Directory)"
|
||||
WorkingDirectory="$(NuGetPackagesArchiveProject)" />
|
||||
<DotNetRestore ToolPath="$(Stage2Directory)"
|
||||
Packages="$(NuGetPackagesArchiveFolder)"
|
||||
WorkingDirectory="$(NuGetPackagesArchiveProject)" />
|
||||
|
||||
<Delete Files="$(IntermediateArchive);$(IntermediateArchive).zip" />
|
||||
|
||||
<Message Text="Publishing Archiver" />
|
||||
|
||||
<DotNetPublish ToolPath="$(Stage2Directory)"
|
||||
WorkingDirectory="$(RepoRoot)/tools/Archiver"
|
||||
Output="$(ToolsOutputDirectory)"
|
||||
Configuration="$(Configuration)" />
|
||||
|
||||
<Exec Command="$(ArchiverExe) -a $(IntermediateArchive) $(NuGetPackagesArchiveFolder)" />
|
||||
|
||||
<Copy SourceFiles="$(IntermediateArchive)" DestinationFiles="$(FinalArchive)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="SetupNuGetPackagesArchiveInputsOutputs"
|
||||
DependsOnTargets="Prepare;SetupStage">
|
||||
<PropertyGroup>
|
||||
<NuGetPackagesArchiveProject>$(IntermediateDirectory)/NuGetPackagesArchiveProject</NuGetPackagesArchiveProject>
|
||||
<NuGetPackagesArchiveFolder>$(IntermediateDirectory)/NuGetPackagesArchiveFolder</NuGetPackagesArchiveFolder>
|
||||
<ArchiverExe>$(ToolsOutputDirectory)/Archiver</ArchiverExe>
|
||||
<IntermediateArchive>$(IntermediateDirectory)/nuGetPackagesArchive.lzma</IntermediateArchive>
|
||||
<FinalArchive>$(Stage2Directory)/sdk/$(SdkVersion)/nuGetPackagesArchive.lzma</FinalArchive>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<GenerateNuGetPackagesArchiveInputs Include="$(_DotNetNewFolder)/CSharp_Console/**/*" />
|
||||
<GenerateNuGetPackagesArchiveInputs Include="$(SrcDirectory)/dotnet-archive/**/*"
|
||||
Exclude="$(SrcDirectory)/dotnet-archive/**/bin/**/*;
|
||||
$(SrcDirectory)/dotnet-archive/**/obj/**/*" />
|
||||
<GenerateNuGetPackagesArchiveInputs Include="$(SrcDirectory)/Microsoft.DotNet.Archive/**/*"
|
||||
Exclude="$(SrcDirectory)/Microsoft.DotNet.Archive/**/bin/**/*;
|
||||
$(SrcDirectory)/Microsoft.DotNet.Archive/**/obj/**/*" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
</Project>
|
24
build/crossgen/Microsoft.DotNet.Cli.Crossgen.targets
Normal file
24
build/crossgen/Microsoft.DotNet.Cli.Crossgen.targets
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Target Name="InitCrossgenProps"
|
||||
DependsOnTargets="Init">
|
||||
<PropertyGroup>
|
||||
<CoreCLRRid>$(Rid)</CoreCLRRid>
|
||||
<CoreCLRRid Condition=" '$(OSName)' == 'win' ">win7-$(Architecture)</CoreCLRRid>
|
||||
<CoreCLRRid Condition=" '$(OSName)' == 'osx' ">osx.10.10-x64</CoreCLRRid>
|
||||
<CoreCLRRid Condition=" '$(OSName)' == 'centos' OR '$(OSName)' == 'rhel' ">rhel.7-x64</CoreCLRRid>
|
||||
|
||||
<CrossGenPackageName>runtime.$(CoreCLRRid).microsoft.netcore.runtime.coreclr</CrossGenPackageName>
|
||||
<LibCLRJitPackageName>runtime.$(CoreCLRRid).microsoft.netcore.jit</LibCLRJitPackageName>
|
||||
<CoreCLRPackageName>runtime.$(CoreCLRRid).microsoft.netcore.runtime.coreclr</CoreCLRPackageName>
|
||||
|
||||
<CoreCLRLibsDir>$(NuGetPackagesDir)/$(CoreCLRPackageName)/$(CoreCLRVersion)/runtimes/$(CoreCLRRid)/lib/netstandard1.0</CoreCLRLibsDir>
|
||||
<CrossgenPath>$(NuGetPackagesDir)/$(CrossGenPackageName)/$(CoreCLRVersion)/tools/crossgen$(ExeExtension)</CrossgenPath>
|
||||
<LibCLRJitPath>$(NuGetPackagesDir)/$(LibCLRJitPackageName)/$(CoreCLRVersion)/runtimes/$(CoreCLRRid)/native/$(DynamicLibPrefix)clrjit$(DynamicLibExtension)</LibCLRJitPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PlatformAssemblies Include="$(CoreCLRLibsDir)" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
</Project>
|
51
build/package/Microsoft.DotNet.Cli.Archive.targets
Normal file
51
build/package/Microsoft.DotNet.Cli.Archive.targets
Normal file
|
@ -0,0 +1,51 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Layout" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Target Name="GenerateArchives"
|
||||
DependsOnTargets="Init;
|
||||
Layout;
|
||||
SetupGenerateArchivesInputsOutputs;
|
||||
MakePackagesDir;"
|
||||
Inputs="%(GenerateArchivesInputsOutputs.Inputs)"
|
||||
Outputs="%(GenerateArchivesInputsOutputs.Outputs)">
|
||||
|
||||
<PropertyGroup>
|
||||
<GenerateArchivesDestinationArchive>$(ArchiveOutputDirectory)/%(GenerateArchivesInputsOutputs.OutFileName)$(ArchiveExtension)</GenerateArchivesDestinationArchive>
|
||||
</PropertyGroup>
|
||||
|
||||
<ZipFileCreateFromDirectory
|
||||
Condition=" '$(OSName)' == 'win' "
|
||||
SourceDirectory="%(GenerateArchivesInputsOutputs.InputDirectory)"
|
||||
DestinationArchive="$(GenerateArchivesDestinationArchive)" />
|
||||
|
||||
<TarGzFileCreateFromDirectory
|
||||
Condition=" '$(OSName)' != 'win' "
|
||||
SourceDirectory="%(GenerateArchivesInputsOutputs.InputDirectory)"
|
||||
DestinationArchive="$(GenerateArchivesDestinationArchive)" />
|
||||
|
||||
<ItemGroup>
|
||||
<Archives Include="$(GenerateArchivesDestinationArchive)" />
|
||||
</ItemGroup>
|
||||
|
||||
</Target>
|
||||
|
||||
<Target Name="SetupGenerateArchivesInputsOutputs"
|
||||
DependsOnTargets="Init">
|
||||
<PropertyGroup>
|
||||
<ArchiveOutputDirectory>$(PackagesDirectory)</ArchiveOutputDirectory>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<GenerateArchivesInputsOutputs Include="%(LayoutDefinition.Name)">
|
||||
<Inputs>%(LayoutDefinition.OutputFiles)</Inputs>
|
||||
<Outputs>$(ArchiveOutputDirectory)/%(LayoutDefinition.NameWithVersion)$(ArchiveExtension)</Outputs>
|
||||
<InputDirectory>$(LayoutDirectory)/%(LayoutDefinition.Name)</InputDirectory>
|
||||
<OutFileName>%(LayoutDefinition.NameWithVersion)</OutFileName>
|
||||
</GenerateArchivesInputsOutputs>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="MakePackagesDir">
|
||||
<MakeDir Directories="$(PackagesDirectory)" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
114
build/package/Microsoft.DotNet.Cli.Installer.DEB.targets
Normal file
114
build/package/Microsoft.DotNet.Cli.Installer.DEB.targets
Normal file
|
@ -0,0 +1,114 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Target Name="SetupGenerateDebInputsOutputs">
|
||||
<Exec Command="/usr/bin/env debuild -h" ContinueOnError="true">
|
||||
<Output TaskParameter="ExitCode" PropertyName="DebuildExitCode" />
|
||||
</Exec>
|
||||
|
||||
<!-- Workaround for Ubuntu16 Jenkins https://github.com/dotnet/core-setup/issues/167 -->
|
||||
<Message Condition=" '$(DebuildPresent)' != 'true' "
|
||||
Text="Debuild Not found, Debian packages will not be built."
|
||||
Importance="High" />
|
||||
|
||||
<PropertyGroup>
|
||||
<DebuildPresent>false</DebuildPresent>
|
||||
<DebuildPresent Condition=" '$(DebuildExitCode)' == '0' ">true</DebuildPresent>
|
||||
|
||||
<DebianPackagingScript>$(RepoRoot)/scripts/package/package-debian.sh</DebianPackagingScript>
|
||||
<ManpagesDirectory>$(RepoRoot)/Documentation/manpages</ManpagesDirectory>
|
||||
|
||||
<InstallerOutputDirectory>$(PackagesDirectory)</InstallerOutputDirectory>
|
||||
<SdkInstallerFile>$(InstallerOutputDirectory)/$(ArtifactNameWithVersionSdk)$(InstallerExtension)</SdkInstallerFile>
|
||||
|
||||
<SdkDebianPackageName>dotnet-dev-$(SdkVersion)</SdkDebianPackageName>
|
||||
<SharedFrameworkDebianPackageName>dotnet-sharedframework-$(SharedFrameworkName)-$(SharedFrameworkVersion)</SharedFrameworkDebianPackageName>
|
||||
<SharedFrameworkDebianPackageName>$(SharedFrameworkDebianPackageName.ToLower())</SharedFrameworkDebianPackageName>
|
||||
<HostFxrDebianPackageName>dotnet-hostfxr-$(HostFxrVersion)</HostFxrDebianPackageName>
|
||||
<HostFxrDebianPackageName>$(HostFxrDebianPackageName.ToLower())</HostFxrDebianPackageName>
|
||||
<SharedHostDebianPackageName>dotnet-host</SharedHostDebianPackageName>
|
||||
|
||||
<SdkDebianIntermediateDirectory>$(IntermediateDirectory)/debian/sdk</SdkDebianIntermediateDirectory>
|
||||
|
||||
<DebianTestResultsXmlFile>$(SdkDebianIntermediateDirectory)/debian-testResults.xml</DebianTestResultsXmlFile>
|
||||
<DebianInstalledDirectory>/usr/share/dotnet</DebianInstalledDirectory>
|
||||
<EndToEndTestDirectory>$(RepoRoot)/test/EndToEnd</EndToEndTestDirectory>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<TestSdkDebTaskEnvironmentVariables Include="PATH=$(DebianInstalledDirectory)$(PathListSeparator)$(PATH)" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Consumed By Publish -->
|
||||
<ItemGroup>
|
||||
<GeneratedInstallers Include="$(SdkInstallerFile)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<SdkDebInputFiles Include="$(SdkLayoutOutputDirectory)/**/*" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateSdkDeb"
|
||||
Condition=" '$(OSName)' == 'ubuntu' and '$(DebuildPresent)' == 'true' "
|
||||
Inputs="@(SdkDebInputFiles);"
|
||||
Outputs="$(SdkInstallerFile)" >
|
||||
|
||||
<!-- Install Packages -->
|
||||
<Exec Command="sudo dpkg -i $(DownloadedSharedHostInstallerFile)" />
|
||||
<Exec Command="sudo dpkg -i $(DownloadedHostFxrInstallerFile)" />
|
||||
<Exec Command="sudo dpkg -i $(DownloadedSharedFrameworkInstallerFile)" />
|
||||
|
||||
<Exec Command="'$(DebianPackagingScript)'
|
||||
-v '$(SdkVersion)'
|
||||
-i '$(SdkLayoutOutputDirectory)'
|
||||
-o '$(SdkInstallerFile)'
|
||||
-p '$(SdkDebianPackageName)'
|
||||
-b '$(SdkBrandName)'
|
||||
-m '$(ManpagesDirectory)'
|
||||
--framework-debian-package-name '$(SharedFrameworkDebianPackageName)'
|
||||
--framework-nuget-name '$(SharedFrameworkName)'
|
||||
--framework-nuget-version '$(SharedFrameworkVersion)'
|
||||
--obj-root '$(SdkDebianIntermediateDirectory)'" />
|
||||
|
||||
<!-- Remove Packages -->
|
||||
<Exec Command="sudo dpkg -r $(SdkDebianPackageName)" />
|
||||
<Exec Command="sudo dpkg -r $(SharedFrameworkDebianPackageName)" />
|
||||
<Exec Command="sudo dpkg -r $(HostFxrDebianPackageName)" />
|
||||
<Exec Command="sudo dpkg -r $(SharedHostDebianPackageName)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="TestSdkDeb"
|
||||
Condition=" '$(OSName)' == 'ubuntu' and '$(DebuildPresent)' == 'true' "
|
||||
Inputs="$(DownloadedSharedHostInstallerFile);
|
||||
$(DownloadedHostFxrInstallerFile);
|
||||
$(DownloadedSharedFrameworkInstallerFile);
|
||||
$(SdkInstallerFile);"
|
||||
Outputs="$(DebianTestResultsXmlFile)" >
|
||||
|
||||
<!-- Install Packages -->
|
||||
<Exec Command="sudo dpkg -i $(DownloadedSharedHostInstallerFile)" />
|
||||
<Exec Command="sudo dpkg -i $(DownloadedHostFxrInstallerFile)" />
|
||||
<Exec Command="sudo dpkg -i $(DownloadedSharedFrameworkInstallerFile)" />
|
||||
<Exec Command="sudo dpkg -i $(SdkInstallerFile)" />
|
||||
|
||||
<!-- Run E2E -->
|
||||
<DotNetTest WorkingDirectory="$(EndToEndTestDirectory)"
|
||||
EnvironmentVariables="@(TestSdkDebTaskEnvironmentVariables)"
|
||||
ToolPath="$(DebianInstalledDirectory)"
|
||||
Xml="$(DebianTestResultsXmlFile)" />
|
||||
|
||||
<!-- Remove Packages -->
|
||||
<Exec Command="sudo dpkg -r $(SdkDebianPackageName)" />
|
||||
<Exec Command="sudo dpkg -r $(SharedFrameworkDebianPackageName)" />
|
||||
<Exec Command="sudo dpkg -r $(HostFxrDebianPackageName)" />
|
||||
<Exec Command="sudo dpkg -r $(SharedHostDebianPackageName)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateDebs"
|
||||
DependsOnTargets="Init;
|
||||
Layout;
|
||||
SetupGenerateDebInputsOutputs;
|
||||
GenerateSdkDeb;
|
||||
TestSdkDeb;"
|
||||
Condition=" '$(OSName)' == 'ubuntu' " />
|
||||
</Project>
|
153
build/package/Microsoft.DotNet.Cli.Installer.MSI.targets
Normal file
153
build/package/Microsoft.DotNet.Cli.Installer.MSI.targets
Normal file
|
@ -0,0 +1,153 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Target Name="MsiTargetsSetupInputOutputs" DependsOnTargets="Init">
|
||||
<!-- AcquireWix Properties -->
|
||||
<PropertyGroup>
|
||||
<WixVersion>3.10.2</WixVersion>
|
||||
<WixDownloadUrl>https://dotnetcli.azureedge.net/build/wix/wix.$(WixVersion).zip</WixDownloadUrl>
|
||||
<WixRoot>$(IntermediateDirectory)/WixTools/$(WixVersion)</WixRoot>
|
||||
<WixDestinationPath>$(WixRoot)/WixTools.$(WixVersion).zip</WixDestinationPath>
|
||||
<WixDownloadSentinel>$(WixRoot)/WixDownload.$(WixVersion).sentinel</WixDownloadSentinel>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Generate MSI/Bundle Properties -->
|
||||
<PropertyGroup>
|
||||
<InstallerOutputDirectory>$(PackagesDirectory)</InstallerOutputDirectory>
|
||||
|
||||
<CombinedFrameworkSdkHostBundleEngineName>$(InstallerOutputDirectory)/$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)-engine.exe</CombinedFrameworkSdkHostBundleEngineName>
|
||||
|
||||
<SdkGenerateMsiPowershellScript>$(RepoRoot)/packaging/windows/clisdk/generatemsi.ps1</SdkGenerateMsiPowershellScript>
|
||||
<SdkGenerateBundlePowershellScript>$(RepoRoot)/packaging/windows/clisdk/generatebundle.ps1</SdkGenerateBundlePowershellScript>
|
||||
|
||||
<SdkInstallerFile>$(InstallerOutputDirectory)/$(ArtifactNameWithVersionSdk)$(InstallerExtension)</SdkInstallerFile>
|
||||
<CombinedFrameworkSdkHostInstallerFile>$(InstallerOutputDirectory)/$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(BundleExtension)</CombinedFrameworkSdkHostInstallerFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Consumed By Publish -->
|
||||
<ItemGroup>
|
||||
<GeneratedInstallers Include="$(SdkInstallerFile);$(CombinedFrameworkSdkHostInstallerFile)" />
|
||||
</ItemGroup>
|
||||
|
||||
<GenerateGuidFromName Name="$(SdkInstallerFile)">
|
||||
<Output TaskParameter="OutputGuid"
|
||||
PropertyName="SdkInstallerUpgradeCode" />
|
||||
</GenerateGuidFromName>
|
||||
|
||||
<GenerateGuidFromName Name="$(CombinedFrameworkSdkHostInstallerFile)">
|
||||
<Output TaskParameter="OutputGuid"
|
||||
PropertyName="CombinedFrameworkSDKHostInstallerUpgradeCode" />
|
||||
</GenerateGuidFromName>
|
||||
|
||||
<!-- Test Sdk MSI Properties -->
|
||||
<PropertyGroup>
|
||||
<SdkTestMsiPowershellScript>$(RepoRoot)/test/Installer/testmsi.ps1</SdkTestMsiPowershellScript>
|
||||
<SdkMsiTestedSentinel>$(InstallerOutputDirectory)/$(ArtifactNameWithVersionSdk).MsiTested.sentinel</SdkMsiTestedSentinel>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="AcquireWix"
|
||||
DependsOnTargets="Init;MsiTargetsSetupInputOutputs"
|
||||
Inputs="$(WixDownloadSentinel)"
|
||||
Outputs="$(WixDestinationPath)">
|
||||
|
||||
<!-- Setup sentinel to take advantage of incrementality -->
|
||||
<MakeDir Directories="$(WixRoot)" />
|
||||
<WriteLinesToFile
|
||||
File="$(WixDownloadSentinel)"
|
||||
Lines="$(WixVersion)"
|
||||
Overwrite="true"
|
||||
Encoding="Unicode"/>
|
||||
|
||||
<DownloadFile
|
||||
Uri="$(WixDownloadUrl)"
|
||||
DestinationPath="$(WixDestinationPath)"
|
||||
Overwrite="false" />
|
||||
|
||||
<ZipFileExtractToDirectory
|
||||
SourceArchive="$(WixDestinationPath)"
|
||||
DestinationDirectory="$(WixRoot)" />
|
||||
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateSdkMsi"
|
||||
DependsOnTargets="Init;Layout;AcquireWix;MsiTargetsSetupInputOutputs"
|
||||
Condition=" '$(OS)' == 'Windows_NT'"
|
||||
Inputs="$(SdkLayoutOutputDirectory);
|
||||
$(SdkGenerateMsiPowershellScript)"
|
||||
Outputs="$(SdkInstallerFile)">
|
||||
|
||||
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateMsiPowershellScript)
|
||||
'$(SdkLayoutOutputDirectory)'
|
||||
'$(SdkInstallerFile)'
|
||||
'$(WixRoot)'
|
||||
'$(SdkBrandName)'
|
||||
'$(MsiVersion)'
|
||||
'$(SimpleVersion)'
|
||||
'$(NugetVersion)'
|
||||
'$(SdkInstallerUpgradeCode)'
|
||||
'$(Architecture)'" />
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateSdkBundle"
|
||||
DependsOnTargets="Init;Layout;AcquireWix;MsiTargetsSetupInputOutputs;GenerateSdkMsi"
|
||||
Condition=" '$(OS)' == 'Windows_NT'"
|
||||
Inputs="$(SdkInstallerFile);
|
||||
$(DownloadedSharedFrameworkInstallerFile);
|
||||
$(DownloadedHostFxrInstallerFile);
|
||||
$(DownloadedSharedHostInstallerFile);
|
||||
$(SdkGenerateBundlePowershellScript)"
|
||||
Outputs="$(CombinedFrameworkSdkHostInstallerFile)">
|
||||
|
||||
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateBundlePowershellScript)
|
||||
'$(SdkInstallerFile)'
|
||||
'$(DownloadedSharedFrameworkInstallerFile)'
|
||||
'$(DownloadedHostFxrInstallerFile)'
|
||||
'$(DownloadedSharedHostInstallerFile)'
|
||||
'$(CombinedFrameworkSdkHostInstallerFile)'
|
||||
'$(WixRoot)'
|
||||
'$(SdkBrandName)'
|
||||
'$(MsiVersion)'
|
||||
'$(SimpleVersion)'
|
||||
'$(NugetVersion)'
|
||||
'$(CombinedFrameworkSDKHostInstallerUpgradeCode)'
|
||||
'$(Architecture)'" />
|
||||
</Target>
|
||||
|
||||
<Target Name="TestSdkMsi"
|
||||
Inputs="$(SdkInstallerFile)"
|
||||
Outputs="$(SdkMsiTestedSentinel)"
|
||||
DependsOnTargets="Init;MsiTargetsSetupInputOutputs;GenerateSdkMsi"
|
||||
Condition=" '$(OS)' == 'Windows_NT'" >
|
||||
|
||||
<Exec Command ="powershell -NoProfile -NoLogo $(SdkTestMsiPowershellScript)
|
||||
-InputMsi '$(SdkInstallerFile)'
|
||||
-DotnetDir '$(OutputDirectory)'" />
|
||||
|
||||
<WriteLinesToFile
|
||||
File="$(SdkMsiTestedSentinel)"
|
||||
Lines="$(SdkVersion)"
|
||||
Overwrite="true"
|
||||
Encoding="Unicode"/>
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateMsis"
|
||||
DependsOnTargets="Init;
|
||||
Layout;
|
||||
MsiTargetsSetupInputOutputs;
|
||||
AcquireWix;
|
||||
GenerateSdkMsi;
|
||||
GenerateSdkBundle;
|
||||
TestSdkMsi"
|
||||
Condition=" '$(OS)' == 'Windows_NT'" />
|
||||
|
||||
<!-- These targets are used in signing, don't remove them! -->
|
||||
<Target Name="ExtractEngineFromSdkBundle"
|
||||
DependsOnTargets="MsiTargetsSetupInputOutputs">
|
||||
<Exec Command="$(WixRoot)/insignia.exe -ib $(CombinedFrameworkSdkHostInstallerFile) -o $(CombinedFrameworkSdkHostBundleEngineName)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="ReattachEngineToSdkBundle"
|
||||
DependsOnTargets="MsiTargetsSetupInputOutputs">
|
||||
<Exec Command="$(WixRoot)/insignia.exe -ab $(CombinedFrameworkSdkHostBundleEngineName) $(CombinedFrameworkSdkHostInstallerFile) -o $(CombinedFrameworkSdkHostInstallerFile)" />
|
||||
</Target>
|
||||
</Project>
|
136
build/package/Microsoft.DotNet.Cli.Installer.PKG.targets
Normal file
136
build/package/Microsoft.DotNet.Cli.Installer.PKG.targets
Normal file
|
@ -0,0 +1,136 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Target Name="SetupPkgInputsOutputs">
|
||||
<PropertyGroup>
|
||||
<InstallerOutputDirectory>$(PackagesDirectory)</InstallerOutputDirectory>
|
||||
<PkgIntermediateDirectory>$(IntermediateDirectory)/pkgs/$(SdkVersion)</PkgIntermediateDirectory>
|
||||
|
||||
<SdkInstallerFile>$(InstallerOutputDirectory)/$(ArtifactNameWithVersionSdk)$(InstallerExtension)</SdkInstallerFile>
|
||||
<CombinedFrameworkSdkHostInstallerFile>$(InstallerOutputDirectory)/$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(BundleExtension)</CombinedFrameworkSdkHostInstallerFile>
|
||||
|
||||
<!-- Properties for pkg build -->
|
||||
<SharedHostComponentId>com.microsoft.dotnet.sharedhost.component.osx.x64</SharedHostComponentId>
|
||||
<HostFxrComponentId>com.microsoft.dotnet.hostfxr.component.osx.x64</HostFxrComponentId>
|
||||
<SharedFrameworkComponentId>com.microsoft.dotnet.sharedframework.$(SharedFrameworkNugetName).$(SharedFrameworkVersion).component.osx.x64</SharedFrameworkComponentId>
|
||||
<SdkComponentId>com.microsoft.dotnet.dev.$(SdkVersion).component.osx.x64</SdkComponentId>
|
||||
<SdkProductArchiveId>com.microsoft.dotnet.dev.$(SdkVersion).osx.x64</SdkProductArchiveId>
|
||||
|
||||
<PkgInstallDirectory>/usr/local/share/dotnet</PkgInstallDirectory>
|
||||
|
||||
<SdkPkgSourcesRootDirectory>$(RepoRoot)/packaging/osx/clisdk</SdkPkgSourcesRootDirectory>
|
||||
<SdkPkgScriptsDirectory>$(SdkPkgSourcesRootDirectory)/scripts</SdkPkgScriptsDirectory>
|
||||
<SdkProductArchiveResourcesDirectory>$(SdkPkgSourcesRootDirectory)/resources</SdkProductArchiveResourcesDirectory>
|
||||
|
||||
<SdkProductArchiveDistributionTemplateFile>$(SdkPkgSourcesRootDirectory)/Distribution-Template</SdkProductArchiveDistributionTemplateFile>
|
||||
<SdkProductArchiveDistributionFile>$(PkgIntermediateDirectory)/CLI-SDK-Formatted-Distribution-Template.xml</SdkProductArchiveDistributionFile>
|
||||
|
||||
<SdkPkgIntermediatePath>$(PkgIntermediateDirectory)/$(SdkComponentId).pkg</SdkPkgIntermediatePath>
|
||||
<SharedFrameworkPkgIntermediatePath>$(PkgIntermediateDirectory)/$(SharedFrameworkComponentId).pkg</SharedFrameworkPkgIntermediatePath>
|
||||
<SharedHostPkgIntermediatePath>$(PkgIntermediateDirectory)/$(SharedHostComponentId).pkg</SharedHostPkgIntermediatePath>
|
||||
<HostFxrPkgIntermediatePath>$(PkgIntermediateDirectory)/$(HostFxrComponentId).pkg</HostFxrPkgIntermediatePath>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DistributionTemplateReplacement Include="{SharedFxComponentId}">
|
||||
<ReplacementString>$(SharedFrameworkComponentId)</ReplacementString>
|
||||
</DistributionTemplateReplacement>
|
||||
<DistributionTemplateReplacement Include="{SharedHostComponentId}">
|
||||
<ReplacementString>$(SharedHostComponentId)</ReplacementString>
|
||||
</DistributionTemplateReplacement>
|
||||
<DistributionTemplateReplacement Include="{HostFxrComponentId}">
|
||||
<ReplacementString>$(HostFxrComponentId)</ReplacementString>
|
||||
</DistributionTemplateReplacement>
|
||||
<DistributionTemplateReplacement Include="{CLISdkComponentId}">
|
||||
<ReplacementString>$(SdkComponentId)</ReplacementString>
|
||||
</DistributionTemplateReplacement>
|
||||
<DistributionTemplateReplacement Include="{CLISdkNugetVersion}">
|
||||
<ReplacementString>$(SdkVersion)</ReplacementString>
|
||||
</DistributionTemplateReplacement>
|
||||
<DistributionTemplateReplacement Include="{CLISdkBrandName}">
|
||||
<ReplacementString>$(SdkBrandName)</ReplacementString>
|
||||
</DistributionTemplateReplacement>
|
||||
<DistributionTemplateReplacement Include="{SharedFxBrandName}">
|
||||
<ReplacementString>$(SharedFrameworkBrandName)</ReplacementString>
|
||||
</DistributionTemplateReplacement>
|
||||
<DistributionTemplateReplacement Include="{SharedHostBrandName}">
|
||||
<ReplacementString>$(SharedHostBrandName)</ReplacementString>
|
||||
</DistributionTemplateReplacement>
|
||||
<DistributionTemplateReplacement Include="{HostFxrBrandName}">
|
||||
<ReplacementString>$(HostFxrBrandName)</ReplacementString>
|
||||
</DistributionTemplateReplacement>
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Consumed By Publish -->
|
||||
<ItemGroup>
|
||||
<GeneratedInstallers Include="$(SdkInstallerFile);$(CombinedFrameworkSdkHostInstallerFile)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<GenerateSdkPkgInputs Include="$(SdkLayoutOutputDirectory)/**/*" />
|
||||
<GenerateSdkPkgInputs Include="$(SdkPkgScriptsDirectory)/**/*" />
|
||||
|
||||
<GenerateSdkProductArchiveInputs Include="$(SdkInstallerFile)" />
|
||||
<GenerateSdkProductArchiveInputs Include="$(DownloadedSharedFrameworkInstallerFile)" />
|
||||
<GenerateSdkProductArchiveInputs Include="$(DownloadedHostFxrInstallerFile)" />
|
||||
<GenerateSdkProductArchiveInputs Include="$(DownloadedSharedHostInstallerFile)" />
|
||||
<GenerateSdkProductArchiveInputs Include="$(SdkProductArchiveDistributionTemplateFile)" />
|
||||
<GenerateSdkProductArchiveInputs Include="$(SdkProductArchiveResourcesDirectory)/**/*" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateSdkPkg"
|
||||
Inputs="@(GenerateSdkPkgInputs)"
|
||||
Outputs="$(SdkInstallerFile)"
|
||||
DependsOnTargets="Init;Layout;SetupPkgInputsOutputs"
|
||||
Condition=" '$(OSName)' == 'osx' ">
|
||||
|
||||
<Exec Command="pkgbuild
|
||||
--root '$(SdkLayoutOutputDirectory)'
|
||||
--identifier '$(SdkComponentId)'
|
||||
--version '$(SdkVersion)'
|
||||
--install-location '$(PkgInstallDirectory)'
|
||||
--scripts '$(SdkPkgScriptsDirectory)'
|
||||
'$(SdkInstallerFile)'" />
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateSdkProductArchive"
|
||||
Inputs="@(GenerateSdkProductArchiveInputs)"
|
||||
Outputs="$(CombinedFrameworkSdkHostInstallerFile)"
|
||||
DependsOnTargets="GenerateSdkPkg"
|
||||
Condition=" '$(OSName)' == 'osx' ">
|
||||
<!-- Move ProductArchive pkg components into place with component ids in the filenames -->
|
||||
<Copy
|
||||
SourceFiles="$(SdkInstallerFile);
|
||||
$(DownloadedSharedFrameworkInstallerFile);
|
||||
$(DownloadedHostFxrInstallerFile);
|
||||
$(DownloadedSharedHostInstallerFile);"
|
||||
DestinationFiles="$(SdkPkgIntermediatePath);
|
||||
$(SharedFrameworkPkgIntermediatePath);
|
||||
$(HostFxrPkgIntermediatePath);
|
||||
$(SharedHostPkgIntermediatePath);" />
|
||||
|
||||
<!-- Fill out parameters in the Distribution Template -->
|
||||
<ReplaceFileContents
|
||||
InputFile="$(SdkProductArchiveDistributionTemplateFile)"
|
||||
DestinationFile="$(SdkProductArchiveDistributionFile)"
|
||||
ReplacementPatterns="@(DistributionTemplateReplacement -> '%(Identity)')"
|
||||
ReplacementStrings="@(DistributionTemplateReplacement -> '%(ReplacementString)')" />
|
||||
|
||||
<Exec Command="productbuild
|
||||
--version '$(SdkVersion)'
|
||||
--identifier '$(SdkProductArchiveId)'
|
||||
--package-path '$(PkgIntermediateDirectory)'
|
||||
--resources '$(SdkProductArchiveResourcesDirectory)'
|
||||
--distribution '$(SdkProductArchiveDistributionFile)'
|
||||
'$(CombinedFrameworkSdkHostInstallerFile)'" />
|
||||
</Target>
|
||||
|
||||
<Target Name="GeneratePkgs"
|
||||
DependsOnTargets="Init;
|
||||
Layout;
|
||||
SetupPkgInputsOutputs;
|
||||
GenerateSdkPkg;
|
||||
GenerateSdkProductArchive"
|
||||
Condition=" '$(OSName)' == 'osx' " />
|
||||
|
||||
</Project>
|
87
build/package/Microsoft.DotNet.Cli.Layout.targets
Normal file
87
build/package/Microsoft.DotNet.Cli.Layout.targets
Normal file
|
@ -0,0 +1,87 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Target DependsOnTargets="Init" Name="SetupLayoutInputsOutputs" >
|
||||
<PropertyGroup>
|
||||
<LayoutDirectory>$(IntermediateDirectory)/layouts</LayoutDirectory>
|
||||
|
||||
<SdkLayoutOutputDirectory>$(LayoutDirectory)/$(ArtifactNameSdk)</SdkLayoutOutputDirectory>
|
||||
<SdkDebugLayoutOutputDirectory>$(LayoutDirectory)/$(ArtifactNameSdkDebug)</SdkDebugLayoutOutputDirectory>
|
||||
<CombinedHostHostFxrFrameworkSdkOutputDirectory>$(LayoutDirectory)/$(ArtifactNameCombinedHostHostFxrFrameworkSdk)</CombinedHostHostFxrFrameworkSdkOutputDirectory>
|
||||
<CombinedFrameworkSdkOutputDirectory>$(LayoutDirectory)/$(ArtifactNameCombinedFrameworkSdk)</CombinedFrameworkSdkOutputDirectory>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Set up Items with Layout Input Files -->
|
||||
<ItemGroup>
|
||||
<SdkLayoutInput Include="$(OutputDirectory)/sdk/**/*" />
|
||||
<SdkDebugLayoutInput Include="$(Stage2SymbolsDirectory)/sdk/**/*" />
|
||||
<CombinedHostHostFxrFrameworkSdkInput Include="$(OutputDirectory)/**/*" />
|
||||
<CombinedFrameworkSdkInput Include="$(OutputDirectory)/shared/**/*" />
|
||||
<CombinedFrameworkSdkInput Include="$(OutputDirectory)/sdk/**/*" />
|
||||
</ItemGroup>
|
||||
|
||||
<MakeRelative
|
||||
Path1="$(OutputDirectory)"
|
||||
Path2="%(SdkLayoutInput.Identity)" >
|
||||
<Output TaskParameter="RelativePath" ItemName="SdkRelativeOutputFiles" />
|
||||
</MakeRelative>
|
||||
<MakeRelative
|
||||
Path1="$(Stage2SymbolsDirectory)"
|
||||
Path2="%(SdkDebugLayoutInput.Identity)" >
|
||||
<Output TaskParameter="RelativePath" ItemName="SdkDebugRelativeOutputFiles" />
|
||||
</MakeRelative>
|
||||
<MakeRelative
|
||||
Path1="$(OutputDirectory)"
|
||||
Path2="%(CombinedHostHostFxrFrameworkSdkInput.Identity)" >
|
||||
<Output TaskParameter="RelativePath" ItemName="CombinedHostHostFxrFrameworkSdkRelativeOutputFiles" />
|
||||
</MakeRelative>
|
||||
<MakeRelative
|
||||
Path1="$(OutputDirectory)"
|
||||
Path2="%(CombinedFrameworkSdkInput.Identity)" >
|
||||
<Output TaskParameter="RelativePath" ItemName="CombinedFrameworkSdkOutputFiles" />
|
||||
</MakeRelative>
|
||||
|
||||
<!-- Set up Items Defining Layouts for easy change -->
|
||||
<ItemGroup>
|
||||
<LayoutDefinition Include="Sdk">
|
||||
<InputFiles>@(SdkLayoutInput)</InputFiles>
|
||||
<OutputFiles>@(SdkRelativeOutputFiles -> '$(SdkLayoutOutputDirectory)/%(Identity)')</OutputFiles>
|
||||
<NameWithVersion>$(ArtifactNameWithVersionSdk)</NameWithVersion>
|
||||
<Name>$(ArtifactNameSdk)</Name>
|
||||
</LayoutDefinition>
|
||||
|
||||
<LayoutDefinition Include="Debug">
|
||||
<InputFiles>@(SdkDebugLayoutInput)</InputFiles>
|
||||
<OutputFiles>@(SdkDebugRelativeOutputFiles -> '$(SdkDebugLayoutOutputDirectory)/%(Identity)')</OutputFiles>
|
||||
<NameWithVersion>$(ArtifactNameWithVersionSdkDebug)</NameWithVersion>
|
||||
<Name>$(ArtifactNameSdkDebug)</Name>
|
||||
</LayoutDefinition>
|
||||
|
||||
<LayoutDefinition Include="CombinedHostHostFxrFrameworkSdk">
|
||||
<InputFiles>@(CombinedHostHostFxrFrameworkSdkInput)</InputFiles>
|
||||
<OutputFiles>@(CombinedHostHostFxrFrameworkSdkRelativeOutputFiles -> '$(CombinedHostHostFxrFrameworkSdkOutputDirectory)/%(Identity)')</OutputFiles>
|
||||
<NameWithVersion>$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)</NameWithVersion>
|
||||
<Name>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)</Name>
|
||||
</LayoutDefinition>
|
||||
|
||||
<LayoutDefinition Include="CombinedFrameworkSdk">
|
||||
<InputFiles>@(CombinedFrameworkSdkInput)</InputFiles>
|
||||
<OutputFiles>@(CombinedFrameworkSdkOutputFiles -> '$(CombinedFrameworkSdkOutputDirectory)/%(Identity)')</OutputFiles>
|
||||
<NameWithVersion>$(ArtifactNameWithVersionCombinedFrameworkSdk)</NameWithVersion>
|
||||
<Name>$(ArtifactNameCombinedFrameworkSdk)</Name>
|
||||
</LayoutDefinition>
|
||||
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="Layout"
|
||||
DependsOnTargets="Init;SetupLayoutInputsOutputs"
|
||||
Inputs="@(LayoutDefinition -> '%(InputFiles)')"
|
||||
Outputs="@(LayoutDefinition -> '%(OutputFiles)')" >
|
||||
|
||||
<!-- Copy Files to layout directories based on defintiions -->
|
||||
<Copy SourceFiles="%(LayoutDefinition.InputFiles)"
|
||||
DestinationFiles="%(LayoutDefinition.OutputFiles)"
|
||||
SkipUnchangedFiles="true" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
82
build/package/Microsoft.DotNet.Cli.Nupkg.targets
Normal file
82
build/package/Microsoft.DotNet.Cli.Nupkg.targets
Normal file
|
@ -0,0 +1,82 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Layout" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<Target Name="SetupProjectsToPack"
|
||||
DependsOnTargets="Init">
|
||||
<PropertyGroup>
|
||||
<NupkgVersionSuffix>$(CommitCount)</NupkgVersionSuffix>
|
||||
<ProjectsSrcDirectory>$(RepoRoot)/src</ProjectsSrcDirectory>
|
||||
<PackagingBuildBasePath>$(Stage2CompilationDirectory)/forPackaging</PackagingBuildBasePath>
|
||||
<NupkgOutputDirectory>$(PackagesDirectory)</NupkgOutputDirectory>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectsToPack Include="$(ProjectsSrcDirectory)/Microsoft.DotNet.Cli.Utils" >
|
||||
<ProjectName>Microsoft.DotNet.Cli.Utils</ProjectName>
|
||||
<Version>$(SdkNugetVersion)</Version>
|
||||
</ProjectsToPack>
|
||||
<ProjectsToPack Include="$(ProjectsSrcDirectory)/Microsoft.DotNet.Compiler.Common">
|
||||
<ProjectName>Microsoft.DotNet.Compiler.Common</ProjectName>
|
||||
<Version>$(SdkNugetVersion)</Version>
|
||||
</ProjectsToPack>
|
||||
<ProjectsToPack Include="$(ProjectsSrcDirectory)/Microsoft.DotNet.Files">
|
||||
<ProjectName>Microsoft.DotNet.Files</ProjectName>
|
||||
<Version>$(SdkNugetVersion)</Version>
|
||||
</ProjectsToPack>
|
||||
<ProjectsToPack Include="$(ProjectsSrcDirectory)/Microsoft.DotNet.InternalAbstractions">
|
||||
<ProjectName>Microsoft.DotNet.InternalAbstractions</ProjectName>
|
||||
<Version>$(DependencyModelAndInternalAbstractionsNugetVersion)</Version>
|
||||
</ProjectsToPack>
|
||||
<ProjectsToPack Include="$(ProjectsSrcDirectory)/Microsoft.DotNet.ProjectModel">
|
||||
<ProjectName>Microsoft.DotNet.ProjectModel</ProjectName>
|
||||
<Version>$(ProjectModelNugetVersion)</Version>
|
||||
</ProjectsToPack>
|
||||
<ProjectsToPack Include="$(ProjectsSrcDirectory)/Microsoft.DotNet.ProjectModel.Loader">
|
||||
<ProjectName>Microsoft.DotNet.ProjectModel.Loader</ProjectName>
|
||||
<Version>$(SdkNugetVersion)</Version>
|
||||
</ProjectsToPack>
|
||||
<ProjectsToPack Include="$(ProjectsSrcDirectory)/Microsoft.DotNet.ProjectModel.Workspaces">
|
||||
<ProjectName>Microsoft.DotNet.ProjectModel.Workspaces</ProjectName>
|
||||
<Version>$(SdkNugetVersion)</Version>
|
||||
</ProjectsToPack>
|
||||
<ProjectsToPack Include="$(ProjectsSrcDirectory)/Microsoft.Extensions.Testing.Abstractions">
|
||||
<ProjectName>Microsoft.Extensions.Testing.Abstractions</ProjectName>
|
||||
<Version>$(SdkNugetVersion)</Version>
|
||||
</ProjectsToPack>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="SetupGenerateNugetPackagesInputsOutputs"
|
||||
DependsOnTargets="SetupProjectsToPack">
|
||||
<ItemGroup>
|
||||
<ProjectPackTargetInputs Include="$(PackagingBuildBasePath)/src/%(ProjectsToPack.ProjectName)/**/netstandard*/%(ProjectsToPack.ProjectName).dll" />
|
||||
<ProjectPackTargetOutputs Include="$(NupkgOutputDirectory)/%(ProjectsToPack.ProjectName).%(ProjectsToPack.Version).nupkg" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateNugetPackages"
|
||||
DependsOnTargets="SetupGenerateNugetPackagesInputsOutputs"
|
||||
Inputs="@(ProjectPackTargetInputs -> '%(Identity)')"
|
||||
Outputs="@(ProjectPackTargetOutputs -> '%(Identity)')">
|
||||
|
||||
<DotNetPack BuildBasePath="$(PackagingBuildBasePath)"
|
||||
NoBuild="True"
|
||||
Output="$(NupkgOutputDirectory)"
|
||||
ProjectPath="%(ProjectsToPack.Identity)"
|
||||
ToolPath="$(Stage2Directory)"
|
||||
VersionSuffix="$(NupkgVersionSuffix)"
|
||||
Configuration="$(Configuration)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="BuildProjectsForNuGetPackages"
|
||||
DependsOnTargets="Init;
|
||||
SetupProjectsToPack"
|
||||
Condition=" '$(OS)' == 'Windows_NT' ">
|
||||
<MakeDir Directories="$(PackagingBuildBasePath)" />
|
||||
|
||||
<DotNetBuild ToolPath="$(Stage2Directory)"
|
||||
BuildBasePath="$(PackagingBuildBasePath)"
|
||||
Configuration="$(Configuration)"
|
||||
ProjectPath="%(ProjectsToPack.Identity)" />
|
||||
</Target>
|
||||
</Project>
|
12
build/prepare/CentosCoreclrAndCoreFxDependencies.props
Normal file
12
build/prepare/CentosCoreclrAndCoreFxDependencies.props
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<CentosCoreclrAndCoreFxDependencies Include="unzip" />
|
||||
<CentosCoreclrAndCoreFxDependencies Include="libunwind" />
|
||||
<CentosCoreclrAndCoreFxDependencies Include="gettext" />
|
||||
<CentosCoreclrAndCoreFxDependencies Include="libcurl-devel" />
|
||||
<CentosCoreclrAndCoreFxDependencies Include="openssl-devel" />
|
||||
<CentosCoreclrAndCoreFxDependencies Include="zlib" />
|
||||
<CentosCoreclrAndCoreFxDependencies Include="libicu-devel" />
|
||||
</ItemGroup>
|
||||
</Project>
|
41
build/prepare/CheckPrereqs.targets
Normal file
41
build/prepare/CheckPrereqs.targets
Normal file
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="UbuntuCoreclrAndCoreFxDependencies.props" />
|
||||
<Import Project="DebianPackageBuildDependencies.props" />
|
||||
<Import Project="CentosCoreclrAndCoreFxDependencies.props" />
|
||||
|
||||
<Target Name="CheckPrereqs"
|
||||
DependsOnTargets="InitializeCommonProps;
|
||||
CheckUbuntuAptGetDependencies;
|
||||
CheckCentOsYumDependencies;">
|
||||
|
||||
<Message Text="Using Stage0 version:" />
|
||||
<Exec Command="$(DotnetStage0) --version" />
|
||||
</Target>
|
||||
|
||||
<Target Name="CheckUbuntuAptGetDependencies"
|
||||
Condition=" '$(Rid)' == 'ubuntu.14.04-x64' ">
|
||||
|
||||
<Exec Command="dpkg -s %(UbuntuCoreclrAndCoreFxDependencies.Identity)" />
|
||||
|
||||
<Exec Command="dpkg -s %(DebianPackageBuildDependencies.Identity)" />
|
||||
|
||||
<OnError ExecuteTargets="ShowAptGetUsage" />
|
||||
</Target>
|
||||
|
||||
<Target Name="ShowAptGetUsage">
|
||||
<Message Text="Install the missing dependency with `sudo apt-get install {package}`." />
|
||||
</Target>
|
||||
|
||||
<Target Name="CheckCentOsYumDependencies"
|
||||
Condition=" '$(OSName)' == 'centos' ">
|
||||
|
||||
<Exec Command="yum list installed %(CentosCoreclrAndCoreFxDependencies.Identity)" />
|
||||
|
||||
<OnError ExecuteTargets="ShowYumUsage" />
|
||||
</Target>
|
||||
|
||||
<Target Name="ShowYumUsage">
|
||||
<Message Text="Install the missing dependency with `yum install {package}`." />
|
||||
</Target>
|
||||
</Project>
|
8
build/prepare/DebianPackageBuildDependencies.props
Normal file
8
build/prepare/DebianPackageBuildDependencies.props
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<DebianPackageBuildDependencies Include="devscripts" />
|
||||
<DebianPackageBuildDependencies Include="debhelper" />
|
||||
<DebianPackageBuildDependencies Include="build-essential" />
|
||||
</ItemGroup>
|
||||
</Project>
|
49
build/prepare/UbuntuCoreclrAndCoreFxDependencies.props
Normal file
49
build/prepare/UbuntuCoreclrAndCoreFxDependencies.props
Normal file
|
@ -0,0 +1,49 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libc6" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libedit2" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libffi6" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libgcc1" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libicu52" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="liblldb-3.6" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libllvm3.6" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="liblttng-ust0" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="liblzma5" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libncurses5" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libpython2.7" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libstdc++6" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libtinfo5" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libunwind8" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="liburcu1" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libuuid1" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="zlib1g" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libasn1-8-heimdal" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libcomerr2" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libcurl3" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libgcrypt11" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libgnutls26" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libgpg-error0" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libgssapi3-heimdal" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libgssapi-krb5-2" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libhcrypto4-heimdal" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libheimbase1-heimdal" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libheimntlm0-heimdal" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libhx509-5-heimdal" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libidn11" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libk5crypto3" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libkeyutils1" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libkrb5-26-heimdal" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libkrb5-3" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libkrb5support0" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libldap-2.4-2" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libp11-kit0" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libroken18-heimdal" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="librtmp0" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libsasl2-2" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libsqlite3-0" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libssl1.0.0" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libtasn1-6" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libwind0-heimdal" />
|
||||
</ItemGroup>
|
||||
</Project>
|
17
build/publish/Microsoft.DotNet.Cli.Badge.targets
Normal file
17
build/publish/Microsoft.DotNet.Cli.Badge.targets
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Target Name="GenerateVersionBadge"
|
||||
DependsOnTargets="Init">
|
||||
<PropertyGroup>
|
||||
<VersionSvgTemplate>$(RepoRoot)/resources/images/version_badge.svg</VersionSvgTemplate>
|
||||
</PropertyGroup>
|
||||
|
||||
<Message Text="$(VersionBadge)" />
|
||||
|
||||
<ReplaceFileContents
|
||||
InputFile="$(VersionSvgTemplate)"
|
||||
DestinationFile="$(VersionBadge)"
|
||||
ReplacementPatterns="ver_number"
|
||||
ReplacementStrings="$(SdkVersion)" />
|
||||
</Target>
|
||||
</Project>
|
41
build/publish/PublishContent.targets
Normal file
41
build/publish/PublishContent.targets
Normal file
|
@ -0,0 +1,41 @@
|
|||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<PropertyGroup>
|
||||
<OverwriteOnPublish Condition="'$(OverwriteOnPublish)' == ''">false</OverwriteOnPublish>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- gathers the items to be published -->
|
||||
<Target Name="GatherItemsForPattern">
|
||||
<Error Condition="'$(PublishPattern)' == ''" Text="Please specify a value for PublishPattern using standard msbuild 'include' syntax." />
|
||||
<ItemGroup>
|
||||
<ForPublishing Include="$(PublishPattern)" />
|
||||
</ItemGroup>
|
||||
<!-- add relative blob path metadata -->
|
||||
<ItemGroup>
|
||||
<ForPublishing>
|
||||
<RelativeBlobPath>$([System.String]::Copy('%(RecursiveDir)%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath>
|
||||
</ForPublishing>
|
||||
</ItemGroup>
|
||||
<Error Condition="'@(ForPublishing)' == ''" Text="No items were found matching pattern '$(PublishPattern)'." />
|
||||
</Target>
|
||||
|
||||
<!-- publishes items to blob storage in Azure -->
|
||||
<Target Name="UploadToAzure" DependsOnTargets="GatherItemsForPattern">
|
||||
<Error Condition="'$(ContainerName)' == ''" Text="Missing property ContainerName." />
|
||||
<Error Condition="'$(CloudDropAccountName)' == ''" Text="Missing property CloudDropAccountName." />
|
||||
<Error Condition="'$(CloudDropAccessToken)' == ''" Text="Missing property CloudDropAccessToken." />
|
||||
<!-- create the container if it doesn't exist -->
|
||||
<CreateAzureContainer
|
||||
AccountKey="$(CloudDropAccessToken)"
|
||||
AccountName="$(CloudDropAccountName)"
|
||||
ContainerName="$(ContainerName)" />
|
||||
<!-- now upload the items -->
|
||||
<UploadToAzure
|
||||
AccountKey="$(CloudDropAccessToken)"
|
||||
AccountName="$(CloudDropAccountName)"
|
||||
ContainerName="$(ContainerName)"
|
||||
Items="@(ForPublishing)"
|
||||
Overwrite="$(OverwriteOnPublish)" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
60
build/test/TestAssetProjects.targets
Normal file
60
build/test/TestAssetProjects.targets
Normal file
|
@ -0,0 +1,60 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Target Name="SetupTestAssetProjectData"
|
||||
DependsOnTargets="AssociateTestAssetInputFilesWithProject">
|
||||
</Target>
|
||||
|
||||
<Target Name="AssociateTestAssetInputFilesWithProject"
|
||||
DependsOnTargets="IdentifyTestAssetInputFilesForProject;"
|
||||
Outputs="%(TestAssetProjects.ProjectPath)">
|
||||
<PropertyGroup>
|
||||
<CurrentProject>%(TestAssetProjects.ProjectPath)</CurrentProject>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<TestAssetProjects Condition=" '%(ProjectPath)' == '$(CurrentProject)' ">
|
||||
<BuildInputs>@(TestAssetProjectInputs)</BuildInputs>
|
||||
</TestAssetProjects>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="IdentifyTestAssetInputFilesForProject"
|
||||
DependsOnTargets="SetupBuildTestAssetProjectInputs;"
|
||||
Outputs="%(TestAssetProjects.ProjectPath)">
|
||||
<ItemGroup>
|
||||
<TestAssetProjectInputs Include="%(TestAssetProjects.BuildInputIncludeFilter)"
|
||||
Exclude="%(TestAssetProjects.BuildInputExcludeFilter)">
|
||||
<ProjectPath>%(TestAssetProjects.ProjectPath)</ProjectPath>
|
||||
</TestAssetProjectInputs>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="SetupBuildTestAssetProjectInputs">
|
||||
<ItemGroup>
|
||||
<NoAutoBuildTestAssets Include="TestAssets$(PathSeparator)TestProjects$(PathSeparator)**$(PathSeparator).noautobuild" />
|
||||
<NoAutoBuildTestAssetProjects Include="%(NoAutoBuildTestAssets.RelativeDir)project.json" />
|
||||
|
||||
<PreTestAssetProjects Include="TestAssets$(PathSeparator)TestProjects$(PathSeparator)**$(PathSeparator)project.json"/>
|
||||
|
||||
<TestAssetProjects Include="%(PreTestAssetProjects.RelativeDir)project.json"
|
||||
Exclude="@(NoAutoBuildTestAssetProjects)"/>
|
||||
|
||||
<TestAssetProjects>
|
||||
<BuildInputIncludeFilter>%(RelativeDir)**/*.*</BuildInputIncludeFilter>
|
||||
<BuildInputExcludeFilter>%(RelativeDir)bin/**/*.*;%(RelativeDir)obj/**/*.*</BuildInputExcludeFilter>
|
||||
<ProjectDir>$([System.IO.Directory]::GetParent(%(Identity)))</ProjectDir>
|
||||
<ProjectPath>%(Identity)</ProjectPath>
|
||||
</TestAssetProjects>
|
||||
|
||||
<TestAssetProjects>
|
||||
<OutputName>$([System.IO.Path]::GetFileName(%(ProjectDir)))</OutputName>
|
||||
<OutputName Condition=" '%(RelativeDir)' == 'TestAssets/TestProjects/AppWithOutputAssemblyName/' ">MyApp</OutputName>
|
||||
<OutputName Condition=" '%(RelativeDir)' == 'TestAssets/TestProjects/TestAppWithContentPackage/' ">AppWithContentPackage</OutputName>
|
||||
</TestAssetProjects>
|
||||
|
||||
<TestAssetProjects>
|
||||
<BuildOutput>%(TestAssetProjects.RelativeDir)bin/$(Configuration)/netcoreapp1.0/%(TestAssetProjects.OutputName).dll</BuildOutput>
|
||||
</TestAssetProjects>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
</Project>
|
259
build/test/TestPackageProjects.targets
Normal file
259
build/test/TestPackageProjects.targets
Normal file
|
@ -0,0 +1,259 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Target Name="SetupTestPackageProjectData"
|
||||
DependsOnTargets="AssociateSourceFilesWithProjects;
|
||||
AssociateOutputsWithProjects;">
|
||||
<ItemGroup>
|
||||
<TestPackageProject>
|
||||
<NuPkgName Condition=" '%(NuPkgName)' == '' ">%(Name)</NuPkgName>
|
||||
</TestPackageProject>
|
||||
|
||||
<TestPackageProject>
|
||||
<PackInputs>%(BuildOutputs)</PackInputs>
|
||||
<PackOutputs>$(TestPackagesDir)%(NuPkgName).%(VersionPrefix)%(VersionSuffix).nupkg</PackOutputs>
|
||||
</TestPackageProject>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="AssociateOutputsWithProjects"
|
||||
DependsOnTargets="SetupTestPackageProjectFrameworks"
|
||||
Outputs="%(TestPackageProject.ProjectPath)">
|
||||
<ItemGroup>
|
||||
<TestPackageProject>
|
||||
<BuildOutputs>%(TestPackageProject.OutputPath)%(TestPackageProject.Name).dll</BuildOutputs>
|
||||
</TestPackageProject>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="SetupTestPackageProjectFrameworks"
|
||||
DependsOnTargets="SetupTestPackageProjectBaseData;
|
||||
AssociateSourceFilesWithProjects;"
|
||||
Outputs="%(TestPackageProjectFrameworks.Identity)">
|
||||
<PropertyGroup>
|
||||
<CurrentBuildFramework>%(TestPackageProjectFrameworks.Identity)</CurrentBuildFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<TestPackageProject Condition="$([System.Text.RegularExpressions.Regex]::IsMatch('%(Frameworks)', '(^|;)$(CurrentBuildFramework)($|;)'))"
|
||||
Include="@(BaseTestPackageProject)">
|
||||
<Framework>$(CurrentBuildFramework)</Framework>
|
||||
<OutputPath>%(OutputPath)$(CurrentBuildFramework)/</OutputPath>
|
||||
</TestPackageProject>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="AssociateSourceFilesWithProjects"
|
||||
DependsOnTargets="FindSourceFiles"
|
||||
Outputs="%(BaseTestPackageProject.ProjectPath)">
|
||||
<PropertyGroup>
|
||||
<CurrentProject>%(BaseTestPackageProject.ProjectPath)</CurrentProject>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<BaseTestPackageProject Condition=" '%(ProjectPath)' == '$(CurrentProject)' ">
|
||||
<BuildInputs>@(__TestPackageProjectInputs)</BuildInputs>
|
||||
</BaseTestPackageProject>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="FindSourceFiles"
|
||||
DependsOnTargets="SetupTestPackageProjectBaseData;"
|
||||
Outputs="%(BaseTestPackageProject.Identity)">
|
||||
<ItemGroup>
|
||||
<__TestPackageProjectInputs Include="%(BaseTestPackageProject.BuildInputIncludeFilter)"
|
||||
Exclude="%(BaseTestPackageProject.BuildInputExcludeFilter)">
|
||||
<ProjectPath>%(BaseTestPackageProject.ProjectPath)</ProjectPath>
|
||||
</__TestPackageProjectInputs>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="SetupTestPackageProjectBaseData">
|
||||
<ItemGroup>
|
||||
<BaseTestPackageProject Include="TestAssets/TestPackages/PackageWithFakeNativeDep">
|
||||
<Name>PackageWithFakeNativeDep</Name>
|
||||
<IsTool>False</IsTool>
|
||||
<IsApplicable>True</IsApplicable>
|
||||
<VersionPrefix>1.0.0</VersionPrefix>
|
||||
<VersionSuffix>$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
||||
<Clean>True</Clean>
|
||||
<Frameworks>net45</Frameworks>
|
||||
</BaseTestPackageProject>
|
||||
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-dependency-context-test">
|
||||
<Name>dotnet-dependency-context-test</Name>
|
||||
<IsTool>True</IsTool>
|
||||
<IsApplicable>True</IsApplicable>
|
||||
<VersionPrefix>1.0.0-rc-</VersionPrefix>
|
||||
<VersionSuffix>$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
||||
<Clean>True</Clean>
|
||||
<Frameworks>netcoreapp1.0</Frameworks>
|
||||
</BaseTestPackageProject>
|
||||
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-dependency-tool-invoker">
|
||||
<Name>dotnet-dependency-tool-invoker</Name>
|
||||
<IsTool>True</IsTool>
|
||||
<IsApplicable>True</IsApplicable>
|
||||
<VersionPrefix>1.0.0-rc-</VersionPrefix>
|
||||
<VersionSuffix>$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
||||
<Clean>True</Clean>
|
||||
<Frameworks>netcoreapp1.0</Frameworks>
|
||||
</BaseTestPackageProject>
|
||||
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-desktop-and-portable">
|
||||
<Name>dotnet-desktop-and-portable</Name>
|
||||
<IsTool>True</IsTool>
|
||||
<IsApplicable>True</IsApplicable>
|
||||
<VersionPrefix>1.0.0-rc-</VersionPrefix>
|
||||
<VersionSuffix>$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
||||
<Clean>True</Clean>
|
||||
<Frameworks>net451;netcoreapp1.0</Frameworks>
|
||||
</BaseTestPackageProject>
|
||||
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-desktop-binding-redirects"
|
||||
Condition=" '$(IsDesktopAvailable)' == 'True' ">
|
||||
<Name>dotnet-desktop-binding-redirects</Name>
|
||||
<IsTool>True</IsTool>
|
||||
<IsApplicable>$(DesktopAvailable)</IsApplicable>
|
||||
<VersionPrefix>1.0.0-rc-</VersionPrefix>
|
||||
<VersionSuffix>$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
||||
<Clean>True</Clean>
|
||||
<Frameworks>net451</Frameworks>
|
||||
</BaseTestPackageProject>
|
||||
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-hello/v1/dotnet-hello">
|
||||
<Name>dotnet-hello</Name>
|
||||
<IsTool>True</IsTool>
|
||||
<IsApplicable>True</IsApplicable>
|
||||
<VersionPrefix>1.0.0</VersionPrefix>
|
||||
<VersionSuffix></VersionSuffix>
|
||||
<Clean>True</Clean>
|
||||
<Frameworks>netcoreapp1.0</Frameworks>
|
||||
</BaseTestPackageProject>
|
||||
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-hello/v2/dotnet-hello">
|
||||
<Name>dotnet-hello</Name>
|
||||
<IsTool>True</IsTool>
|
||||
<IsApplicable>True</IsApplicable>
|
||||
<VersionPrefix>2.0.0</VersionPrefix>
|
||||
<VersionSuffix></VersionSuffix>
|
||||
<Clean>True</Clean>
|
||||
<Frameworks>netcoreapp1.0</Frameworks>
|
||||
</BaseTestPackageProject>
|
||||
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-portable">
|
||||
<Name>dotnet-portable</Name>
|
||||
<IsTool>True</IsTool>
|
||||
<IsApplicable>True</IsApplicable>
|
||||
<VersionPrefix>1.0.0</VersionPrefix>
|
||||
<VersionSuffix></VersionSuffix>
|
||||
<Clean>True</Clean>
|
||||
<Frameworks>netcoreapp1.0</Frameworks>
|
||||
</BaseTestPackageProject>
|
||||
<BaseTestPackageProject Include="TestAssets/TestPackages/ToolWithOutputName">
|
||||
<Name>dotnet-tool-with-output-name</Name>
|
||||
<NuPkgName>ToolWithOutputName</NuPkgName>
|
||||
<IsTool>True</IsTool>
|
||||
<IsApplicable>True</IsApplicable>
|
||||
<VersionPrefix>1.0.0</VersionPrefix>
|
||||
<VersionSuffix></VersionSuffix>
|
||||
<Clean>True</Clean>
|
||||
<Frameworks>netcoreapp1.0</Frameworks>
|
||||
</BaseTestPackageProject>
|
||||
<BaseTestPackageProject Include="src/Microsoft.DotNet.Cli.Utils">
|
||||
<Name>Microsoft.DotNet.Cli.Utils</Name>
|
||||
<IsTool>True</IsTool>
|
||||
<IsApplicable>True</IsApplicable>
|
||||
<VersionPrefix>1.0.0-preview3-</VersionPrefix>
|
||||
<VersionSuffix>$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
||||
<Clean>False</Clean>
|
||||
<Frameworks>net451;netstandard1.6</Frameworks>
|
||||
</BaseTestPackageProject>
|
||||
<BaseTestPackageProject Include="src/Microsoft.DotNet.ProjectModel">
|
||||
<Name>Microsoft.DotNet.ProjectModel</Name>
|
||||
<IsTool>True</IsTool>
|
||||
<IsApplicable>True</IsApplicable>
|
||||
<VersionPrefix>1.0.0-rc4-</VersionPrefix>
|
||||
<VersionSuffix>$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
||||
<Clean>False</Clean>
|
||||
<Frameworks>net451;netstandard1.6</Frameworks>
|
||||
</BaseTestPackageProject>
|
||||
<BaseTestPackageProject Include="src/Microsoft.DotNet.ProjectModel.Loader">
|
||||
<Name>Microsoft.DotNet.ProjectModel.Loader</Name>
|
||||
<IsTool>True</IsTool>
|
||||
<IsApplicable>True</IsApplicable>
|
||||
<VersionPrefix>1.0.0-preview3-</VersionPrefix>
|
||||
<VersionSuffix>$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
||||
<Clean>False</Clean>
|
||||
<Frameworks>netstandard1.6</Frameworks>
|
||||
</BaseTestPackageProject>
|
||||
<BaseTestPackageProject Include="src/Microsoft.DotNet.ProjectModel.Workspaces">
|
||||
<Name>Microsoft.DotNet.ProjectModel.Workspaces</Name>
|
||||
<IsTool>True</IsTool>
|
||||
<IsApplicable>True</IsApplicable>
|
||||
<VersionPrefix>1.0.0-preview3-</VersionPrefix>
|
||||
<VersionSuffix>$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
||||
<Clean>False</Clean>
|
||||
<Frameworks>netstandard1.6</Frameworks>
|
||||
</BaseTestPackageProject>
|
||||
<BaseTestPackageProject Include="src/Microsoft.DotNet.InternalAbstractions">
|
||||
<Name>Microsoft.DotNet.InternalAbstractions</Name>
|
||||
<IsTool>True</IsTool>
|
||||
<IsApplicable>True</IsApplicable>
|
||||
<VersionPrefix>1.0.1-beta-</VersionPrefix>
|
||||
<VersionSuffix>$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
||||
<Clean>False</Clean>
|
||||
<Frameworks>net451;netstandard1.3</Frameworks>
|
||||
</BaseTestPackageProject>
|
||||
<BaseTestPackageProject Include="src/Microsoft.Extensions.Testing.Abstractions">
|
||||
<Name>Microsoft.Extensions.Testing.Abstractions</Name>
|
||||
<IsTool>True</IsTool>
|
||||
<IsApplicable>True</IsApplicable>
|
||||
<VersionPrefix>1.0.0-preview3-</VersionPrefix>
|
||||
<VersionSuffix>$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
||||
<Clean>False</Clean>
|
||||
<Frameworks>net451;netstandard1.6</Frameworks>
|
||||
</BaseTestPackageProject>
|
||||
<BaseTestPackageProject Include="src/Microsoft.DotNet.Compiler.Common">
|
||||
<Name>Microsoft.DotNet.Compiler.Common</Name>
|
||||
<IsTool>True</IsTool>
|
||||
<IsApplicable>True</IsApplicable>
|
||||
<VersionPrefix>1.0.0-preview3-</VersionPrefix>
|
||||
<VersionSuffix>$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
||||
<Clean>False</Clean>
|
||||
<Frameworks>netstandard1.6</Frameworks>
|
||||
</BaseTestPackageProject>
|
||||
<BaseTestPackageProject Include="src/Microsoft.DotNet.Files">
|
||||
<Name>Microsoft.DotNet.Files</Name>
|
||||
<IsTool>True</IsTool>
|
||||
<IsApplicable>True</IsApplicable>
|
||||
<VersionPrefix>1.0.0-preview3-</VersionPrefix>
|
||||
<VersionSuffix>$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
||||
<Clean>False</Clean>
|
||||
<Frameworks>netstandard1.6</Frameworks>
|
||||
</BaseTestPackageProject>
|
||||
<BaseTestPackageProject Include="src/dotnet-compile-fsc">
|
||||
<Name>dotnet-compile-fsc</Name>
|
||||
<IsTool>True</IsTool>
|
||||
<IsApplicable>True</IsApplicable>
|
||||
<VersionPrefix>1.0.0-preview3-</VersionPrefix>
|
||||
<VersionSuffix>$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
||||
<Clean>True</Clean>
|
||||
<Frameworks>netcoreapp1.0</Frameworks>
|
||||
</BaseTestPackageProject>
|
||||
|
||||
<TestPackageProjectFrameworksExcludes Condition=" '$(IsDesktopAvailable)' != 'True' " Include="net45" />
|
||||
<TestPackageProjectFrameworksExcludes Condition=" '$(IsDesktopAvailable)' != 'True' " Include="net451" />
|
||||
<TestPackageProjectFrameworks Include="%(BaseTestPackageProject.Frameworks)" Exclude="@(TestPackageProjectFrameworksExcludes)" />
|
||||
|
||||
<BaseTestPackageProject>
|
||||
<ProjectDir>$(RepoRoot)%(Identity)/</ProjectDir>
|
||||
<OutputPath>$(TestPackagesBuildDir)%(Identity)/bin/$(Configuration)/</OutputPath>
|
||||
</BaseTestPackageProject>
|
||||
|
||||
<BaseTestPackageProject>
|
||||
<ProjectPath>%(ProjectDir)project.json</ProjectPath>
|
||||
<BuildInputIncludeFilter>%(ProjectDir)**/*.*</BuildInputIncludeFilter>
|
||||
<BuildInputExcludeFilter>%(ProjectDir)bin/**/*.*;%(ProjectDir)obj/**/*.*</BuildInputExcludeFilter>
|
||||
</BaseTestPackageProject>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<ItemDefinitionGroup>
|
||||
<BaseTestPackageProject>
|
||||
<NuPkgName>%(Name)</NuPkgName>
|
||||
</BaseTestPackageProject>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
98
build/test/TestProjects.targets
Normal file
98
build/test/TestProjects.targets
Normal file
|
@ -0,0 +1,98 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Target Name="SetupTestProjectData"
|
||||
DependsOnTargets="AssociateTestInputFilesWithProject">
|
||||
</Target>
|
||||
|
||||
<Target Name="AssociateTestInputFilesWithProject"
|
||||
DependsOnTargets="IdentifyTestInputFilesForProject;"
|
||||
Outputs="%(TestProjects.ProjectPath)">
|
||||
<PropertyGroup>
|
||||
<CurrentProject>%(TestProjects.ProjectPath)</CurrentProject>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<TestProjects Condition=" '%(ProjectPath)' == '$(CurrentProject)' ">
|
||||
<BuildInputs>@(TestProjectInputs)</BuildInputs>
|
||||
</TestProjects>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="IdentifyTestInputFilesForProject"
|
||||
DependsOnTargets="SetupBuildTestProjectInputs;"
|
||||
Outputs="%(TestProjects.ProjectPath)">
|
||||
<ItemGroup>
|
||||
<TestProjectInputs Include="%(TestProjects.BuildInputIncludeFilter)"
|
||||
Exclude="%(TestProjects.BuildInputExcludeFilter)">
|
||||
<ProjectPath>%(TestProjects.ProjectPath)</ProjectPath>
|
||||
</TestProjectInputs>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="SetupBuildTestProjectInputs">
|
||||
<ItemGroup>
|
||||
<PreTestProjectsToExclude Condition=" '$(IsDesktopAvailable)' != 'True' "
|
||||
Include="test/binding-redirects.Tests/project.json;" />
|
||||
|
||||
<PreTestProjectsToExclude Condition=" 'https://github.com/dotnet/cli/issues/3864' != 'fixed' "
|
||||
Include="test$(PathSeparator)TestingAbstractions$(PathSeparator)Microsoft.Extensions.Testing.Abstractions.Tests$(PathSeparator)project.json;
|
||||
test$(PathSeparator)TestingAbstractions$(PathSeparator)Microsoft.Extensions.Testing.Abstractions.UnitTests$(PathSeparator)project.json;" />
|
||||
|
||||
<PreTestProjectsToExclude Condition=" 'https://github.com/dotnet/cli/issues/3558' != 'fixed' "
|
||||
Include="test$(PathSeparator)dotnet-compile-fsc.Tests$(PathSeparator)project.json" />
|
||||
|
||||
<PreTestProjectsToExclude Condition=" 'https://github.com/dotnet/cli/issues/3216' != 'fixed' "
|
||||
Include="test$(PathSeparator)Kestrel.Tests$(PathSeparator)project.json" />
|
||||
|
||||
<PreTestProjectsToExclude Condition=" 'https://github.com/dotnet/cli/issues/3865' != 'fixed' "
|
||||
Include="test$(PathSeparator)ScriptExecutorTests$(PathSeparator)project.json" />
|
||||
|
||||
<PreTestProjectsToExclude Condition=" 'Non-test projects in test directory' != 'consider moving elsewhere' "
|
||||
Include="test$(PathSeparator)ArgumentsReflector$(PathSeparator)project.json;
|
||||
test$(PathSeparator)Microsoft.DotNet.Tools.Tests.Utilities$(PathSeparator)project.json;
|
||||
test$(PathSeparator)TestingAbstractions$(PathSeparator)TestAppWithFullPdbs$(PathSeparator)project.json;
|
||||
test$(PathSeparator)TestingAbstractions$(PathSeparator)TestAppWithPortablePdbs$(PathSeparator)project.json" />
|
||||
|
||||
<PreTestProjectsToExclude Condition=" 'Executed after primary test phase.' != ' Consider moving.' "
|
||||
Include="test$(PathSeparator)Installer$(PathSeparator)Microsoft.DotNet.Cli.Msi.Tests$(PathSeparator)project.json;" />
|
||||
|
||||
<PreTestProjectsToExclude Include="test$(PathSeparator)**$(PathSeparator)bin$(PathSeparator)**$(PathSeparator)project.json" />
|
||||
|
||||
<!-- The current ResolveNuGetAssets target does not work on case-sensitive file systems. We need https://github.com/dotnet/sdk/pull/10 -->
|
||||
<PreTestProjectsToExclude Condition="'$(OSName)' != 'win' and '$(OSName)' != 'osx'"
|
||||
Include="test$(PathSeparator)dotnet-build3.Tests$(PathSeparator)project.json" />
|
||||
|
||||
<TestProjectsToExclude Include="%(PreTestProjectsToExclude.RelativeDir)project.json" />
|
||||
|
||||
<PreTestProjects Include="test$(PathSeparator)**$(PathSeparator)project.json;" />
|
||||
|
||||
<TestProjects Include="%(PreTestProjects.RelativeDir)project.json;"
|
||||
Exclude="@(TestProjectsToExclude)" />
|
||||
|
||||
<TestProjects>
|
||||
<BuildInputIncludeFilter>%(RelativeDir)**/*.*</BuildInputIncludeFilter>
|
||||
<BuildInputExcludeFilter>%(RelativeDir)bin/**/*.*;%(RelativeDir)obj/**/*.*</BuildInputExcludeFilter>
|
||||
<ProjectDir>$([System.IO.Directory]::GetParent(%(Identity)))</ProjectDir>
|
||||
<ProjectPath>%(Identity)</ProjectPath>
|
||||
<Framework>netcoreapp1.0</Framework>
|
||||
</TestProjects>
|
||||
|
||||
<TestProjects>
|
||||
<OutputName>$([System.IO.Path]::GetFileName(%(ProjectDir)))</OutputName>
|
||||
</TestProjects>
|
||||
|
||||
<TestProjects>
|
||||
<BuildOutput>$(RepoRoot)%(TestProjects.RelativeDir)bin/$(Configuration)/%(TestProjects.Framework)/%(TestProjects.OutputName).dll</BuildOutput>
|
||||
</TestProjects>
|
||||
|
||||
<TestProjects Condition=" '%(RelativeDir)' == 'test\binding-redirects.Tests\' ">
|
||||
<Framework>net451</Framework>
|
||||
</TestProjects>
|
||||
<TestProjects Condition=" '%(RelativeDir)' == 'test\Installer\Microsoft.DotNet.Cli.Msi.Tests\' ">
|
||||
<Framework>net46</Framework>
|
||||
</TestProjects>
|
||||
</ItemGroup>
|
||||
|
||||
<Message Text="%(TestProjects.Identity) %(TestProjects.RelativeDir) %(TestProjects.Framework)" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,52 +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.
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build.Framework
|
||||
{
|
||||
public static class AnsiColorExtensions
|
||||
{
|
||||
public static string Black(this string text)
|
||||
{
|
||||
return "\x1B[30m" + text + "\x1B[39m";
|
||||
}
|
||||
|
||||
public static string Red(this string text)
|
||||
{
|
||||
return "\x1B[31m" + text + "\x1B[39m";
|
||||
}
|
||||
public static string Green(this string text)
|
||||
{
|
||||
return "\x1B[32m" + text + "\x1B[39m";
|
||||
}
|
||||
|
||||
public static string Yellow(this string text)
|
||||
{
|
||||
return "\x1B[33m" + text + "\x1B[39m";
|
||||
}
|
||||
|
||||
public static string Blue(this string text)
|
||||
{
|
||||
return "\x1B[34m" + text + "\x1B[39m";
|
||||
}
|
||||
|
||||
public static string Magenta(this string text)
|
||||
{
|
||||
return "\x1B[35m" + text + "\x1B[39m";
|
||||
}
|
||||
|
||||
public static string Cyan(this string text)
|
||||
{
|
||||
return "\x1B[36m" + text + "\x1B[39m";
|
||||
}
|
||||
|
||||
public static string White(this string text)
|
||||
{
|
||||
return "\x1B[37m" + text + "\x1B[39m";
|
||||
}
|
||||
|
||||
public static string Bold(this string text)
|
||||
{
|
||||
return "\x1B[1m" + text + "\x1B[22m";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,145 +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.
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build.Framework
|
||||
{
|
||||
public class AnsiConsole
|
||||
{
|
||||
private AnsiConsole(TextWriter writer)
|
||||
{
|
||||
Writer = writer;
|
||||
|
||||
OriginalForegroundColor = Console.ForegroundColor;
|
||||
}
|
||||
|
||||
private int _boldRecursion;
|
||||
|
||||
public static AnsiConsole GetOutput()
|
||||
{
|
||||
return new AnsiConsole(Console.Out);
|
||||
}
|
||||
|
||||
public static AnsiConsole GetError()
|
||||
{
|
||||
return new AnsiConsole(Console.Error);
|
||||
}
|
||||
|
||||
public TextWriter Writer { get; }
|
||||
|
||||
public ConsoleColor OriginalForegroundColor { get; }
|
||||
|
||||
private void SetColor(ConsoleColor color)
|
||||
{
|
||||
const int Light = 0x08;
|
||||
int c = (int)color;
|
||||
|
||||
Console.ForegroundColor =
|
||||
c < 0 ? color : // unknown, just use it
|
||||
_boldRecursion > 0 ? (ConsoleColor)(c | Light) : // ensure color is light
|
||||
(ConsoleColor)(c & ~Light); // ensure color is dark
|
||||
}
|
||||
|
||||
private void SetBold(bool bold)
|
||||
{
|
||||
_boldRecursion += bold ? 1 : -1;
|
||||
if (_boldRecursion > 1 || (_boldRecursion == 1 && !bold))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// switches on _boldRecursion to handle boldness
|
||||
SetColor(Console.ForegroundColor);
|
||||
}
|
||||
|
||||
public void WriteLine(string message)
|
||||
{
|
||||
Write(message);
|
||||
Writer.WriteLine();
|
||||
}
|
||||
|
||||
|
||||
public void Write(string message)
|
||||
{
|
||||
var escapeScan = 0;
|
||||
for (;;)
|
||||
{
|
||||
var escapeIndex = message.IndexOf("\x1b[", escapeScan, StringComparison.Ordinal);
|
||||
if (escapeIndex == -1)
|
||||
{
|
||||
var text = message.Substring(escapeScan);
|
||||
Writer.Write(text);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
var startIndex = escapeIndex + 2;
|
||||
var endIndex = startIndex;
|
||||
while (endIndex != message.Length &&
|
||||
message[endIndex] >= 0x20 &&
|
||||
message[endIndex] <= 0x3f)
|
||||
{
|
||||
endIndex += 1;
|
||||
}
|
||||
|
||||
var text = message.Substring(escapeScan, escapeIndex - escapeScan);
|
||||
Writer.Write(text);
|
||||
if (endIndex == message.Length)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
switch (message[endIndex])
|
||||
{
|
||||
case 'm':
|
||||
int value;
|
||||
if (int.TryParse(message.Substring(startIndex, endIndex - startIndex), out value))
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 1:
|
||||
SetBold(true);
|
||||
break;
|
||||
case 22:
|
||||
SetBold(false);
|
||||
break;
|
||||
case 30:
|
||||
SetColor(ConsoleColor.Black);
|
||||
break;
|
||||
case 31:
|
||||
SetColor(ConsoleColor.Red);
|
||||
break;
|
||||
case 32:
|
||||
SetColor(ConsoleColor.Green);
|
||||
break;
|
||||
case 33:
|
||||
SetColor(ConsoleColor.Yellow);
|
||||
break;
|
||||
case 34:
|
||||
SetColor(ConsoleColor.Blue);
|
||||
break;
|
||||
case 35:
|
||||
SetColor(ConsoleColor.Magenta);
|
||||
break;
|
||||
case 36:
|
||||
SetColor(ConsoleColor.Cyan);
|
||||
break;
|
||||
case 37:
|
||||
SetColor(ConsoleColor.Gray);
|
||||
break;
|
||||
case 39:
|
||||
Console.ForegroundColor = OriginalForegroundColor;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
escapeScan = endIndex + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,206 +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.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build.Framework
|
||||
{
|
||||
public static class ArgumentEscaper
|
||||
{
|
||||
/// <summary>
|
||||
/// Undo the processing which took place to create string[] args in Main,
|
||||
/// so that the next process will receive the same string[] args
|
||||
///
|
||||
/// See here for more info:
|
||||
/// http://blogs.msdn.com/b/twistylittlepassagesallalike/archive/2011/04/23/everyone-quotes-arguments-the-wrong-way.aspx
|
||||
/// </summary>
|
||||
/// <param name="args"></param>
|
||||
/// <returns></returns>
|
||||
public static string EscapeAndConcatenateArgArrayForProcessStart(IEnumerable<string> args)
|
||||
{
|
||||
return string.Join(" ", EscapeArgArray(args));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Undo the processing which took place to create string[] args in Main,
|
||||
/// so that the next process will receive the same string[] args
|
||||
///
|
||||
/// See here for more info:
|
||||
/// http://blogs.msdn.com/b/twistylittlepassagesallalike/archive/2011/04/23/everyone-quotes-arguments-the-wrong-way.aspx
|
||||
/// </summary>
|
||||
/// <param name="args"></param>
|
||||
/// <returns></returns>
|
||||
public static string EscapeAndConcatenateArgArrayForCmdProcessStart(IEnumerable<string> args)
|
||||
{
|
||||
return string.Join(" ", EscapeArgArrayForCmd(args));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Undo the processing which took place to create string[] args in Main,
|
||||
/// so that the next process will receive the same string[] args
|
||||
///
|
||||
/// See here for more info:
|
||||
/// http://blogs.msdn.com/b/twistylittlepassagesallalike/archive/2011/04/23/everyone-quotes-arguments-the-wrong-way.aspx
|
||||
/// </summary>
|
||||
/// <param name="args"></param>
|
||||
/// <returns></returns>
|
||||
private static IEnumerable<string> EscapeArgArray(IEnumerable<string> args)
|
||||
{
|
||||
var escapedArgs = new List<string>();
|
||||
|
||||
foreach (var arg in args)
|
||||
{
|
||||
escapedArgs.Add(EscapeArg(arg));
|
||||
}
|
||||
|
||||
return escapedArgs;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This prefixes every character with the '^' character to force cmd to
|
||||
/// interpret the argument string literally. An alternative option would
|
||||
/// be to do this only for cmd metacharacters.
|
||||
///
|
||||
/// See here for more info:
|
||||
/// http://blogs.msdn.com/b/twistylittlepassagesallalike/archive/2011/04/23/everyone-quotes-arguments-the-wrong-way.aspx
|
||||
/// </summary>
|
||||
/// <param name="args"></param>
|
||||
/// <returns></returns>
|
||||
private static IEnumerable<string> EscapeArgArrayForCmd(IEnumerable<string> arguments)
|
||||
{
|
||||
var escapedArgs = new List<string>();
|
||||
|
||||
foreach (var arg in arguments)
|
||||
{
|
||||
escapedArgs.Add(EscapeArgForCmd(arg));
|
||||
}
|
||||
|
||||
return escapedArgs;
|
||||
}
|
||||
|
||||
private static string EscapeArg(string arg)
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
|
||||
var quoted = ShouldSurroundWithQuotes(arg);
|
||||
if (quoted) sb.Append("\"");
|
||||
|
||||
for (int i = 0; i < arg.Length; ++i)
|
||||
{
|
||||
var backslashCount = 0;
|
||||
|
||||
// Consume All Backslashes
|
||||
while (i < arg.Length && arg[i] == '\\')
|
||||
{
|
||||
backslashCount++;
|
||||
i++;
|
||||
}
|
||||
|
||||
// Escape any backslashes at the end of the arg
|
||||
// This ensures the outside quote is interpreted as
|
||||
// an argument delimiter
|
||||
if (i == arg.Length)
|
||||
{
|
||||
sb.Append('\\', 2 * backslashCount);
|
||||
}
|
||||
|
||||
// Escape any preceding backslashes and the quote
|
||||
else if (arg[i] == '"')
|
||||
{
|
||||
sb.Append('\\', (2 * backslashCount) + 1);
|
||||
sb.Append('"');
|
||||
}
|
||||
|
||||
// Output any consumed backslashes and the character
|
||||
else
|
||||
{
|
||||
sb.Append('\\', backslashCount);
|
||||
sb.Append(arg[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if (quoted) sb.Append("\"");
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Prepare as single argument to
|
||||
/// roundtrip properly through cmd.
|
||||
///
|
||||
/// This prefixes every character with the '^' character to force cmd to
|
||||
/// interpret the argument string literally. An alternative option would
|
||||
/// be to do this only for cmd metacharacters.
|
||||
///
|
||||
/// See here for more info:
|
||||
/// http://blogs.msdn.com/b/twistylittlepassagesallalike/archive/2011/04/23/everyone-quotes-arguments-the-wrong-way.aspx
|
||||
/// </summary>
|
||||
/// <param name="args"></param>
|
||||
/// <returns></returns>
|
||||
private static string EscapeArgForCmd(string argument)
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
|
||||
var quoted = ShouldSurroundWithQuotes(argument);
|
||||
|
||||
if (quoted) sb.Append("^\"");
|
||||
|
||||
foreach (var character in argument)
|
||||
{
|
||||
|
||||
if (character == '"')
|
||||
{
|
||||
|
||||
sb.Append('^');
|
||||
sb.Append('"');
|
||||
sb.Append('^');
|
||||
sb.Append(character);
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append("^");
|
||||
sb.Append(character);
|
||||
}
|
||||
}
|
||||
|
||||
if (quoted) sb.Append("^\"");
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Prepare as single argument to
|
||||
/// roundtrip properly through cmd.
|
||||
///
|
||||
/// This prefixes every character with the '^' character to force cmd to
|
||||
/// interpret the argument string literally. An alternative option would
|
||||
/// be to do this only for cmd metacharacters.
|
||||
///
|
||||
/// See here for more info:
|
||||
/// http://blogs.msdn.com/b/twistylittlepassagesallalike/archive/2011/04/23/everyone-quotes-arguments-the-wrong-way.aspx
|
||||
/// </summary>
|
||||
/// <param name="args"></param>
|
||||
/// <returns></returns>
|
||||
internal static bool ShouldSurroundWithQuotes(string argument)
|
||||
{
|
||||
// Don't quote already quoted strings
|
||||
if (argument.StartsWith("\"", StringComparison.Ordinal) &&
|
||||
argument.EndsWith("\"", StringComparison.Ordinal))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Only quote if whitespace exists in the string
|
||||
if (argument.Contains(" ") || argument.Contains("\t") || argument.Contains("\n"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,177 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build.Framework
|
||||
{
|
||||
public class BuildContext
|
||||
{
|
||||
private IDictionary<string, BuildTargetResult> _completedTargets = new Dictionary<string, BuildTargetResult>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
public static readonly string DefaultTarget = "Default";
|
||||
|
||||
private int _maxTargetLen;
|
||||
private Stack<string> _targetStack = new Stack<string>();
|
||||
|
||||
public IDictionary<string, BuildTarget> Targets { get; }
|
||||
|
||||
public IDictionary<string, object> Properties = new Dictionary<string, object>();
|
||||
|
||||
public string BuildDirectory { get; }
|
||||
|
||||
public object this[string name]
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Properties.ContainsKey(name))
|
||||
{
|
||||
return Properties[name];
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new KeyNotFoundException("No property with key " + name + " was found.");
|
||||
}
|
||||
}
|
||||
set { Properties[name] = value; }
|
||||
}
|
||||
|
||||
public BuildContext(IDictionary<string, BuildTarget> targets, string buildDirectory)
|
||||
{
|
||||
Targets = targets;
|
||||
BuildDirectory = buildDirectory;
|
||||
_maxTargetLen = targets.Values.Select(t => t.Name.Length).Max();
|
||||
}
|
||||
|
||||
public T Get<T>(string name) => (T)this[name];
|
||||
|
||||
public BuildTargetResult RunTarget(string name) => RunTarget(name, force: false);
|
||||
|
||||
public BuildTargetResult RunTarget(string name, bool force)
|
||||
{
|
||||
BuildTarget target;
|
||||
if (!Targets.TryGetValue(name, out target))
|
||||
{
|
||||
throw new UndefinedTargetException($"Undefined target: {name}");
|
||||
}
|
||||
|
||||
if (!EvaluateTargetConditions(target))
|
||||
{
|
||||
Reporter.Verbose.WriteLine($"Skipping, Target Conditions not met: {target.Name}");
|
||||
return new BuildTargetResult(target, success: true);
|
||||
}
|
||||
|
||||
// Check if it's been completed
|
||||
BuildTargetResult result;
|
||||
if (!force && _completedTargets.TryGetValue(name, out result))
|
||||
{
|
||||
Reporter.Verbose.WriteLine($"Skipping completed target: {target.Name}");
|
||||
return result;
|
||||
}
|
||||
|
||||
// It hasn't, or we're forcing, so run it
|
||||
result = ExecTarget(target);
|
||||
_completedTargets[target.Name] = result;
|
||||
return result;
|
||||
}
|
||||
|
||||
public void Verbose(string message)
|
||||
{
|
||||
Reporter.Output.WriteLine("trace".White() + $": {message}");
|
||||
}
|
||||
|
||||
public void Info(string message)
|
||||
{
|
||||
Reporter.Output.WriteLine("info ".Green() + $": {message}");
|
||||
}
|
||||
|
||||
public void Warn(string message)
|
||||
{
|
||||
Reporter.Output.WriteLine("warn ".Yellow() + $": {message}");
|
||||
}
|
||||
|
||||
public void Error(string message)
|
||||
{
|
||||
Reporter.Error.WriteLine("error".Red().Bold() + $": {message}");
|
||||
}
|
||||
|
||||
private bool EvaluateTargetConditions(BuildTarget target)
|
||||
{
|
||||
if (target == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(target));
|
||||
}
|
||||
|
||||
if (target.Conditions == null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
foreach (var condition in target.Conditions)
|
||||
{
|
||||
if (!condition())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private BuildTargetResult ExecTarget(BuildTarget target)
|
||||
{
|
||||
if (target == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(target));
|
||||
}
|
||||
|
||||
var sectionName = $"{target.Name.PadRight(_maxTargetLen + 2).Yellow()} ({target.Source.White()})";
|
||||
BuildReporter.BeginSection("TARGET", sectionName);
|
||||
|
||||
BuildTargetResult result;
|
||||
|
||||
// Run the dependencies
|
||||
var dependencyResults = new Dictionary<string, BuildTargetResult>();
|
||||
var failedDependencyResult = RunDependencies(target, dependencyResults);
|
||||
if (failedDependencyResult != null)
|
||||
{
|
||||
result = failedDependencyResult;
|
||||
}
|
||||
else if (target.Body != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
result = target.Body(new BuildTargetContext(this, target, dependencyResults));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result = new BuildTargetResult(target, success: false, exception: ex);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result = new BuildTargetResult(target, success: true);
|
||||
}
|
||||
BuildReporter.EndSection("TARGET", sectionName, result.Success);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private BuildTargetResult RunDependencies(BuildTarget target, Dictionary<string, BuildTargetResult> dependencyResults)
|
||||
{
|
||||
BuildTargetResult result = null;
|
||||
foreach (var dependency in target.Dependencies)
|
||||
{
|
||||
result = RunTarget(dependency);
|
||||
dependencyResults[dependency] = result;
|
||||
|
||||
if (!result.Success)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
using System;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build.Framework
|
||||
{
|
||||
public class BuildFailureException : Exception
|
||||
{
|
||||
public BuildTarget Target { get; }
|
||||
|
||||
public BuildFailureException()
|
||||
{
|
||||
}
|
||||
|
||||
public BuildFailureException(BuildTarget target) : base($"The '{target.Name}' target failed")
|
||||
{
|
||||
Target = target;
|
||||
}
|
||||
|
||||
public BuildFailureException(BuildTarget target, Exception innerException) : base($"The '{target.Name}' target failed", innerException)
|
||||
{
|
||||
Target = target;
|
||||
}
|
||||
|
||||
public BuildFailureException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
|
||||
public BuildFailureException(string message, BuildTarget target) : base(message)
|
||||
{
|
||||
Target = target;
|
||||
}
|
||||
|
||||
public BuildFailureException(string message, Exception innerException) : base(message, innerException)
|
||||
{
|
||||
}
|
||||
|
||||
public BuildFailureException(string message, Exception innerException, BuildTarget target) : base(message, innerException)
|
||||
{
|
||||
Target = target;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build.Framework
|
||||
{
|
||||
public static class BuildHelpers
|
||||
{
|
||||
public static int ExecInSilent(string workingDirectory, string command, params string[] args) => ExecInSilent(workingDirectory, command, (IEnumerable<string>)args);
|
||||
public static int ExecInSilent(string workingDirectory, string command, IEnumerable<string> args) => ExecCore(command, args, workingDirectory, silent: true, env: null);
|
||||
|
||||
public static int ExecIn(string workingDirectory, string command, params string[] args) => ExecIn(workingDirectory, command, (IEnumerable<string>)args);
|
||||
public static int ExecIn(string workingDirectory, string command, IEnumerable<string> args) => ExecCore(command, args, workingDirectory, silent: false, env: null);
|
||||
|
||||
public static int ExecSilent(string command, params string[] args) => ExecSilent(command, (IEnumerable<string>)args);
|
||||
public static int ExecSilent(string command, IEnumerable<string> args) => ExecSilent(command, args, env: null);
|
||||
public static int ExecSilent(string command, IEnumerable<string> args, IDictionary<string, string> env) => ExecCore(command, args, workingDirectory: null, silent: true, env: env);
|
||||
|
||||
public static int Exec(string command, params string[] args) => Exec(command, (IEnumerable<string>)args);
|
||||
public static int Exec(string command, IEnumerable<string> args) => ExecCore(command, args, workingDirectory: null, silent: false, env: null);
|
||||
|
||||
public static Command Cmd(string command, params string[] args) => Cmd(command, (IEnumerable<string>)args);
|
||||
public static Command Cmd(string command, IEnumerable<string> args)
|
||||
{
|
||||
return Command.Create(command, args);
|
||||
}
|
||||
|
||||
internal static int ExecCore(string command, IEnumerable<string> args, string workingDirectory, bool silent, IDictionary<string, string> env)
|
||||
{
|
||||
var cmd = Cmd(command, args);
|
||||
if (!string.IsNullOrEmpty(workingDirectory))
|
||||
{
|
||||
cmd.WorkingDirectory(workingDirectory);
|
||||
}
|
||||
|
||||
if (silent)
|
||||
{
|
||||
cmd.CaptureStdErr().CaptureStdOut();
|
||||
}
|
||||
|
||||
var result = cmd.Environment(env).Execute();
|
||||
|
||||
result.EnsureSuccessful();
|
||||
return result.ExitCode;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
using System;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build.Framework
|
||||
{
|
||||
public static class BuildReporter
|
||||
{
|
||||
private const string TimeSpanFormat = @"hh\:mm\:ss\.fff";
|
||||
private static DateTime _initialTime = DateTime.Now;
|
||||
|
||||
public static void BeginSection(string type, string name)
|
||||
{
|
||||
Reporter.Output.WriteLine($"[{type.PadRight(10)} >]".Green() + $" [....] [{(DateTime.Now - _initialTime).ToString(TimeSpanFormat)}]".Blue() + $" {name}");
|
||||
}
|
||||
|
||||
public static void EndSection(string type, string name, bool success)
|
||||
{
|
||||
var header = $"[{type.PadRight(10)} <]";
|
||||
if(success)
|
||||
{
|
||||
header = header.Green();
|
||||
}
|
||||
else
|
||||
{
|
||||
header = header.Red();
|
||||
}
|
||||
var successString = success ? " OK " : "FAIL";
|
||||
Reporter.Output.WriteLine(header + $" [{successString}] [{(DateTime.Now - _initialTime).ToString(TimeSpanFormat)}]".Blue() + $" {name}");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,168 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build.Framework
|
||||
{
|
||||
public class BuildSetup
|
||||
{
|
||||
private Dictionary<string, BuildTarget> _targets = new Dictionary<string, BuildTarget>();
|
||||
|
||||
public IList<TargetOverride> _overrides = new List<TargetOverride>();
|
||||
|
||||
public string ProductName { get; }
|
||||
|
||||
public BuildSetup(string productName)
|
||||
{
|
||||
ProductName = productName;
|
||||
}
|
||||
|
||||
public static BuildSetup Create(string productName)
|
||||
{
|
||||
return new BuildSetup(productName);
|
||||
}
|
||||
|
||||
public BuildSetup UseTargets(IEnumerable<BuildTarget> targets)
|
||||
{
|
||||
foreach (var target in targets)
|
||||
{
|
||||
BuildTarget previousTarget;
|
||||
if (_targets.TryGetValue(target.Name, out previousTarget))
|
||||
{
|
||||
_overrides.Add(new TargetOverride(target.Name, previousTarget.Source, target.Source));
|
||||
}
|
||||
_targets[target.Name] = target;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public BuildSetup UseAllTargetsFromAssembly<T>()
|
||||
{
|
||||
var asm = typeof(T).GetTypeInfo().Assembly;
|
||||
return UseTargets(asm.GetExportedTypes().SelectMany(t => CollectTargets(t)));
|
||||
}
|
||||
|
||||
public BuildSetup UseTargetsFrom<T>()
|
||||
{
|
||||
return UseTargets(CollectTargets(typeof(T)));
|
||||
}
|
||||
|
||||
public int Run(string[] args)
|
||||
{
|
||||
var targets = new[] { BuildContext.DefaultTarget };
|
||||
if(args.Length > 0)
|
||||
{
|
||||
targets = args;
|
||||
}
|
||||
|
||||
Reporter.Output.WriteBanner($"Building {ProductName}");
|
||||
|
||||
if (_overrides.Any())
|
||||
{
|
||||
foreach (var targetOverride in _overrides)
|
||||
{
|
||||
Reporter.Verbose.WriteLine($"Target {targetOverride.Name} from {targetOverride.OriginalSource} was overridden in {targetOverride.OverrideSource}");
|
||||
}
|
||||
}
|
||||
|
||||
var context = new BuildContext(_targets, Directory.GetCurrentDirectory());
|
||||
BuildTargetResult result = null;
|
||||
try
|
||||
{
|
||||
foreach (var target in targets)
|
||||
{
|
||||
result = context.RunTarget(target);
|
||||
if(!result.Success)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Reporter.Error.WriteLine(ex.ToString().Red());
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(result != null && !result.Success)
|
||||
{
|
||||
Reporter.Error.WriteLine($"Build failed: {result.ErrorMessage}".Red());
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
Reporter.Output.WriteLine("Build succeeded".Green());
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
private static IEnumerable<BuildTarget> CollectTargets(Type typ)
|
||||
{
|
||||
return from m in typ.GetMethods()
|
||||
let targetAttribute = m.GetCustomAttribute<TargetAttribute>()
|
||||
let conditionalAttributes = m.GetCustomAttributes<TargetConditionAttribute>(false)
|
||||
where targetAttribute != null
|
||||
select CreateTarget(m, targetAttribute, conditionalAttributes);
|
||||
}
|
||||
|
||||
private static BuildTarget CreateTarget(
|
||||
MethodInfo methodInfo,
|
||||
TargetAttribute targetAttribute,
|
||||
IEnumerable<TargetConditionAttribute> targetConditionAttributes)
|
||||
{
|
||||
var name = targetAttribute.Name ?? methodInfo.Name;
|
||||
|
||||
var conditions = ExtractTargetConditionsFromAttributes(targetConditionAttributes);
|
||||
|
||||
return new BuildTarget(
|
||||
name,
|
||||
$"{methodInfo.DeclaringType.FullName}.{methodInfo.Name}",
|
||||
targetAttribute.Dependencies,
|
||||
conditions,
|
||||
(Func<BuildTargetContext, BuildTargetResult>)methodInfo.CreateDelegate(typeof(Func<BuildTargetContext, BuildTargetResult>)));
|
||||
}
|
||||
|
||||
private static IEnumerable<Func<bool>> ExtractTargetConditionsFromAttributes(
|
||||
IEnumerable<TargetConditionAttribute> targetConditionAttributes)
|
||||
{
|
||||
if (targetConditionAttributes == null || targetConditionAttributes.Count() == 0)
|
||||
{
|
||||
return Enumerable.Empty<Func<bool>>();
|
||||
}
|
||||
|
||||
return targetConditionAttributes
|
||||
.Select<TargetConditionAttribute, Func<bool>>(c => c.EvaluateCondition)
|
||||
.ToArray();
|
||||
}
|
||||
|
||||
private string GenerateSourceString(string file, int? line, string member)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(file) && line != null)
|
||||
{
|
||||
return $"{file}:{line}";
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(member))
|
||||
{
|
||||
return member;
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
public class TargetOverride
|
||||
{
|
||||
public string Name { get; }
|
||||
public string OriginalSource { get; }
|
||||
public string OverrideSource { get; }
|
||||
|
||||
public TargetOverride(string name, string originalSource, string overrideSource)
|
||||
{
|
||||
Name = name;
|
||||
OriginalSource = originalSource;
|
||||
OverrideSource = overrideSource;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build.Framework
|
||||
{
|
||||
public class BuildTarget
|
||||
{
|
||||
public string Name { get; }
|
||||
public string Source { get; }
|
||||
public IEnumerable<string> Dependencies { get; }
|
||||
public IEnumerable<Func<bool>> Conditions { get; }
|
||||
public Func<BuildTargetContext, BuildTargetResult> Body { get; }
|
||||
|
||||
public BuildTarget(string name, string source) : this(name, source, Enumerable.Empty<string>(), Enumerable.Empty<Func<bool>>(), null) { }
|
||||
public BuildTarget(string name, string source, IEnumerable<string> dependencies) : this(name, source, dependencies, Enumerable.Empty<Func<bool>>(), null) { }
|
||||
public BuildTarget(
|
||||
string name,
|
||||
string source,
|
||||
IEnumerable<string> dependencies,
|
||||
IEnumerable<Func<bool>> conditions,
|
||||
Func<BuildTargetContext, BuildTargetResult> body)
|
||||
{
|
||||
Name = name;
|
||||
Source = source;
|
||||
Dependencies = dependencies;
|
||||
Conditions = conditions;
|
||||
Body = body;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build.Framework
|
||||
{
|
||||
public class BuildTargetContext
|
||||
{
|
||||
private IDictionary<string, BuildTargetResult> _dependencyResults;
|
||||
|
||||
public BuildContext BuildContext { get; }
|
||||
public BuildTarget Target { get; }
|
||||
|
||||
public BuildTargetContext(BuildContext buildContext, BuildTarget target, IDictionary<string, BuildTargetResult> dependencyResults)
|
||||
{
|
||||
BuildContext = buildContext;
|
||||
Target = target;
|
||||
_dependencyResults = dependencyResults;
|
||||
}
|
||||
|
||||
public BuildTargetResult Success()
|
||||
{
|
||||
return new BuildTargetResult(Target, success: true);
|
||||
}
|
||||
|
||||
public BuildTargetResult Failed() => Failed(errorMessage: string.Empty);
|
||||
|
||||
public BuildTargetResult Failed(string errorMessage)
|
||||
{
|
||||
return new BuildTargetResult(Target, success: false, errorMessage: errorMessage);
|
||||
}
|
||||
|
||||
public void Info(string message) => BuildContext.Info(message);
|
||||
public void Warn(string message) => BuildContext.Warn(message);
|
||||
public void Error(string message) => BuildContext.Error(message);
|
||||
public void Verbose(string message) => BuildContext.Verbose(message);
|
||||
}
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
using System;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build.Framework
|
||||
{
|
||||
public class BuildTargetResult
|
||||
{
|
||||
public BuildTarget Target { get; }
|
||||
public bool Success { get; }
|
||||
public string ErrorMessage { get; }
|
||||
public Exception Exception { get; }
|
||||
|
||||
public BuildTargetResult(BuildTarget target, bool success) : this(target, success, errorMessage: string.Empty) { }
|
||||
|
||||
public BuildTargetResult(BuildTarget target, bool success, Exception exception) : this(target, success, exception.ToString())
|
||||
{
|
||||
Exception = exception;
|
||||
}
|
||||
|
||||
public BuildTargetResult(BuildTarget target, bool success, string errorMessage)
|
||||
{
|
||||
Target = target;
|
||||
Success = success;
|
||||
ErrorMessage = errorMessage;
|
||||
}
|
||||
|
||||
public void EnsureSuccessful()
|
||||
{
|
||||
if(!Success)
|
||||
{
|
||||
if(string.IsNullOrEmpty(ErrorMessage))
|
||||
{
|
||||
throw new BuildFailureException(Target, Exception);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new BuildFailureException(ErrorMessage, Exception, Target);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,364 +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.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build.Framework
|
||||
{
|
||||
public class Command
|
||||
{
|
||||
private Process _process;
|
||||
|
||||
private StringWriter _stdOutCapture;
|
||||
private StringWriter _stdErrCapture;
|
||||
|
||||
private Action<string> _stdOutForward;
|
||||
private Action<string> _stdErrForward;
|
||||
|
||||
private Action<string> _stdOutHandler;
|
||||
private Action<string> _stdErrHandler;
|
||||
|
||||
private bool _running = false;
|
||||
private bool _quietBuildReporter = false;
|
||||
|
||||
private Command(string executable, string args)
|
||||
{
|
||||
// Set the things we need
|
||||
var psi = new ProcessStartInfo()
|
||||
{
|
||||
FileName = executable,
|
||||
Arguments = args
|
||||
};
|
||||
|
||||
_process = new Process()
|
||||
{
|
||||
StartInfo = psi
|
||||
};
|
||||
}
|
||||
|
||||
public static Command Create(string executable, params string[] args)
|
||||
{
|
||||
return Create(executable, ArgumentEscaper.EscapeAndConcatenateArgArrayForProcessStart(args));
|
||||
}
|
||||
|
||||
public static Command Create(string executable, IEnumerable<string> args)
|
||||
{
|
||||
return Create(executable, ArgumentEscaper.EscapeAndConcatenateArgArrayForProcessStart(args));
|
||||
}
|
||||
|
||||
public static Command Create(string executable, string args)
|
||||
{
|
||||
ResolveExecutablePath(ref executable, ref args);
|
||||
|
||||
return new Command(executable, args);
|
||||
}
|
||||
|
||||
private static void ResolveExecutablePath(ref string executable, ref string args)
|
||||
{
|
||||
foreach (string suffix in Constants.RunnableSuffixes)
|
||||
{
|
||||
var fullExecutable = Path.GetFullPath(Path.Combine(
|
||||
AppContext.BaseDirectory, executable + suffix));
|
||||
|
||||
if (File.Exists(fullExecutable))
|
||||
{
|
||||
executable = fullExecutable;
|
||||
|
||||
// In priority order we've found the best runnable extension, so break.
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// On Windows, we want to avoid using "cmd" if possible (it mangles the colors, and a bunch of other things)
|
||||
// So, do a quick path search to see if we can just directly invoke it
|
||||
var useCmd = ShouldUseCmd(executable);
|
||||
|
||||
if (useCmd)
|
||||
{
|
||||
var comSpec = System.Environment.GetEnvironmentVariable("ComSpec");
|
||||
|
||||
// cmd doesn't like "foo.exe ", so we need to ensure that if
|
||||
// args is empty, we just run "foo.exe"
|
||||
if (!string.IsNullOrEmpty(args))
|
||||
{
|
||||
executable = (executable + " " + args).Replace("\"", "\\\"");
|
||||
}
|
||||
args = $"/C \"{executable}\"";
|
||||
executable = comSpec;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool ShouldUseCmd(string executable)
|
||||
{
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
var extension = Path.GetExtension(executable);
|
||||
if (!string.IsNullOrEmpty(extension))
|
||||
{
|
||||
return !string.Equals(extension, ".exe", StringComparison.Ordinal);
|
||||
}
|
||||
else if (executable.Contains(Path.DirectorySeparatorChar))
|
||||
{
|
||||
// It's a relative path without an extension
|
||||
if (File.Exists(executable + ".exe"))
|
||||
{
|
||||
// It refers to an exe!
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Search the path to see if we can find it
|
||||
foreach (var path in System.Environment.GetEnvironmentVariable("PATH").Split(Path.PathSeparator))
|
||||
{
|
||||
var candidate = Path.Combine(path, executable + ".exe");
|
||||
if (File.Exists(candidate))
|
||||
{
|
||||
// We found an exe!
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// It's a non-exe :(
|
||||
return true;
|
||||
}
|
||||
|
||||
// Non-windows never uses cmd
|
||||
return false;
|
||||
}
|
||||
|
||||
public Command Environment(IDictionary<string, string> env)
|
||||
{
|
||||
if (env == null)
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
foreach (var item in env)
|
||||
{
|
||||
_process.StartInfo.Environment[item.Key] = item.Value;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public Command Environment(string key, string value)
|
||||
{
|
||||
_process.StartInfo.Environment[key] = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Command QuietBuildReporter()
|
||||
{
|
||||
_quietBuildReporter = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CommandResult Execute()
|
||||
{
|
||||
ThrowIfRunning();
|
||||
_running = true;
|
||||
|
||||
if (_process.StartInfo.RedirectStandardOutput)
|
||||
{
|
||||
_process.OutputDataReceived += (sender, args) =>
|
||||
{
|
||||
ProcessData(args.Data, _stdOutCapture, _stdOutForward, _stdOutHandler);
|
||||
};
|
||||
}
|
||||
|
||||
if (_process.StartInfo.RedirectStandardError)
|
||||
{
|
||||
_process.ErrorDataReceived += (sender, args) =>
|
||||
{
|
||||
ProcessData(args.Data, _stdErrCapture, _stdErrForward, _stdErrHandler);
|
||||
};
|
||||
}
|
||||
|
||||
_process.EnableRaisingEvents = true;
|
||||
|
||||
var sw = Stopwatch.StartNew();
|
||||
ReportExecBegin();
|
||||
|
||||
_process.Start();
|
||||
|
||||
if (_process.StartInfo.RedirectStandardOutput)
|
||||
{
|
||||
_process.BeginOutputReadLine();
|
||||
}
|
||||
|
||||
if (_process.StartInfo.RedirectStandardError)
|
||||
{
|
||||
_process.BeginErrorReadLine();
|
||||
}
|
||||
|
||||
_process.WaitForExit();
|
||||
|
||||
var exitCode = _process.ExitCode;
|
||||
|
||||
ReportExecEnd(exitCode);
|
||||
|
||||
return new CommandResult(
|
||||
_process.StartInfo,
|
||||
exitCode,
|
||||
_stdOutCapture?.GetStringBuilder()?.ToString(),
|
||||
_stdErrCapture?.GetStringBuilder()?.ToString());
|
||||
}
|
||||
|
||||
public Command WorkingDirectory(string projectDirectory)
|
||||
{
|
||||
_process.StartInfo.WorkingDirectory = projectDirectory;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Command EnvironmentVariable(string name, string value)
|
||||
{
|
||||
_process.StartInfo.Environment[name] = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Command CaptureStdOut()
|
||||
{
|
||||
ThrowIfRunning();
|
||||
_process.StartInfo.RedirectStandardOutput = true;
|
||||
_stdOutCapture = new StringWriter();
|
||||
return this;
|
||||
}
|
||||
|
||||
public Command CaptureStdErr()
|
||||
{
|
||||
ThrowIfRunning();
|
||||
_process.StartInfo.RedirectStandardError = true;
|
||||
_stdErrCapture = new StringWriter();
|
||||
return this;
|
||||
}
|
||||
|
||||
public Command ForwardStdOut(TextWriter to = null)
|
||||
{
|
||||
ThrowIfRunning();
|
||||
_process.StartInfo.RedirectStandardOutput = true;
|
||||
if (to == null)
|
||||
{
|
||||
_stdOutForward = Reporter.Output.WriteLine;
|
||||
}
|
||||
else
|
||||
{
|
||||
_stdOutForward = to.WriteLine;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public Command ForwardStdErr(TextWriter to = null)
|
||||
{
|
||||
ThrowIfRunning();
|
||||
_process.StartInfo.RedirectStandardError = true;
|
||||
if (to == null)
|
||||
{
|
||||
_stdErrForward = Reporter.Error.WriteLine;
|
||||
}
|
||||
else
|
||||
{
|
||||
_stdErrForward = to.WriteLine;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public Command OnOutputLine(Action<string> handler)
|
||||
{
|
||||
ThrowIfRunning();
|
||||
_process.StartInfo.RedirectStandardOutput = true;
|
||||
if (_stdOutHandler != null)
|
||||
{
|
||||
throw new InvalidOperationException("Already handling stdout!");
|
||||
}
|
||||
_stdOutHandler = handler;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Command OnErrorLine(Action<string> handler)
|
||||
{
|
||||
ThrowIfRunning();
|
||||
_process.StartInfo.RedirectStandardError = true;
|
||||
if (_stdErrHandler != null)
|
||||
{
|
||||
throw new InvalidOperationException("Already handling stderr!");
|
||||
}
|
||||
_stdErrHandler = handler;
|
||||
return this;
|
||||
}
|
||||
|
||||
private string FormatProcessInfo(ProcessStartInfo info, bool includeWorkingDirectory)
|
||||
{
|
||||
string prefix = includeWorkingDirectory ?
|
||||
$"{info.WorkingDirectory}> {info.FileName}" :
|
||||
info.FileName;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(info.Arguments))
|
||||
{
|
||||
return prefix;
|
||||
}
|
||||
|
||||
return prefix + " " + info.Arguments;
|
||||
}
|
||||
|
||||
private void ReportExecBegin()
|
||||
{
|
||||
if (!_quietBuildReporter)
|
||||
{
|
||||
BuildReporter.BeginSection("EXEC", FormatProcessInfo(_process.StartInfo, includeWorkingDirectory: false));
|
||||
}
|
||||
}
|
||||
|
||||
private void ReportExecEnd(int exitCode)
|
||||
{
|
||||
if (!_quietBuildReporter)
|
||||
{
|
||||
bool success = exitCode == 0;
|
||||
|
||||
var message = $"{FormatProcessInfo(_process.StartInfo, includeWorkingDirectory: !success)} exited with {exitCode}";
|
||||
|
||||
BuildReporter.EndSection(
|
||||
"EXEC",
|
||||
success ? message.Green() : message.Red().Bold(),
|
||||
success);
|
||||
}
|
||||
}
|
||||
|
||||
private void ThrowIfRunning([CallerMemberName] string memberName = null)
|
||||
{
|
||||
if (_running)
|
||||
{
|
||||
throw new InvalidOperationException($"Unable to invoke {memberName} after the command has been run");
|
||||
}
|
||||
}
|
||||
|
||||
private void ProcessData(string data, StringWriter capture, Action<string> forward, Action<string> handler)
|
||||
{
|
||||
if (data == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (capture != null)
|
||||
{
|
||||
capture.WriteLine(data);
|
||||
}
|
||||
|
||||
if (forward != null)
|
||||
{
|
||||
forward(data);
|
||||
}
|
||||
|
||||
if (handler != null)
|
||||
{
|
||||
handler(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,50 +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.
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build.Framework
|
||||
{
|
||||
public struct CommandResult
|
||||
{
|
||||
public static readonly CommandResult Empty = new CommandResult();
|
||||
|
||||
public ProcessStartInfo StartInfo { get; }
|
||||
public int ExitCode { get; }
|
||||
public string StdOut { get; }
|
||||
public string StdErr { get; }
|
||||
|
||||
public CommandResult(ProcessStartInfo startInfo, int exitCode, string stdOut, string stdErr)
|
||||
{
|
||||
StartInfo = startInfo;
|
||||
ExitCode = exitCode;
|
||||
StdOut = stdOut;
|
||||
StdErr = stdErr;
|
||||
}
|
||||
|
||||
public void EnsureSuccessful(bool suppressOutput = false)
|
||||
{
|
||||
if(ExitCode != 0)
|
||||
{
|
||||
StringBuilder message = new StringBuilder($"Command failed with exit code {ExitCode}: {StartInfo.FileName} {StartInfo.Arguments}");
|
||||
|
||||
if (!suppressOutput)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(StdOut))
|
||||
{
|
||||
message.AppendLine($"{Environment.NewLine}Standard Output:{Environment.NewLine}{StdOut}");
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(StdErr))
|
||||
{
|
||||
message.AppendLine($"{Environment.NewLine}Standard Error:{Environment.NewLine}{StdErr}");
|
||||
}
|
||||
}
|
||||
|
||||
throw new BuildFailureException(message.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -9,15 +9,5 @@ namespace Microsoft.DotNet.Cli.Build.Framework
|
|||
{
|
||||
//public static readonly string ProjectFileName = "project.json";
|
||||
public static readonly string ExeSuffix = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".exe" : string.Empty;
|
||||
|
||||
// Priority order of runnable suffixes to look for and run
|
||||
public static readonly string[] RunnableSuffixes = RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
|
||||
? new string[] { ".exe", ".cmd", ".bat" }
|
||||
: new string[] { string.Empty };
|
||||
|
||||
public static readonly string DynamicLibPrefix = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "" : "lib";
|
||||
|
||||
public static readonly string DynamicLibSuffix = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".dll" :
|
||||
RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? ".dylib" : ".so";
|
||||
}
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue