Merge branch 'master' into 3pn

This commit is contained in:
Eric Erhardt 2017-08-28 09:50:02 -05:00
Родитель 116238eabc 51024438e1
Коммит 8214e3b0ce
822 изменённых файлов: 26375 добавлений и 26355 удалений

207
.gitignore поставляемый
Просмотреть файл

@ -1,53 +1,9 @@
### Repo-specific things ###
syntax: glob
# RootFS used for cross-compilation
cross/rootfs
### VisualStudio ###
# Test results
*-testResults.xml
# Multicore JIT Optimization profiles
**/optimizationdata/dotnet
# NuGet keeps dropping
Library/
# NuGet v3 restore drops these even though we don't use MSBuild :(
*.nuget.targets
*.nuget.props
# Repo Local Package Cache
.nuget/
# Debian and python stuff
*.dsc
*.tar.gz
*.build
*.changes
*.deb
*.pyc
*.pyo
# OSX Packaging temp files
*.pkg
# OS X Device Services Store
.DS_Store
# CMake generated files
cmake/
# stage0 install directory
.dotnet_stage0
# `dotnet new` project.json.template files are generated by a pre-build step.
# ignore these files
/src/dotnet/commands/dotnet-new/**/project.json.template
### VisualStudio.gitignore from https://raw.githubusercontent.com/github/gitignore/master/VisualStudio.gitignore ###
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# Tool Runtime Dir
/[Tt]ools/
# User-specific files
*.suo
@ -55,9 +11,6 @@ cmake/
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
@ -69,21 +22,28 @@ build/
bld/
[Bb]in/
[Oo]bj/
msbuild.log
msbuild.err
msbuild.wrn
# Visual Studio 2015 cache/options directory
# Cross building rootfs
cross/rootfs/
cross/android-rootfs/
# add x86 as it is ignored in 'Build results'
!cross/x86
# Visual Studio 2015
.vs/
# Visual Studio Code cache/options directory
.vscode/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2015 Pre-CTP6
*.sln.ide
*.ide/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
#NUNIT
*.VisualState.xml
TestResult.xml
@ -92,10 +52,6 @@ TestResult.xml
[Rr]eleasePS/
dlldata.c
# DNX
project.lock.json
artifacts/
*_i.c
*_p.c
*_i.h
@ -133,13 +89,11 @@ ipch/
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# TFS 2012 Local Workspace
$tf/
@ -151,10 +105,8 @@ $tf/
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
.idea/
*.iml
# JustCode is a .NET coding add-in
# JustCode is a .NET coding addin-in
.JustCode
# TeamCity is a build add-in
@ -166,7 +118,6 @@ _TeamCity*
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
@ -188,54 +139,41 @@ DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# NuGet Packages
*.nuget.props
*.nuget.targets
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet package restore lockfiles
project.lock.json
# Windows Azure Build Output
csx/
*.build.csdef
# Windows Azure Emulator
ecf/
rcf/
# Windows Store app package directory
AppPackages/
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
orleans.codegen.cs
*.metaproj
*.metaproj.tmp
bin.localpkg/
# RIA/Silverlight projects
Generated_Code/
@ -260,40 +198,77 @@ UpgradeLog*.htm
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
### MonoDevelop ###
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
*.pidb
*.userprefs
# Visual Studio 6 build log
*.plg
### Windows ###
# Visual Studio 6 workspace options file
*.opt
# Windows image file caches
Thumbs.db
ehthumbs.db
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Folder config file
Desktop.ini
# Paket dependency manager
.paket/paket.exe
# Recycle Bin used on file shares
$RECYCLE.BIN/
# FAKE - F# Make
.fake/
# Windows Installer files
*.cab
*.msi
*.msm
*.msp
# Exceptions
# Build Scripts
!scripts/build/
test/PackagedCommands/Consumers/*/project.json
# Windows shortcuts
*.lnk
# Vim swp files
*.swp
*.*~
### Linux ###
*~
# KDE directory preferences
.directory
### OSX ###
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear on external disk
.Spotlight-V100
.Trashes
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# vim temporary files
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]
*.un~
Session.vim
.netrwhist
*~
# Visual Studio Code
.vscode/
# Private test configuration and binaries.
config.ps1
**/IISApplications
# VS generated files
launchSettings.json

15
BranchInfo.props Normal file
Просмотреть файл

@ -0,0 +1,15 @@
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MajorVersion>2</MajorVersion>
<MinorVersion>1</MinorVersion>
<PatchVersion>0</PatchVersion>
<StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion>
<PreReleaseLabel>preview2</PreReleaseLabel>
<ReleaseSuffix>$(PreReleaseLabel)</ReleaseSuffix>
<ReleaseBrandSuffix>Preview 2</ReleaseBrandSuffix>
<Channel>master</Channel>
<BranchName>master</BranchName>
<ContainerName>dotnet</ContainerName>
<ChecksumContainerName>$(ContainerName)</ChecksumContainerName>
</PropertyGroup>
</Project>

1
BuildToolsVersion.txt Normal file
Просмотреть файл

@ -0,0 +1 @@
2.0.0-prerelease-01903-01

Просмотреть файл

@ -0,0 +1,74 @@
Build Core-Setup on Windows
========================
These instructions will lead you through building Core-Setup.
----------------
# Environment
You must install several components to build the Core-Setup repo. These instructions were tested on Windows 8+.
## Visual Studio
Visual Studio must be installed. Supported versions:
- [Visual Studio 2015](https://www.visualstudio.com/vs/older-downloads/) (Community, Professional, Enterprise). The community version is completely free.
For Visual Studio 2015:
* To debug managed code, ensure you have installed at least [Visual Studio 2015 Update 3](https://www.visualstudio.com/en-us/news/releasenotes/vs2015-update3-vs).
* Make sure that you install "VC++ Tools". By default, they will not be installed.
* To build for Arm32, Make sure that you have the Windows SDK for Windows 10 installed (or selected to be installed as part of VS installation). To explicitly install Windows SDK, download it from here: [Windows SDK for Windows 10](https://developer.microsoft.com/en-us/windows/downloads)
Visual Studio Express is not supported.
## CMake
The Core-Setup repo build has been validated using CMake 3.6.3
- Install [CMake](http://www.cmake.org/download) for Windows.
- Add its location (e.g. C:\Program Files (x86)\CMake\bin) to the PATH environment variable.
The installation script has a check box to do this, but you can do it yourself after the fact
following the instructions at [Adding to the Default PATH variable](#adding-to-the-default-path-variable)
## Git
For actual user operations, it is often more convinient to use the GIT features built into Visual Studio 2015.
However the Core-Setup and the tests use the GIT command line utilities directly so you need to install them
for these to work properly. You can get it from
- Install [Git For Windows](https://git-for-windows.github.io/)
- Add its location (e.g. C:\Program Files\Git\cmd) to the PATH environment variable.
The installation script has a check box to do this, but you can do it yourself after the fact
following the instructions at [Adding to the Default PATH variable](#adding-to-the-default-path-variable)
## PowerShell
PowerShell is used in the build system. Ensure that it is accessible via the PATH environment variable.
Typically this is %SYSTEMROOT%\System32\WindowsPowerShell\v1.0\.
Powershell version must be 3.0 or higher. This should be the case for Windows 8 and later builds.
- Windows 7 SP1 can install Powershell version 4 [here](https://www.microsoft.com/en-us/download/details.aspx?id=40855).
## DotNet Core SDK
While not strictly needed to build or tests the .NET Core repository, having the .NET Core SDK installed lets
you use the dotnet.exe command to run .NET Core applications in the 'normal' way. Visual Studio 2015 (update 3) should have
installed the .NET Core SDK, but in case it did not you can get it from the [Installing the .Net Core SDK](https://www.microsoft.com/net/core) page.
## Adding to the default PATH variable
The commands above need to be on your command lookup path. Some installers will automatically add them to
the path as part of installation, but if not here is how you can do it.
You can of course add a directory to the PATH environment variable with the syntax
```
set PATH=%PATH%;DIRECTORY_TO_ADD_TO_PATH
```
However the change above will only last until the command windows closes. You can make your change to
the PATH variable persistent by going to Control Panel -> System And Security -> System -> Advanced system settings -> Environment Variables,
and select the 'Path' variable in the 'System variables' (if you want to change it for all users) or 'User variables' (if you only want
to change it for the currnet user). Simply edit the PATH variable's value and add the directory (with a semicolon separator).
-------------------------------------
# Building
Once all the necessary tools are in place, building is trivial. Simply run build build.cmd script that lives at
the base of the repository.

Просмотреть файл

@ -5,19 +5,19 @@ To enable sharing of assemblies among all machine-wide .NET Core applications, a
### Packages Store
The package store can be either a global system-wide folder or a user local folder:
The package store can be either a global system-wide folder or a dotnet.exe relative folder:
+ **Global**:
- The `dotnet` root location -- on Windows, the folder is located in `C:\Program Files (x86)\`. See layout below.
- In the `packages/install` folder we expect packages to be installed ONLY through platform installers like MSI, pkg, deb, apt-get etc.
- The package layout composed with the `dotnet cache` command (details follow) are expected to be unzipped directly into the `packages` folder. Note, that this unzip step is a manual action.
- In the `store/install` folder we expect packages to be installed ONLY through platform installers like MSI, pkg, deb, apt-get etc.
- The package layout composed with the `dotnet store` command (details follow) are expected to be unzipped directly into the `store` folder. Note, that this unzip step is a manual action.
```
- dotnet.exe
- shared
- netcoreapp2.0
+ 2.0.0-preview2-00001
- packages
- store
- install
+ refs
+ netcoreapp2.0
@ -29,21 +29,10 @@ The package store can be either a global system-wide folder or a user local fold
The layout within `netcoreapp*` folders is a NuGet cache layout.
+ **User**: The user local location can be used to override the global location when probing assemblies and uses a very similar layout, except that the `packages/install` folder is NOT supported in the user profile. It is only supported in the global location.
```
- %USERPROFILE% or $HOME/
- .dotnet
- packages
- {arch=x86|x64}
= do =
```
**OPEN**: Should we have a `dotnet` relative location as well, if operating out of a zip installation of .NET Core binaries?
### Composing a runtime (non-ref) package store
To compose the layout of the shared package store, we will use a dotnet command called `dotnet cache`. We expect the *hosting providers* (ex: Antares) to use the command to prime their machines and framework authors who want to provide *pre-optimized package archives* create the compressed archive layouts.
To compose the layout of the shared package store, we will use a dotnet command called `dotnet store`. We expect the *hosting providers* (ex: Antares) to use the command to prime their machines and framework authors who want to provide *pre-optimized package archives* create the compressed archive layouts.
The layout is composed from a list of package names and versions specified as xml:
@ -62,7 +51,7 @@ The layout is composed from a list of package names and versions specified as xm
and issue a command like below:
```
dotnet cache --entries packages.xml --framework netcoreapp2.0 [--output C:\Foo] --runtime win7-x64 --framework-version 2.0.0-preview2-00001 [--no-optimize]
dotnet store --manifest packages.xml --framework netcoreapp2.0 [--output C:\Foo] --runtime win7-x64 --framework-version 2.0.0-preview2-00001 [--no-optimize]
--framework Specifies the TFM that the package store is applicable to
--output The output directory to create the package store in (default: %USERPROFILE%\.dotnet or ~/.dotnet)
@ -75,11 +64,11 @@ dotnet cache --entries packages.xml --framework netcoreapp2.0 [--output C:\Foo]
```
NOTE: It is a requirement that `packages.xml` is of msbuild format, because it forms the entry point from which the rest of the SDK's functionality can be accessed
Hosting providers would create a `packages.xml` file corresponding to the packages that will be shared in their hosting environment and specify the file to `dotnet cache`. The file can be on the file system or from an URL. The TFM argument is used in the shared package layout described above.
Hosting providers would create a `packages.xml` file corresponding to the packages that will be shared in their hosting environment and specify the file to `dotnet store`. The file can be on the file system or from an URL. The TFM argument is used in the shared package layout described above.
If `--optimize` is specified, we would precompile all the managed assets to native code in a temp folder before copying to the output folder. If crossgen is used, it would be the one acquired in the closure of the `Microsoft.NETCore.App` specified by the `--framework-version` option. Also, if no `--output` folder is specified, then the default is `~/.dotnet` or `%USERPROFILE%\.dotnet\`. The output asset files will be present in the following layout: `$HOME/.dotnet/packages/{tfm}/{package-name}/{package-version}/{asset-path}`.
The output folder will be consumed by the runtime by adding to the `DOTNET_SHARED_PACKAGES_ROOTS` environment variable. See probe precedence below.
The output folder will be consumed by the runtime by adding to the `DOTNET_SHARED_STORE` environment variable. See probe precedence below.
# Building apps with shared packages
@ -109,22 +98,25 @@ Note that this is different from current behavior of `dotnet run` for an applica
**Current Behavior:** Picks `M.N.A` assemblies out of the NuGet cache without taking advantage of optimizations available from the shared `Microsoft.NETCore.App`.
**New Behavior:** Picks `M.N.A` assemblies from the shared framework and the rest of them from the shared package store or the NuGet cache.
`dotnet build` can take advantage of the `refs` folder available at the `packages/install/` folder from the `dotnet` root directory enabling the offline-restore-build scenario. Although we are designing to augment `dotnet build` in the future regarding the reference assemblies, for the scope of this work we'll focus only on runtime assemblies.
`dotnet build` can take advantage of the `refs` folder available at the `store/install/` folder from the `dotnet` root directory enabling the offline-restore-build scenario. Although we are designing to augment `dotnet build` in the future regarding the reference assemblies, for the scope of this work we'll focus only on runtime assemblies.
## Host probe precedence
The host will probe in the following order of precedence for `dotnet run` and application activations post `dotnet publish`:
+ `$CORE_SERVICING` on Unix or `%ProgramFiles(x86)%\coreservicing` on Windows.
+ `DOTNET_SHARED_PACKAGES_ROOTS` in the chained order
+ The user local shared package store in `%USERPROFILE%\.dotnet\packages` or `$HOME/.dotnet/`
+ The global shared package store
+ The Shared Framework directory
+ ~~`DOTNET_HOSTING_OPTIMIZATION_CACHE` deprecated in favor of `DOTNET_SHARED_PACKAGES_ROOTS`~~
+ `--additionalprobingpaths` specified in the command line
+ `runtimeOptions.additionalProbingPaths` (includes NuGet cache probe specified by the CLI for `dotnet run`)
+ Application `bin` directory
+ Application Bin and Shared FX directory
+ `DOTNET_SHARED_STORE` in the chained order
+ Store locations
- The dotnet.exe relative shared package store
- The global shared package store
- ~~`DOTNET_HOSTING_OPTIMIZATION_CACHE` deprecated in favor of `DOTNET_SHARED_STORE`~~
+ Additional Probing Paths
- `--additionalprobingpaths` specified in the command line
- `runtimeOptions.additionalProbingPaths` (includes NuGet cache probe specified by the CLI for `dotnet run`)
**NOTE:** `--additionalprobingpaths` can be passed template paths like below and the host will interpret `|arch|/|tfm|` appropriately to look for assets:
`%USERPROFILE%\user\cache\|arch|\|tfm|` or `$HOME/user/cache/|arch|/|tfm|`
## dotnet publish
Publish will be enhanced to support a filter profile file specified as xml. This file explicitly lists all asset packages that need to be trimmed out of the publish output. The following are examples of how various application types can be published.
@ -158,20 +150,20 @@ Note that the `profile.xml` specifies exact RID-specific or IL packages to filte
### ASP .NET
+ If authoring shared package installers (eager cache):
- Start from a clean directory and a list of packages in `packages.xml` file.
- Use `dotnet cache` to produce the layout in the directory.
- Use `dotnet store` to produce the layout in the directory.
- Make MSI/pkg/deb and zips of this layout.
- Publish the `profile.xml` file that users can use in sync with the installers.
- Developer/Deployment-admin installs the MSIs/zips to the deployment machines.
+ If letting app deployers cache shared packages (lazy cache):
- Publish `packages.xml` file that can be used to perform `dotnet cache`.
- Publish `packages.xml` file that can be used to perform `dotnet store`.
- Publish `profile.xml` file that can perform publish filtering.
- Deployment-admin issues `dotnet cache` when running the app.
- Deployment-admin issues `dotnet store` when running the app.
+ Developer/Deployment-admin issues `dotnet publish filter profile.xml` to produce an ASP.NET app without containing shared components.
- Or developer/Deployment-admin issues `dotnet run` after installing MSIs or zips.
### Antares
+ Antares produces the layout using a list of packages and `dotnet cache` in a folder.
+ This folder is then chained into environment variable: `DOTNET_SHARED_PACKAGES`.
+ Antares produces the layout using a list of packages and `dotnet store` in a folder.
+ This folder is then chained into environment variable: `DOTNET_SHARED_STORE`.
+ When building app from source, issue `dotnet run` to pick up the shared packages.
+ When publishing an app to run, issue `dotnet publish filter profile.xml` with Antares profile.
@ -184,8 +176,8 @@ Note that the `profile.xml` specifies exact RID-specific or IL packages to filte
### Hosting Primers
+ I host apps that are already published
- Use `dotnet cache` and produce layout or unzip an earlier layout.
- Set `DOTNET_SHARED_PACKAGES` to point to layout.
- Use `dotnet store` and produce layout or unzip an earlier layout.
- Set `DOTNET_SHARED_STORE` to point to layout.
- Nature of publish:
+ Using my hosting profile
+ App publish directory doesn't contain the filtered files picked from layout.
@ -193,7 +185,7 @@ Note that the `profile.xml` specifies exact RID-specific or IL packages to filte
+ Assemblies from app publish directory are overridden (*status quo*)
+ I build user apps from source
- dotnet cache
- dotnet store
- Zip the layout
- Deploy on hosting servers
- Publish apps with filter
@ -214,6 +206,6 @@ Note that the `profile.xml` specifies exact RID-specific or IL packages to filte
+ Make `dotnet restore` restore as though project is `type: platform`.
+ Make `dotnet build` treat projects as though they are `type: platform`.
+ `dotnet publish filter` support.
+ `dotnet cache` full implementation.
+ `dotnet store` full implementation.

Просмотреть файл

@ -1,4 +1,4 @@
# Multi-level SharedFX Lookup
# Multi-level SharedFX Lookup
## Introduction
@ -17,7 +17,7 @@ Its also possible to append a dash followed by a string after the version num
Versions that are not pre-releases are called productions.
For instance, a valid Semantic Versioning number sort would be:
1.0.0 -> 1.0.1 -> 1.0.1-alpha -> 1.1.0 -> 1.1.1 -> 2.0.0.
1.0.0 -> 1.0.1-alpha -> 1.0.1 -> 1.1.0-alpha -> 1.1.0-rc1 -> 1.1.0 -> 1.1.1 -> 2.0.0.
## Executable
@ -41,7 +41,7 @@ There are two possibilities for a muxer: it can be a portable app or a .NET Core
In the first case the app file path should have been specified as an argument to the dotnet.exe.
In the second case the dotnet.dll from SDK must be invoked as a portable app. At first the running program searches for the global.json file which may have specified a CLI version. It starts from the current working directory and looks for it inside all parent folder hierarchy. After that, it searches for the dotnet.dll file inside the sdk\CLI_version subfolder in the executable directory. If the version defined in the global.json file or the specified version folder cannot be found, then it must choose the most appropriate one. The most appropriate version is defined as the latest production version according to the Semantic Versioning system. If no production version is available, then the latest pre-release must be chosen.
In the second case the dotnet.dll from SDK must be invoked as a portable app. At first the running program searches for the global.json file which may have specified a CLI version. It starts from the current working directory and looks for it inside all parent folder hierarchy. After that, it searches for the dotnet.dll file inside the sdk\CLI_version subfolder in the executable directory. If the version defined in the global.json file or the specified version folder cannot be found, then it must choose the most appropriate one. The most appropriate version is defined as the latest version according to the Semantic Versioning system.
### Framework search and rolling forward
@ -80,14 +80,7 @@ At last, the coreclr is loaded into memory and called to run the application.
## Proposed changes
Almost every file search is done in relation to the executable directory. It would be better to be able to search for some files in other directories as well. Suggested folders are the current working directory, the user location and the global .NET location. The user and global folders may vary depending on the running operational system. They are defined as follows:
User location:
Windows 32-bit: %SystemDrive%\Users\username\.dotnet\x86
Windows 64-bit: %SystemDrive%\Users\username\.dotnet\x64
Unix 32-bit: /home/username/.dotnet/x86
Unix 64-bit: /home/username/.dotnet/x64
Almost every file search is done in relation to the executable directory. It would be better to be able to search for some files in other directories as well, namely the global .NET location. The global folders may vary depending on the running operational system. They are defined as follows:
Global .NET location:
@ -102,17 +95,13 @@ Its being proposed that, if the specified version is defined through the conf
- For productions:
1. In relation to the current working directory: search for the most appropriate version by rolling forward. If it cannot be found, proceed to the next step.
2. In relation to the user location: search for the most appropriate version by rolling forward. If it cannot be found, proceed to the next step.
3. In relation to the executable directory: search for the most appropriate version by rolling forward. If it cannot be found, proceed to the next step.
4. In relation to the global location: search for the most appropriate version by rolling forward. If it cannot be found, then we were not able to locate any compatible version.
1. In relation to the executable directory: search for the most appropriate version by rolling forward. If it cannot be found, proceed to the next step.
2. In relation to the global location: search for the most appropriate version by rolling forward. If it cannot be found, then we were not able to locate any compatible version.
- For pre-releases:
1. In relation to the current working directory: search for the specified version. If it cannot be found, search for the most appropriate version by rolling forward. If no compatible version can be found, proceed to the next step.
2. In relation to the user location: search for the specified version. If it cannot be found, search for the most appropriate version by rolling forward. If no compatible version can be found, proceed to the next step.
3. In relation to the executable directory: search for the specified version. If it cannot be found, search for the most appropriate version by rolling forward. If no compatible version can be found, proceed to the next step.
4. In relation to the global location: search for the specified version. If it cannot be found, search for the most appropriate version by rolling forward. If no compatible version can be found, then we were not able to locate any compatible version.
1. In relation to the executable directory: search for the specified version. If it cannot be found, search for the most appropriate version by rolling forward. If no compatible version can be found, proceed to the next step.
2. In relation to the global location: search for the specified version. If it cannot be found, search for the most appropriate version by rolling forward. If no compatible version can be found, then we were not able to locate any compatible version.
In the case that the desired version is defined through an argument, the multi-level lookup will happen as well but it will only consider the exact specified version (it will not roll forward).
@ -134,7 +123,5 @@ By following similar logic, it will be possible to implement future changes in t
The search would be conducted as follows:
1. In relation to the current working directory: search for the specified version. If it cannot be found, choose the most appropriate available version. If theres no available version, proceed to the next step.
2. In relation to the user location: search for the specified version. If it cannot be found, choose the most appropriate available version. If theres no available version, proceed to the next step.
3. In relation to the executable directory: search for the specified version. If it cannot be found, choose the most appropriate available version. If theres no available version, proceed to the next step.
4. In relation to the global location: search for the specified version. If it cannot be found, choose the most appropriate available version. If theres no available version, then we were not able to find any version folder and an error message must be returned.
1. In relation to the executable directory: search for the specified version. If it cannot be found, choose the most appropriate available version. If theres no available version, proceed to the next step.
2. In relation to the global location: search for the specified version. If it cannot be found, choose the most appropriate available version. If theres no available version, then we were not able to find any version folder and an error message must be returned.

1
Documentation/dummy.txt Normal file
Просмотреть файл

@ -0,0 +1 @@
06/27/2017 06:00:00 PM

1
DotnetCLIVersion.txt Normal file
Просмотреть файл

@ -0,0 +1 @@
2.0.0-preview1-005899

Просмотреть файл

Просмотреть файл

@ -9,31 +9,31 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
NuGet.Config = NuGet.Config
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "setuptools", "setuptools", "{0722D325-24C8-4E83-B5AF-0A083E7F0749}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "setuptools", "tools-local\setuptools", "{0722D325-24C8-4E83-B5AF-0A083E7F0749}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build_projects", "build_projects", "{88278B81-7649-45DC-8A6A-D3A645C5AFC3}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "src\build", "{88278B81-7649-45DC-8A6A-D3A645C5AFC3}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.DotNet.Cli.Build.Framework", "build_projects\Microsoft.DotNet.Cli.Build.Framework\Microsoft.DotNet.Cli.Build.Framework.xproj", "{49BEB486-AB5A-4416-91EA-8CD34ABB0C9D}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.DotNet.Cli.Build.Framework", "src\build\Microsoft.DotNet.Cli.Build.Framework\Microsoft.DotNet.Cli.Build.Framework.xproj", "{49BEB486-AB5A-4416-91EA-8CD34ABB0C9D}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "shared-build-targets-utils", "build_projects\shared-build-targets-utils\shared-build-targets-utils.xproj", "{B768BD29-12BF-4C7C-B093-03193FE244D1}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "shared-build-targets-utils", "src\build\shared-build-targets-utils\shared-build-targets-utils.xproj", "{B768BD29-12BF-4C7C-B093-03193FE244D1}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "dotnet-host-build", "build_projects\dotnet-host-build\dotnet-host-build.xproj", "{1DBB7542-0345-4F4B-A84B-3B00B185D416}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "dotnet-host-build", "src\build\dotnet-host-build\dotnet-host-build.xproj", "{1DBB7542-0345-4F4B-A84B-3B00B185D416}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "RuntimeGraphGenerator", "setuptools\independent\RuntimeGraphGenerator\RuntimeGraphGenerator.xproj", "{EFC4FE68-83EB-40E4-BFA8-61D0B4626F25}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "RuntimeGraphGenerator", "tools-local\setuptools\independent\RuntimeGraphGenerator\RuntimeGraphGenerator.xproj", "{EFC4FE68-83EB-40E4-BFA8-61D0B4626F25}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "update-dependencies", "build_projects\update-dependencies\update-dependencies.xproj", "{A28BD8AC-DF15-4F58-8299-98A9AE2B8726}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "update-dependencies", "src\build\update-dependencies\update-dependencies.xproj", "{A28BD8AC-DF15-4F58-8299-98A9AE2B8726}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{5CE8410C-3100-4F41-8FA9-E6B4132D9703}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "HostActivationTests", "test\HostActivationTests\HostActivationTests.xproj", "{386D412C-003C-47B1-8258-0E35865CB7C4}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "HostActivationTests", "src\test\HostActivationTests\HostActivationTests.xproj", "{386D412C-003C-47B1-8258-0E35865CB7C4}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "dotnet-deb-tool", "setuptools\dotnet-deb-tool\dotnet-deb-tool.xproj", "{F39F3D8B-B26F-4C77-B08C-D6CA753EE84E}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "dotnet-deb-tool", "tools-local\setuptools\dotnet-deb-tool\dotnet-deb-tool.xproj", "{F39F3D8B-B26F-4C77-B08C-D6CA753EE84E}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "TestUtils", "test\TestUtils\TestUtils.xproj", "{42095367-4423-4157-BD31-D1A8E3B823B9}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "TestUtils", "src\test\TestUtils\TestUtils.xproj", "{42095367-4423-4157-BD31-D1A8E3B823B9}"
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}") = "Microsoft.Extensions.DependencyModel.Tests", "test\Microsoft.Extensions.DependencyModel.Tests\Microsoft.Extensions.DependencyModel.Tests.xproj", "{4A4711D8-4312-49FC-87B5-4F183F4C6A51}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Extensions.DependencyModel.Tests", "src\test\Microsoft.Extensions.DependencyModel.Tests\Microsoft.Extensions.DependencyModel.Tests.xproj", "{4A4711D8-4312-49FC-87B5-4F183F4C6A51}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{FAA448DA-7D1C-4481-915D-5765BF906332}"
EndProject

Просмотреть файл

@ -1,13 +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="cli-deps" value="https://dotnet.myget.org/F/cli-deps/api/v3/index.json" />
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
<disabledPackageSources>
<clear />
</disabledPackageSources>
</configuration>

11
NuGet.config Normal file
Просмотреть файл

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!-- Don't use any higher level config files.
Our builds need to be isolated from user/machine state -->
<fallbackPackageFolders>
<clear />
</fallbackPackageFolders>
<packageSources>
<clear/>
</packageSources>
</configuration>

335
README.md
Просмотреть файл

@ -1,18 +1,18 @@
.NET Core Runtime & Host Setup Repo
===================================
This repo contains the code to build the .NET Core runtime, libraries and shared host (`dotnet`) installers for
all supported platforms. It **does not** contain the actual sources to .NET Core runtime; this source is split across
the dotnet/coreclr repo (runtime) and dotnet/corefx repo (libraries).
This repo contains the code to build the .NET Core runtime, libraries and shared host (`dotnet`) installers for
all supported platforms. It **does not** contain the actual sources to .NET Core runtime; this source is split across
the dotnet/coreclr repo (runtime) and dotnet/corefx repo (libraries).
## Installation experience
The all-up installation experience is described in the [installation scenarios](https://github.com/dotnet/cli/blob/rel/1.0.0/Documentation/cli-installation-scenarios.md)
document in the dotnet/cli repo. That is the first step to get acquantied with the overall plan and experience we have
thought up for installing .NET Core bits.
The all-up installation experience is described in the [installation scenarios](https://github.com/dotnet/cli/blob/rel/1.0.0/Documentation/cli-installation-scenarios.md)
document in the dotnet/cli repo. That is the first step to get acquainted with the overall plan and experience we have
thought up for installing .NET Core bits.
## Filing issues
This repo should contain issues that are tied to the installation of the "muxer" (the `dotnet` binary) and installation
of the .NET Core runtime and libraries.
This repo should contain issues that are tied to the installation of the "muxer" (the `dotnet` binary) and installation
of the .NET Core runtime and libraries.
For other issues, please use the following repos:
@ -30,31 +30,33 @@ They can be downloaded from [here](https://www.microsoft.com/net/download#core).
Daily Builds
------------
| Platform | Master<br>[![][build-badge-master]][build-master] | Release/1.1.X<br>[![][build-badge-1.X.X]][build-1.X.X] | Release/1.0.X<br>[![][build-badge-1.0.X]][build-1.0.X] |
|---------|:----------:|:----------:|:----------:|
| **Windows (x64)** | [![][win-x64-badge-master]][win-x64-version-master]<br>[Installer][win-x64-installer-master]<br>[zip][win-x64-zip-master] | [![][win-x64-badge-1.1.X]][win-x64-version-1.1.X]<br>[Installer][win-x64-installer-1.1.X]<br>[zip][win-x64-zip-1.1.X] | [![][win-x64-badge-preview]][win-x64-version-preview]<br>[Installer][win-x64-installer-preview]<br>[zip][win-x64-zip-preview] |
| **Windows (x86)** | [![][win-x86-badge-master]][win-x86-version-master]<br>[Installer][win-x86-installer-master]<br>[zip][win-x86-zip-master] | [![][win-x86-badge-1.1.X]][win-x86-version-1.1.X]<br>[Installer][win-x86-installer-1.1.X]<br>[zip][win-x86-zip-1.1.X] | [![][win-x86-badge-preview]][win-x86-version-preview]<br>[Installer][win-x86-installer-preview]<br>[zip][win-x86-zip-preview] |
| **Windows (arm32)** | [![][win-arm-badge-master]][win-arm-version-master]<br>[zip][win-arm-zip-master] | N/A | N/A |
| **Windows (arm64)** | [![][win-arm64-badge-master]][win-arm64-version-master]<br>[zip][win-arm64-zip-master] | N/A | N/A |
| **Mac OS X (x64)** | [![][osx-badge-master]][osx-version-master]<br>[Installer][osx-installer-master]<br>[tar.gz][osx-targz-master] | [![][osx-badge-1.1.X]][osx-version-1.1.X]<br>[Installer][osx-installer-1.1.X]<br>[tar.gz][osx-targz-1.1.X] | [![][osx-badge-preview]][osx-version-preview]<br>[Installer][osx-installer-preview]<br>[tar.gz][osx-targz-preview] |
| **Linux (x64)** (for glibc based OS) | [![][linux-x64-badge-master]][linux-x64-version-master]<br>[tar.gz][linux-x64-zip-master] | N/A | N/A |
| **Ubuntu 14.04 (x64)** | [![][ubuntu-14.04-badge-master]][ubuntu-14.04-version-master]<br>[Host][ubuntu-14.04-host-master]<br>[Host FX Resolver][ubuntu-14.04-hostfxr-master]<br>[Shared Framework][ubuntu-14.04-sharedfx-master]<br>[tar.gz][ubuntu-14.04-targz-master] | [![][ubuntu-14.04-badge-1.1.X]][ubuntu-14.04-version-1.1.X]<br>[Host][ubuntu-14.04-host-1.1.X]<br>[Host FX Resolver][ubuntu-14.04-hostfxr-1.1.X]<br>[Shared Framework][ubuntu-14.04-sharedfx-1.1.X]<br>[tar.gz][ubuntu-14.04-targz-1.1.X] | [![][ubuntu-14.04-badge-preview]][ubuntu-14.04-version-preview]<br>[Host][ubuntu-14.04-host-preview]<br>[Host FX Resolver][ubuntu-14.04-hostfxr-preview]<br>[Shared Framework][ubuntu-14.04-sharedfx-preview]<br>[tar.gz][ubuntu-14.04-targz-preview] |
| **Ubuntu 14.04 (arm32)** | [![][ubuntu-14.04-arm-badge-master]][ubuntu-14.04-arm-version-master]<br>[tar.gz][ubuntu-14.04-arm-targz-master] | N/A | N/A |
| **Ubuntu 16.04 (x64)** | [![][ubuntu-16.04-badge-master]][ubuntu-16.04-version-master]<br>[Host][ubuntu-16.04-host-master]<br>[Host FX Resolver][ubuntu-16.04-hostfxr-master]<br>[Shared Framework][ubuntu-16.04-sharedfx-master]<br>[tar.gz][ubuntu-16.04-targz-master] | [![][ubuntu-16.04-badge-1.1.X]][ubuntu-16.04-version-1.1.X]<br>[Host][ubuntu-16.04-host-1.1.X]<br>[Host FX Resolver][ubuntu-16.04-hostfxr-1.1.X]<br>[Shared Framework][ubuntu-16.04-sharedfx-1.1.X]<br>[tar.gz][ubuntu-16.04-targz-1.1.X] | [![][ubuntu-16.04-badge-preview]][ubuntu-16.04-version-preview]<br>[Host][ubuntu-16.04-host-preview]<br>[Host FX Resolver][ubuntu-16.04-hostfxr-preview]<br>[Shared Framework][ubuntu-16.04-sharedfx-preview]<br>[tar.gz][ubuntu-16.04-targz-preview] |
| **Ubuntu 16.04 (arm32)** | [![][ubuntu-16.04-arm-badge-master]][ubuntu-16.04-arm-version-master]<br>[tar.gz][ubuntu-16.04-arm-targz-master] | N/A | N/A |
| **Ubuntu 16.10 (x64)** | [![][ubuntu-16.10-badge-master]][ubuntu-16.10-version-master]<br>[Host][ubuntu-16.10-host-master]<br>[Host FX Resolver][ubuntu-16.10-hostfxr-master]<br>[Shared Framework][ubuntu-16.10-sharedfx-master]<br>[tar.gz][ubuntu-16.10-targz-master] | [![][ubuntu-16.10-badge-1.1.X]][ubuntu-16.10-version-1.1.X]<br>[Host][ubuntu-16.10-host-1.1.X]<br>[Host FX Resolver][ubuntu-16.10-hostfxr-1.1.X]<br>[Shared Framework][ubuntu-16.10-sharedfx-1.1.X]<br>[tar.gz][ubuntu-16.10-targz-1.1.X] | N/A |
| **Debian 8.2 (x64)** | [![][debian-8.2-badge-master]][debian-8.2-version-master]<br>[Host][debian-8.2-host-master]<br>[Host FX Resolver][debian-8.2-hostfxr-master]<br>[Shared Framework][debian-8.2-sharedfx-master]<br>[tar.gz][debian-8.2-targz-master] | [![][debian-8.2-badge-1.1.X]][debian-8.2-version-1.1.X]<br>[Host][debian-8.2-host-1.1.X]<br>[Host FX Resolver][debian-8.2-hostfxr-1.1.X]<br>[Shared Framework][debian-8.2-sharedfx-1.1.X]<br>[tar.gz][debian-8.2-targz-1.1.X] | [![][debian-8.2-badge-preview]][debian-8.2-version-preview]<br>[Host][debian-8.2-host-preview]<br>[Host FX Resolver][debian-8.2-hostfxr-preview]<br>[Shared Framework][debian-8.2-sharedfx-preview]<br>[tar.gz][debian-8.2-targz-preview] |
| **CentOS 7.1 (x64)** | [![][centos-badge-master]][centos-version-master]<br>[tar.gz][centos-targz-master] | [![][centos-badge-1.1.X]][centos-version-1.1.X]<br>[tar.gz][centos-targz-1.1.X] | [![][centos-badge-preview]][centos-version-preview]<br>[tar.gz][centos-targz-preview] |
| **RHEL 7.2 (x64)** | [![][rhel-badge-master]][rhel-version-master]<br>[tar.gz][rhel-targz-master] | [![][rhel-badge-1.1.X]][rhel-version-1.1.X]<br>[tar.gz][rhel-targz-1.1.X] | [![][rhel-badge-preview]][rhel-version-preview]<br>[tar.gz][rhel-targz-preview] |
| **Fedora 23 (x64)** | [![][fedora-23-badge-master]][fedora-23-version-master]<br>[tar.gz][fedora-23-targz-master] | [![][fedora-23-badge-1.1.X]][fedora-23-version-1.1.X]<br>[tar.gz][fedora-23-targz-1.1.X] | [![][fedora-23-badge-preview]][fedora-23-version-preview]<br>[tar.gz][fedora-23-targz-preview] |
| **Fedora 24 (x64)** | [![][fedora-24-badge-master]][fedora-24-version-master]<br>[tar.gz][fedora-24-targz-master] | [![][fedora-24-badge-1.1.X]][fedora-24-version-1.1.X]<br>[tar.gz][fedora-24-targz-1.1.X] | N/A |
| **OpenSUSE 42.1 (x64)** | [![][opensuse-42.1-badge-master]][opensuse-42.1-version-master]<br>[tar.gz][opensuse-42.1-targz-master] | [![][opensuse-42.1-badge-1.1.X]][opensuse-42.1-version-1.1.X]<br>[tar.gz][opensuse-42.1-targz-1.1.X] | N/A |
| Platform | Master<br>[![][build-badge-master]][build-master] | Release/2.0.X<br>[![][build-badge-2.0.X]][build-2.0.X] | Release/1.1.X<br>[![][build-badge-1.X.X]][build-1.X.X] | Release/1.0.X<br>[![][build-badge-1.0.X]][build-1.0.X] |
|---------|:----------:|:----------:|:----------:|:----------:|
| **Windows (x64)** | [![][win-x64-badge-master]][win-x64-version-master]<br>[Installer][win-x64-installer-master] ([Checksum][win-x64-installer-checksum-master])<br>[zip][win-x64-zip-master] ([Checksum][win-x64-zip-checksum-master])<br>[Symbols (zip)][win-x64-symbols-zip-master] | [![][win-x64-badge-2.0.X]][win-x64-version-2.0.X]<br>[Installer][win-x64-installer-2.0.X] ([Checksum][win-x64-installer-checksum-2.0.X])<br>[zip][win-x64-zip-2.0.X] ([Checksum][win-x64-zip-checksum-2.0.X])<br>[Symbols (zip)][win-x64-symbols-zip-2.0.X] | [![][win-x64-badge-1.1.X]][win-x64-version-1.1.X]<br>[Installer][win-x64-installer-1.1.X]<br>[zip][win-x64-zip-1.1.X] | [![][win-x64-badge-preview]][win-x64-version-preview]<br>[Installer][win-x64-installer-preview]<br>[zip][win-x64-zip-preview] |
| **Windows (x86)** | [![][win-x86-badge-master]][win-x86-version-master]<br>[Installer][win-x86-installer-master] ([Checksum][win-x86-installer-checksum-master])<br>[zip][win-x86-zip-master] ([Checksum][win-x86-zip-checksum-master])<br>[Symbols (zip)][win-x86-symbols-zip-master] | [![][win-x86-badge-2.0.X]][win-x86-version-2.0.X]<br>[Installer][win-x86-installer-2.0.X] ([Checksum][win-x86-installer-checksum-2.0.X])<br>[zip][win-x86-zip-2.0.X] ([Checksum][win-x86-zip-checksum-2.0.X])<br>[Symbols (zip)][win-x86-symbols-zip-2.0.X] |[![][win-x86-badge-1.1.X]][win-x86-version-1.1.X]<br>[Installer][win-x86-installer-1.1.X]<br>[zip][win-x86-zip-1.1.X] | [![][win-x86-badge-preview]][win-x86-version-preview]<br>[Installer][win-x86-installer-preview]<br>[zip][win-x86-zip-preview] |
| **Windows (arm32)** | [![][win-arm-badge-master]][win-arm-version-master]<br>[zip][win-arm-zip-master] ([Checksum][win-arm-zip-checksum-master])<br>[Symbols (zip)][win-arm-symbols-zip-master] | [![][win-arm-badge-2.0.X]][win-arm-version-2.0.X]<br>[zip][win-arm-zip-2.0.X] ([Checksum][win-arm-zip-checksum-2.0.X])<br>[Symbols (zip)][win-arm-symbols-zip-2.0.X] | N/A | N/A |
| **Windows (arm64)** | [![][win-arm64-badge-master]][win-arm64-version-master]<br>[zip][win-arm64-zip-master] ([Checksum][win-arm64-zip-checksum-master])<br>[Symbols (zip)][win-arm64-symbols-zip-master] | [![][win-arm64-badge-2.0.X]][win-arm64-version-2.0.X]<br>[zip][win-arm64-zip-2.0.X] ([Checksum][win-arm64-zip-checksum-2.0.X])<br>[Symbols (zip)][win-arm64-symbols-zip-2.0.X] | N/A | N/A |
| **Mac OS X (x64)** | [![][osx-badge-master]][osx-version-master]<br>[Installer][osx-installer-master] ([Checksum][osx-installer-checksum-master])<br>[tar.gz][osx-targz-master] ([Checksum][osx-targz-checksum-master])<br>[Symbols (tar.gz)][osx-symbols-targz-master] | [![][osx-badge-2.0.X]][osx-version-2.0.X]<br>[Installer][osx-installer-2.0.X] ([Checksum][osx-installer-checksum-2.0.X])<br>[tar.gz][osx-targz-2.0.X] ([Checksum][osx-targz-checksum-2.0.X])<br>[Symbols (tar.gz)][osx-symbols-targz-2.0.X] | [![][osx-badge-1.1.X]][osx-version-1.1.X]<br>[Installer][osx-installer-1.1.X]<br>[tar.gz][osx-targz-1.1.X] | [![][osx-badge-preview]][osx-version-preview]<br>[Installer][osx-installer-preview]<br>[tar.gz][osx-targz-preview] |
| **Linux (x64)** (for glibc based OS) | [![][linux-x64-badge-master]][linux-x64-version-master]<br>[tar.gz][linux-x64-targz-master] ([Checksum][linux-x64-targz-checksum-master])<br>[Symbols (tar.gz)][linux-x64-symbols-targz-master] | [![][linux-x64-badge-2.0.X]][linux-x64-version-2.0.X]<br>[tar.gz][linux-x64-targz-2.0.X] ([Checksum][linux-x64-targz-checksum-2.0.X])<br>[Symbols (tar.gz)][linux-x64-symbols-targz-2.0.X] | N/A | N/A |
| **Linux (armhf)** (for glibc based OS) | [![][linux-arm-badge-master]][linux-arm-version-master]<br>[tar.gz][linux-arm-targz-master] ([Checksum][linux-arm-targz-checksum-master])<br>[Symbols (tar.gz)][linux-arm-symbols-targz-master] | [![][linux-arm-badge-2.0.X]][linux-arm-version-2.0.X]<br>[tar.gz][linux-arm-targz-2.0.X] ([Checksum][linux-arm-targz-checksum-2.0.X])<br>[Symbols (tar.gz)][linux-arm-symbols-targz-2.0.X] | N/A | N/A |
| **Ubuntu 14.04 (x64)** | [![][ubuntu-14.04-badge-master]][ubuntu-14.04-version-master]<br>[Host][ubuntu-14.04-host-master] ([Checksum][ubuntu-14.04-host-checksum-master])<br>[Host FX Resolver][ubuntu-14.04-hostfxr-master] ([Checksum][ubuntu-14.04-hostfxr-checksum-master])<br>[Shared Framework][ubuntu-14.04-sharedfx-master] ([Checksum][ubuntu-14.04-sharedfx-checksum-master])<br> | [![][ubuntu-14.04-badge-2.0.X]][ubuntu-14.04-version-2.0.X]<br>[Host][ubuntu-14.04-host-2.0.X] ([Checksum][ubuntu-14.04-host-checksum-2.0.X])<br>[Host FX Resolver][ubuntu-14.04-hostfxr-2.0.X] ([Checksum][ubuntu-14.04-hostfxr-checksum-2.0.X])<br>[Shared Framework][ubuntu-14.04-sharedfx-2.0.X] ([Checksum][ubuntu-14.04-sharedfx-checksum-2.0.X])<br> | [![][ubuntu-14.04-badge-1.1.X]][ubuntu-14.04-version-1.1.X]<br>[Host][ubuntu-14.04-host-1.1.X]<br>[Host FX Resolver][ubuntu-14.04-hostfxr-1.1.X]<br>[Shared Framework][ubuntu-14.04-sharedfx-1.1.X]<br>[tar.gz][ubuntu-14.04-targz-1.1.X] | [![][ubuntu-14.04-badge-preview]][ubuntu-14.04-version-preview]<br>[Host][ubuntu-14.04-host-preview]<br>[Host FX Resolver][ubuntu-14.04-hostfxr-preview]<br>[Shared Framework][ubuntu-14.04-sharedfx-preview]<br>[tar.gz][ubuntu-14.04-targz-preview] |
| **Ubuntu 16.04 (x64)** | [![][ubuntu-16.04-badge-master]][ubuntu-16.04-version-master]<br>[Host][ubuntu-16.04-host-master] ([Checksum][ubuntu-16.04-host-checksum-master])<br>[Host FX Resolver][ubuntu-16.04-hostfxr-master] ([Checksum][ubuntu-16.04-hostfxr-checksum-master])<br>[Shared Framework][ubuntu-16.04-sharedfx-master] ([Checksum][ubuntu-16.04-sharedfx-checksum-master])<br> | [![][ubuntu-16.04-badge-2.0.X]][ubuntu-16.04-version-2.0.X]<br>[Host][ubuntu-16.04-host-2.0.X] ([Checksum][ubuntu-16.04-host-checksum-2.0.X])<br>[Host FX Resolver][ubuntu-16.04-hostfxr-2.0.X] ([Checksum][ubuntu-16.04-hostfxr-checksum-2.0.X])<br>[Shared Framework][ubuntu-16.04-sharedfx-2.0.X] ([Checksum][ubuntu-16.04-sharedfx-checksum-2.0.X])<br> | [![][ubuntu-16.04-badge-1.1.X]][ubuntu-16.04-version-1.1.X]<br>[Host][ubuntu-16.04-host-1.1.X]<br>[Host FX Resolver][ubuntu-16.04-hostfxr-1.1.X]<br>[Shared Framework][ubuntu-16.04-sharedfx-1.1.X]<br>[tar.gz][ubuntu-16.04-targz-1.1.X] | [![][ubuntu-16.04-badge-preview]][ubuntu-16.04-version-preview]<br>[Host][ubuntu-16.04-host-preview]<br>[Host FX Resolver][ubuntu-16.04-hostfxr-preview]<br>[Shared Framework][ubuntu-16.04-sharedfx-preview]<br>[tar.gz][ubuntu-16.04-targz-preview] |
| **Ubuntu 16.10 (x64)** | [![][ubuntu-16.10-badge-master]][ubuntu-16.10-version-master]<br>[Host][ubuntu-16.10-host-master] ([Checksum][ubuntu-16.10-host-checksum-master])<br>[Host FX Resolver][ubuntu-16.10-hostfxr-master] ([Checksum][ubuntu-16.10-hostfxr-checksum-master])<br>[Shared Framework][ubuntu-16.10-sharedfx-master] ([Checksum][ubuntu-16.10-sharedfx-checksum-master])<br> | [![][ubuntu-16.10-badge-2.0.X]][ubuntu-16.10-version-2.0.X]<br>[Host][ubuntu-16.10-host-2.0.X] ([Checksum][ubuntu-16.10-host-checksum-2.0.X])<br>[Host FX Resolver][ubuntu-16.10-hostfxr-2.0.X] ([Checksum][ubuntu-16.10-hostfxr-checksum-2.0.X])<br>[Shared Framework][ubuntu-16.10-sharedfx-2.0.X] ([Checksum][ubuntu-16.10-sharedfx-checksum-2.0.X])<br> | [![][ubuntu-16.10-badge-1.1.X]][ubuntu-16.10-version-1.1.X]<br>[Host][ubuntu-16.10-host-1.1.X]<br>[Host FX Resolver][ubuntu-16.10-hostfxr-1.1.X]<br>[Shared Framework][ubuntu-16.10-sharedfx-1.1.X]<br>[tar.gz][ubuntu-16.10-targz-1.1.X] | N/A |
| **Debian 8.2 (x64)** | [![][debian-8.2-badge-master]][debian-8.2-version-master]<br>[Host][debian-8.2-host-master] ([Checksum][debian-8.2-host-checksum-master])<br>[Host FX Resolver][debian-8.2-hostfxr-master] ([Checksum][debian-8.2-hostfxr-checksum-master])<br>[Shared Framework][debian-8.2-sharedfx-master] ([Checksum][debian-8.2-sharedfx-checksum-master])<br> | [![][debian-8.2-badge-2.0.X]][debian-8.2-version-2.0.X]<br>[Host][debian-8.2-host-2.0.X] ([Checksum][debian-8.2-host-checksum-2.0.X])<br>[Host FX Resolver][debian-8.2-hostfxr-2.0.X] ([Checksum][debian-8.2-hostfxr-checksum-2.0.X])<br>[Shared Framework][debian-8.2-sharedfx-2.0.X] ([Checksum][debian-8.2-sharedfx-checksum-2.0.X])<br> | [![][debian-8.2-badge-1.1.X]][debian-8.2-version-1.1.X]<br>[Host][debian-8.2-host-1.1.X]<br>[Host FX Resolver][debian-8.2-hostfxr-1.1.X]<br>[Shared Framework][debian-8.2-sharedfx-1.1.X]<br>[tar.gz][debian-8.2-targz-1.1.X] | [![][debian-8.2-badge-preview]][debian-8.2-version-preview]<br>[Host][debian-8.2-host-preview]<br>[Host FX Resolver][debian-8.2-hostfxr-preview]<br>[Shared Framework][debian-8.2-sharedfx-preview]<br>[tar.gz][debian-8.2-targz-preview] |
| **CentOS 7.1 (x64)** | N/A | N/A | [![][centos-badge-1.1.X]][centos-version-1.1.X]<br>[tar.gz][centos-targz-1.1.X] | [![][centos-badge-preview]][centos-version-preview]<br>[tar.gz][centos-targz-preview] |
| **RHEL 7.2 (x64)** | [![][rhel7-badge-master]][rhel7-version-master]<br>[Host][rhel7-host-master] ([Checksum][rhel7-host-checksum-master])<br>[Host FX Resolver][rhel7-hostfxr-master] ([Checksum][rhel7-hostfxr-checksum-master])<br>[Shared Framework][rhel7-sharedfx-master] ([Checksum][rhel7-sharedfx-checksum-master])<br> | [![][rhel7-badge-2.0.X]][rhel7-version-2.0.X]<br>[Host][rhel7-host-2.0.X] ([Checksum][rhel7-host-checksum-2.0.X])<br>[Host FX Resolver][rhel7-hostfxr-2.0.X] ([Checksum][rhel7-hostfxr-checksum-2.0.X])<br>[Shared Framework][rhel7-sharedfx-2.0.X] ([Checksum][rhel7-sharedfx-checksum-2.0.X])<br> | [![][rhel-badge-1.1.X]][rhel-version-1.1.X]<br>[tar.gz][rhel-targz-1.1.X] | [![][rhel-badge-preview]][rhel-version-preview]<br>[tar.gz][rhel-targz-preview] |
| **Fedora 23 (x64)** | N/A | N/A | [![][fedora-23-badge-1.1.X]][fedora-23-version-1.1.X]<br>[tar.gz][fedora-23-targz-1.1.X] | [![][fedora-23-badge-preview]][fedora-23-version-preview]<br>[tar.gz][fedora-23-targz-preview] |
| **Fedora 24 (x64)** | N/A | N/A | [![][fedora-24-badge-1.1.X]][fedora-24-version-1.1.X]<br>[tar.gz][fedora-24-targz-1.1.X] | N/A |
| **OpenSUSE 42.1 (x64)** | N/A | N/A | [![][opensuse-42.1-badge-1.1.X]][opensuse-42.1-version-1.1.X]<br>[tar.gz][opensuse-42.1-targz-1.1.X] | N/A |
*Note: Our .deb packages are put together slightly differently than the other OS specific installers. Instead of combining everything, we have separate component packages that depend on each other. If you're installing these directly from the .deb files (via dpkg or similar), then you'll need to install them in the order presented above.*
[build-badge-master]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/3160/badge
[build-master]: https://devdiv.visualstudio.com/DevDiv/_build/index?definitionId=3160&_a=completed
[build-badge-2.0.X]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6161/badge
[build-2.0.X]: https://devdiv.visualstudio.com/DevDiv/_build/index?definitionId=6161&_a=completed
[build-badge-1.X.X]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/4188/badge
[build-1.X.X]: https://devdiv.visualstudio.com/DevDiv/_build/index?definitionId=4188&_a=completed
@ -62,10 +64,21 @@ Daily Builds
[build-1.0.X]: https://devdiv.visualstudio.com/DevDiv/_build/index?definitionId=4187&_a=completed
[win-x64-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/sharedfx_Windows_x64_Release_version_badge.svg
[win-x64-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/dnvm/latest.sharedfx.win.x64.version
[win-x64-installer-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Installers/Latest/dotnet-win-x64.latest.exe
[win-x64-zip-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/dotnet-win-x64.latest.zip
[win-x64-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/sharedfx_win-x64_Release_version_badge.svg
[win-x64-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/latest.sharedfx.win.x64.version
[win-x64-installer-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-win-x64.exe
[win-x64-installer-checksum-master]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-win-x64.exe.sha512
[win-x64-zip-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-win-x64.zip
[win-x64-zip-checksum-master]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-win-x64.zip.sha512
[win-x64-symbols-zip-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-symbols-latest-win-x64.zip
[win-x64-badge-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/sharedfx_win-x64_Release_version_badge.svg
[win-x64-version-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/latest.sharedfx.win.x64.version
[win-x64-installer-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-win-x64.exe
[win-x64-installer-checksum-2.0.X]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-win-x64.exe.sha512
[win-x64-zip-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-win-x64.zip
[win-x64-zip-checksum-2.0.X]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-win-x64.zip.sha512
[win-x64-symbols-zip-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-symbols-latest-win-x64.zip
[win-x64-badge-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/Binaries/Latest/sharedfx_Windows_x64_Release_version_badge.svg
[win-x64-version-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/dnvm/latest.sharedfx.win.x64.version
@ -77,10 +90,21 @@ Daily Builds
[win-x64-installer-preview]: https://dotnetcli.blob.core.windows.net/dotnet/preview/Installers/Latest/dotnet-win-x64.latest.exe
[win-x64-zip-preview]: https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-win-x64.latest.zip
[win-x86-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/sharedfx_Windows_x86_Release_version_badge.svg
[win-x86-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/dnvm/latest.sharedfx.win.x86.version
[win-x86-installer-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Installers/Latest/dotnet-win-x86.latest.exe
[win-x86-zip-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/dotnet-win-x86.latest.zip
[win-x86-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/sharedfx_win-x86_Release_version_badge.svg
[win-x86-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/latest.sharedfx.win.x86.version
[win-x86-installer-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-win-x86.exe
[win-x86-installer-checksum-master]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-win-x86.exe.sha512
[win-x86-zip-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-win-x86.zip
[win-x86-zip-checksum-master]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-win-x86.zip.sha512
[win-x86-symbols-zip-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-symbols-latest-win-x86.zip
[win-x86-badge-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/sharedfx_win-x86_Release_version_badge.svg
[win-x86-version-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/latest.sharedfx.win.x86.version
[win-x86-installer-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-win-x86.exe
[win-x86-installer-checksum-2.0.X]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-win-x86.exe.sha512
[win-x86-zip-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-win-x86.zip
[win-x86-zip-checksum-2.0.X]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-win-x86.zip.sha512
[win-x86-symbols-zip-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-symbols-latest-win-x86.zip
[win-x86-badge-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/Binaries/Latest/sharedfx_Windows_x86_Release_version_badge.svg
[win-x86-version-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/dnvm/latest.sharedfx.win.x86.version
@ -92,19 +116,45 @@ Daily Builds
[win-x86-installer-preview]: https://dotnetcli.blob.core.windows.net/dotnet/preview/Installers/Latest/dotnet-win-x86.latest.exe
[win-x86-zip-preview]: https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-win-x86.latest.zip
[win-arm-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/sharedfx_Windows_arm_Release_version_badge.svg
[win-arm-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/dnvm/latest.sharedfx.win.arm.version
[win-arm-zip-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/dotnet-win-arm.latest.zip
[win-arm-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/sharedfx_win-arm_Release_version_badge.svg
[win-arm-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/latest.sharedfx.win.arm.version
[win-arm-zip-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-win-arm.zip
[win-arm-zip-checksum-master]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-win-arm.zip.sha512
[win-arm-symbols-zip-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-symbols-latest-win-arm.zip
[win-arm64-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/sharedfx_Windows_arm64_Release_version_badge.svg
[win-arm64-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/dnvm/latest.sharedfx.win.arm64.version
[win-arm64-zip-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/dotnet-win-arm64.latest.zip
[win-arm-badge-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/sharedfx_win-arm_Release_version_badge.svg
[win-arm-version-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/latest.sharedfx.win.arm.version
[win-arm-zip-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-win-arm.zip
[win-arm-zip-checksum-2.0.X]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-win-arm.zip.sha512
[win-arm-symbols-zip-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-symbols-latest-win-arm.zip
[win-arm64-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/sharedfx_win-arm64_Release_version_badge.svg
[win-arm64-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/latest.sharedfx.win.arm64.version
[win-arm64-zip-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-win-arm64.zip
[win-arm64-zip-checksum-master]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-win-arm64.zip.sha512
[win-arm64-symbols-zip-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-symbols-latest-win-arm64.zip
[osx-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/sharedfx_OSX_x64_Release_version_badge.svg
[osx-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/dnvm/latest.sharedfx.osx.x64.version
[osx-installer-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Installers/Latest/dotnet-osx-x64.latest.pkg
[osx-targz-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/dotnet-osx-x64.latest.tar.gz
[win-arm64-badge-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/sharedfx_win-arm64_Release_version_badge.svg
[win-arm64-version-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/latest.sharedfx.win.arm64.version
[win-arm64-zip-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-win-arm64.zip
[win-arm64-zip-checksum-2.0.X]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-win-arm64.zip.sha512
[win-arm64-symbols-zip-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-symbols-latest-win-arm64.zip
[osx-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/sharedfx_osx-x64_Release_version_badge.svg
[osx-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/latest.sharedfx.osx.x64.version
[osx-installer-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-osx-x64.pkg
[osx-installer-checksum-master]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-osx-x64.pkg.sha512
[osx-targz-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-osx-x64.tar.gz
[osx-targz-checksum-master]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-osx-x64.tar.gz.sha512
[osx-symbols-targz-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-symbols-latest-osx-x64.tar.gz
[osx-badge-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/sharedfx_osx-x64_Release_version_badge.svg
[osx-version-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/latest.sharedfx.osx.x64.version
[osx-installer-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-osx-x64.pkg
[osx-installer-checksum-2.0.X]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-osx-x64.pkg.sha512
[osx-targz-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-osx-x64.tar.gz
[osx-targz-checksum-2.0.X]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-osx-x64.tar.gz.sha512
[osx-symbols-targz-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-symbols-latest-osx-x64.tar.gz
[osx-badge-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/Binaries/Latest/sharedfx_OSX_x64_Release_version_badge.svg
[osx-version-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/dnvm/latest.sharedfx.osx.x64.version
@ -116,16 +166,48 @@ Daily Builds
[osx-installer-preview]: https://dotnetcli.blob.core.windows.net/dotnet/preview/Installers/Latest/dotnet-osx-x64.latest.pkg
[osx-targz-preview]: https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-osx-x64.latest.tar.gz
[linux-x64-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/sharedfx_Linux_x64_Release_version_badge.svg
[linux-x64-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/dnvm/latest.sharedfx.linux.x64.version
[linux-x64-zip-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/dotnet-linux-x64.latest.tar.gz
[ubuntu-14.04-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/sharedfx_Ubuntu_x64_Release_version_badge.svg
[ubuntu-14.04-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/dnvm/latest.sharedfx.ubuntu.x64.version
[ubuntu-14.04-host-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Installers/Latest/dotnet-host-ubuntu-x64.latest.deb
[ubuntu-14.04-hostfxr-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Installers/Latest/dotnet-hostfxr-ubuntu-x64.latest.deb
[ubuntu-14.04-sharedfx-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Installers/Latest/dotnet-sharedframework-ubuntu-x64.latest.deb
[ubuntu-14.04-targz-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/dotnet-ubuntu-x64.latest.tar.gz
[linux-x64-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/sharedfx_linux-x64_Release_version_badge.svg
[linux-x64-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/latest.sharedfx.linux.x64.version
[linux-x64-targz-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-linux-x64.tar.gz
[linux-x64-targz-checksum-master]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-linux-x64tar.gz.sha512
[linux-x64-symbols-targz-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-symbols-latest-linux-x64.tar.gz
[linux-x64-badge-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/sharedfx_linux-x64_Release_version_badge.svg
[linux-x64-version-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/latest.sharedfx.linux.x64.version
[linux-x64-targz-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-linux-x64.tar.gz
[linux-x64-targz-checksum-2.0.X]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-linux-x64.tar.gz.sha512
[linux-x64-symbols-targz-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-symbols-latest-linux-x64.tar.gz
[linux-arm-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/sharedfx_linux-arm_Release_version_badge.svg
[linux-arm-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/latest.sharedfx.linux.arm.version
[linux-arm-targz-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-linux-arm.tar.gz
[linux-arm-targz-checksum-master]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-linux-arm.tar.gz.sha512
[linux-arm-symbols-targz-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-symbols-latest-linux-arm.tar.gz
[linux-arm-badge-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/sharedfx_linux-arm_Release_version_badge.svg
[linux-arm-version-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/latest.sharedfx.linux.arm.version
[linux-arm-targz-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-linux-arm.tar.gz
[linux-arm-targz-checksum-2.0.X]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-linux-arm.tar.gz.sha512
[linux-arm-symbols-targz-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-symbols-latest-linux-arm.tar.gz
[ubuntu-14.04-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/sharedfx_ubuntu.14.04-x64_Release_version_badge.svg
[ubuntu-14.04-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/latest.sharedfx.ubuntu.x64.version
[ubuntu-14.04-host-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-host-latest-ubuntu.14.04-x64.deb
[ubuntu-14.04-host-checksum-master]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/master/dotnet-host-latest-ubuntu.14.04-x64.deb.sha512
[ubuntu-14.04-hostfxr-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-hostfxr-latest-ubuntu.14.04-x64.deb
[ubuntu-14.04-hostfxr-checksum-master]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/master/dotnet-hostfxr-latest-ubuntu.14.04-x64.deb.sha512
[ubuntu-14.04-sharedfx-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-ubuntu.14.04-x64.deb
[ubuntu-14.04-sharedfx-checksum-master]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-ubuntu.14.04-x64.deb.sha512
[ubuntu-14.04-badge-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/sharedfx_ubuntu.14.04-x64_Release_version_badge.svg
[ubuntu-14.04-version-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/latest.sharedfx.ubuntu.x64.version
[ubuntu-14.04-host-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-host-latest-ubuntu.14.04-x64.deb
[ubuntu-14.04-host-checksum-2.0.X]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-host-latest-ubuntu.14.04-x64.deb.sha512
[ubuntu-14.04-hostfxr-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-hostfxr-latest-ubuntu.14.04-x64.deb
[ubuntu-14.04-hostfxr-checksum-2.0.X]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-hostfxr-latest-ubuntu.14.04-x64.deb.sha512
[ubuntu-14.04-sharedfx-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-ubuntu.14.04-x64.deb
[ubuntu-14.04-sharedfx-checksum-2.0.X]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-ubuntu.14.04-x64.deb.sha512
[ubuntu-14.04-badge-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/Binaries/Latest/sharedfx_Ubuntu_x64_Release_version_badge.svg
[ubuntu-14.04-version-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/dnvm/latest.sharedfx.ubuntu.x64.version
@ -141,16 +223,24 @@ Daily Builds
[ubuntu-14.04-sharedfx-preview]: https://dotnetcli.blob.core.windows.net/dotnet/preview/Installers/Latest/dotnet-sharedframework-ubuntu-x64.latest.deb
[ubuntu-14.04-targz-preview]: https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-ubuntu-x64.latest.tar.gz
[ubuntu-14.04-arm-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/sharedfx_Ubuntu_arm_Release_version_badge.svg
[ubuntu-14.04-arm-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/dnvm/latest.sharedfx.ubuntu.arm.version
[ubuntu-14.04-arm-targz-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/dotnet-ubuntu-arm.latest.tar.gz
[ubuntu-16.04-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/sharedfx_Ubuntu_16_04_x64_Release_version_badge.svg
[ubuntu-16.04-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/dnvm/latest.sharedfx.ubuntu.16.04.x64.version
[ubuntu-16.04-host-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Installers/Latest/dotnet-host-ubuntu.16.04-x64.latest.deb
[ubuntu-16.04-hostfxr-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Installers/Latest/dotnet-hostfxr-ubuntu.16.04-x64.latest.deb
[ubuntu-16.04-sharedfx-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Installers/Latest/dotnet-sharedframework-ubuntu.16.04-x64.latest.deb
[ubuntu-16.04-targz-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/dotnet-ubuntu.16.04-x64.latest.tar.gz
[ubuntu-16.04-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/sharedfx_ubuntu.16.04-x64_Release_version_badge.svg
[ubuntu-16.04-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/latest.sharedfx.ubuntu.16.04.x64.version
[ubuntu-16.04-host-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-host-latest-ubuntu.16.04-x64.deb
[ubuntu-16.04-host-checksum-master]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/master/dotnet-host-latest-ubuntu.16.04-x64.deb.sha512
[ubuntu-16.04-hostfxr-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-hostfxr-latest-ubuntu.16.04-x64.deb
[ubuntu-16.04-hostfxr-checksum-master]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/master/dotnet-hostfxr-latest-ubuntu.16.04-x64.deb.sha512
[ubuntu-16.04-sharedfx-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-ubuntu.16.04-x64.deb
[ubuntu-16.04-sharedfx-checksum-master]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-ubuntu.16.04-x64.deb.sha512
[ubuntu-16.04-badge-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/sharedfx_ubuntu.16.04-x64_Release_version_badge.svg
[ubuntu-16.04-version-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/latest.sharedfx.ubuntu.16.04.x64.version
[ubuntu-16.04-host-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-host-latest-ubuntu.16.04-x64.deb
[ubuntu-16.04-host-checksum-2.0.X]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-host-latest-ubuntu.16.04-x64.deb.sha512
[ubuntu-16.04-hostfxr-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-hostfxr-latest-ubuntu.16.04-x64.deb
[ubuntu-16.04-hostfxr-checksum-2.0.X]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-hostfxr-latest-ubuntu.16.04-x64.deb.sha512
[ubuntu-16.04-sharedfx-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-ubuntu.16.04-x64.deb
[ubuntu-16.04-sharedfx-checksum-2.0.X]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-ubuntu.16.04-x64.deb.sha512
[ubuntu-16.04-badge-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/Binaries/Latest/sharedfx_Ubuntu_16_04_x64_Release_version_badge.svg
[ubuntu-16.04-version-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/dnvm/latest.sharedfx.ubuntu.16.04.x64.version
@ -166,9 +256,23 @@ Daily Builds
[ubuntu-16.04-sharedfx-preview]: https://dotnetcli.blob.core.windows.net/dotnet/preview/Installers/Latest/dotnet-sharedframework-ubuntu.16.04-x64.latest.deb
[ubuntu-16.04-targz-preview]: https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-ubuntu.16.04-x64.latest.tar.gz
[ubuntu-16.04-arm-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/sharedfx_Ubuntu_16_04_arm_Release_version_badge.svg
[ubuntu-16.04-arm-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/dnvm/latest.sharedfx.ubuntu.16.04.arm.version
[ubuntu-16.04-arm-targz-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/dotnet-ubuntu.16.04-arm.latest.tar.gz
[ubuntu-16.10-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/sharedfx_ubuntu.16.10-x64_Release_version_badge.svg
[ubuntu-16.10-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/latest.sharedfx.ubuntu.16.10.x64.version
[ubuntu-16.10-host-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-host-latest-ubuntu.16.10-x64.deb
[ubuntu-16.10-host-checksum-master]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/master/dotnet-host-latest-ubuntu.16.10-x64.deb.sha512
[ubuntu-16.10-hostfxr-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-hostfxr-latest-ubuntu.16.10-x64.deb
[ubuntu-16.10-hostfxr-checksum-master]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/master/dotnet-hostfxr-latest-ubuntu.16.10-x64.deb.sha512
[ubuntu-16.10-sharedfx-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-ubuntu.16.10-x64.deb
[ubuntu-16.10-sharedfx-checksum-master]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-ubuntu.16.10-x64.deb.sha512
[ubuntu-16.10-badge-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/sharedfx_ubuntu.16.10-x64_Release_version_badge.svg
[ubuntu-16.10-version-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/latest.sharedfx.ubuntu.16.10.x64.version
[ubuntu-16.10-host-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-host-latest-ubuntu.16.10-x64.deb
[ubuntu-16.10-host-checksum-2.0.X]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-host-latest-ubuntu.16.10-x64.deb.sha512
[ubuntu-16.10-hostfxr-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-hostfxr-latest-ubuntu.16.10-x64.deb
[ubuntu-16.10-hostfxr-checksum-2.0.X]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-hostfxr-latest-ubuntu.16.10-x64.deb.sha512
[ubuntu-16.10-sharedfx-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-ubuntu.16.10-x64.deb
[ubuntu-16.10-sharedfx-checksum-2.0.X]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-ubuntu.16.10-x64.deb.sha512
[ubuntu-16.10-badge-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/Binaries/Latest/sharedfx_Ubuntu_16_10_x64_Release_version_badge.svg
[ubuntu-16.10-version-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/dnvm/latest.sharedfx.ubuntu.16.10.x64.version
@ -177,20 +281,24 @@ Daily Builds
[ubuntu-16.10-sharedfx-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/Installers/Latest/dotnet-sharedframework-ubuntu.16.10-x64.latest.deb
[ubuntu-16.10-targz-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/Binaries/Latest/dotnet-ubuntu.16.10-x64.latest.tar.gz
[ubuntu-16.10-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/sharedfx_Ubuntu_16_10_x64_Release_version_badge.svg
[ubuntu-16.10-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/dnvm/latest.sharedfx.ubuntu.16.10.x64.version
[ubuntu-16.10-host-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Installers/Latest/dotnet-host-ubuntu.16.10-x64.latest.deb
[ubuntu-16.10-hostfxr-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Installers/Latest/dotnet-hostfxr-ubuntu.16.10-x64.latest.deb
[ubuntu-16.10-sharedfx-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Installers/Latest/dotnet-sharedframework-ubuntu.16.10-x64.latest.deb
[ubuntu-16.10-targz-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/dotnet-ubuntu.16.10-x64.latest.tar.gz
[debian-8.2-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/sharedfx_debian.8-x64_Release_version_badge.svg
[debian-8.2-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/latest.sharedfx.debian.8.x64.version
[debian-8.2-host-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-host-latest-debian.8-x64.deb
[debian-8.2-host-checksum-master]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/master/dotnet-host-latest-debian.8-x64.deb.sha512
[debian-8.2-hostfxr-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-hostfxr-latest-debian.8-x64.deb
[debian-8.2-hostfxr-checksum-master]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/master/dotnet-hostfxr-latest-debian.8-x64.deb.sha512
[debian-8.2-sharedfx-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-debian.8-x64.deb
[debian-8.2-sharedfx-checksum-master]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-debian.8-x64.deb.sha512
[debian-8.2-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/sharedfx_Debian_x64_Release_version_badge.svg
[debian-8.2-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/dnvm/latest.sharedfx.debian.x64.version
[debian-8.2-host-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Installers/Latest/dotnet-host-debian-x64.latest.deb
[debian-8.2-hostfxr-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Installers/Latest/dotnet-hostfxr-debian-x64.latest.deb
[debian-8.2-sharedfx-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Installers/Latest/dotnet-sharedframework-debian-x64.latest.deb
[debian-8.2-targz-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/dotnet-debian-x64.latest.tar.gz
[debian-8.2-badge-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/sharedfx_debian.8-x64_Release_version_badge.svg
[debian-8.2-version-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/latest.sharedfx.debian.8.x64.version
[debian-8.2-host-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-host-latest-debian.8-x64.deb
[debian-8.2-host-checksum-2.0.X]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-host-latest-debian.8-x64.deb.sha512
[debian-8.2-hostfxr-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-hostfxr-latest-debian.8-x64.deb
[debian-8.2-hostfxr-checksum-2.0.X]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-hostfxr-latest-debian.8-x64.deb.sha512
[debian-8.2-sharedfx-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-debian.8-x64.deb
[debian-8.2-sharedfx-checksum-2.0.X]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-debian.8-x64.deb.sha512
[debian-8.2-badge-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/Binaries/Latest/sharedfx_Debian_x64_Release_version_badge.svg
[debian-8.2-version-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/dnvm/latest.sharedfx.debian.x64.version
@ -206,11 +314,6 @@ Daily Builds
[debian-8.2-sharedfx-preview]: https://dotnetcli.blob.core.windows.net/dotnet/preview/Installers/Latest/dotnet-sharedframework-debian-x64.latest.deb
[debian-8.2-targz-preview]: https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-debian-x64.latest.tar.gz
[centos-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/sharedfx_CentOS_x64_Release_version_badge.svg
[centos-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/dnvm/latest.sharedfx.centos.x64.version
[centos-targz-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/dotnet-centos-x64.latest.tar.gz
[centos-badge-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/Binaries/Latest/sharedfx_CentOS_x64_Release_version_badge.svg
[centos-version-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/dnvm/latest.sharedfx.centos.x64.version
[centos-targz-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/Binaries/Latest/dotnet-centos-x64.latest.tar.gz
@ -219,10 +322,23 @@ Daily Builds
[centos-version-preview]: https://dotnetcli.blob.core.windows.net/dotnet/preview/dnvm/latest.sharedfx.centos.x64.version
[centos-targz-preview]: https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-centos-x64.latest.tar.gz
[rhel7-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/sharedfx_rhel.7-x64_Release_version_badge.svg
[rhel7-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/latest.sharedfx.rhel.7.x64.version
[rhel7-host-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-host-latest-rhel.7-x64.rpm
[rhel7-host-checksum-master]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/master/dotnet-host-latest-rhel.7-x64.rpm.sha512
[rhel7-hostfxr-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-hostfxr-latest-rhel.7-x64.rpm
[rhel7-hostfxr-checksum-master]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/master/dotnet-hostfxr-latest-rhel.7-x64.rpm.sha512
[rhel7-sharedfx-master]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-rhel.7-x64.rpm
[rhel7-sharedfx-checksum-master]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-rhel.7-x64.rpm.sha512
[rhel-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/sharedfx_RHEL_x64_Release_version_badge.svg
[rhel-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/dnvm/latest.sharedfx.rhel.x64.version
[rhel-targz-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/dotnet-rhel-x64.latest.tar.gz
[rhel7-badge-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/sharedfx_rhel.7-x64_Release_version_badge.svg
[rhel7-version-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/latest.sharedfx.rhel.7.x64.version
[rhel7-host-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-host-latest-rhel.7-x64.rpm
[rhel7-host-checksum-2.0.X]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-host-latest-rhel.7-x64.rpm.sha512
[rhel7-hostfxr-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-hostfxr-latest-rhel.7-x64.rpm
[rhel7-hostfxr-checksum-2.0.X]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-hostfxr-latest-rhel.7-x64.rpm.sha512
[rhel7-sharedfx-2.0.X]: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-rhel.7-x64.rpm
[rhel7-sharedfx-checksum-2.0.X]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-rhel.7-x64.rpm.sha512
[rhel-badge-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/Binaries/Latest/sharedfx_RHEL_x64_Release_version_badge.svg
[rhel-version-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/dnvm/latest.sharedfx.rhel.x64.version
@ -233,32 +349,47 @@ Daily Builds
[rhel-targz-preview]: https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-rhel-x64.latest.tar.gz
[fedora-23-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/sharedfx_Fedora_23_x64_Release_version_badge.svg
[fedora-23-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/dnvm/latest.sharedfx.fedora.x64.version
[fedora-23-targz-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/dotnet-fedora-x64.latest.tar.gz
[fedora-23-badge-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/Binaries/Latest/sharedfx_Fedora_23_x64_Release_version_badge.svg
[fedora-23-version-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/dnvm/latest.sharedfx.fedora.x64.version
[fedora-23-targz-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/Binaries/Latest/dotnet-fedora-x64.latest.tar.gz
[fedora-23-version-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/dnvm/latest.sharedfx.fedora.23.x64.version
[fedora-23-targz-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/Binaries/Latest/dotnet-fedora.23-x64.latest.tar.gz
[fedora-23-badge-preview]: https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/sharedfx_Fedora_23_x64_Release_version_badge.svg
[fedora-23-version-preview]: https://dotnetcli.blob.core.windows.net/dotnet/preview/dnvm/latest.sharedfx.fedora.x64.version
[fedora-23-targz-preview]: https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-fedora-x64.latest.tar.gz
[fedora-23-version-preview]: https://dotnetcli.blob.core.windows.net/dotnet/preview/dnvm/latest.sharedfx.fedora.23.x64.version
[fedora-23-targz-preview]: https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-fedora.23-x64.latest.tar.gz
[fedora-24-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/sharedfx_Fedora_24_x64_Release_version_badge.svg
[fedora-24-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/dnvm/latest.sharedfx.fedora.24.x64.version
[fedora-24-targz-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/dotnet-fedora.24-x64.latest.tar.gz
[fedora-24-badge-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/Binaries/Latest/sharedfx_Fedora_24_x64_Release_version_badge.svg
[fedora-24-version-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/dnvm/latest.sharedfx.fedora.24.x64.version
[fedora-24-targz-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/Binaries/Latest/dotnet-fedora.24-x64.latest.tar.gz
[opensuse-42.1-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/sharedfx_openSUSE_42_1_x64_Release_version_badge.svg
[opensuse-42.1-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/dnvm/latest.sharedfx.opensuse.42.1.x64.version
[opensuse-42.1-targz-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/dotnet-opensuse.42.1-x64.latest.tar.gz
[opensuse-42.1-badge-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/Binaries/Latest/sharedfx_openSUSE_42_1_x64_Release_version_badge.svg
[opensuse-42.1-version-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/dnvm/latest.sharedfx.opensuse.42.1.x64.version
[opensuse-42.1-targz-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/Binaries/Latest/dotnet-opensuse.42.1-x64.latest.tar.gz
# Debian daily feed
Newest Runtime binaries for 2.0.0 in debian feed may be delayed due to external issues by up to 24h.
## Obtaining binaries
Add debian feed:
For ubuntu 14.04 : trusty , ubuntu 16.04:xenial
```
sudo sh -c 'echo "deb [arch=amd64] http://apt-mo.trafficmanager.net/repos/dotnet/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893
sudo apt-get update
```
Install:
```
sudo apt-get install <DebianPackageName>=<Version>
```
To list available packages:
```
apt-cache search dotnet-sharedframework | grep 2.0.0
```

30
RepoDirectories.props Normal file
Просмотреть файл

@ -0,0 +1,30 @@
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
<!-- ProjectDir needs to be set for build-tools and legacy usages. New usages should use RepoRoot -->
<ProjectDir>$(RepoRoot)</ProjectDir>
<SourceDir>$(RepoRoot)src/</SourceDir>
<!-- Output directories -->
<BinDir Condition="'$(BinDir)'==''">$(RepoRoot)Bin/</BinDir>
<BaseOutputPath Condition="'$(BaseOutputPath)'==''">$(BinDir)</BaseOutputPath>
<ObjDir Condition="'$(ObjDir)'==''">$(BinDir)obj/</ObjDir>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'==''">$(ObjDir)</BaseIntermediateOutputPath>
<!-- Input Directories -->
<PackagesDir Condition="'$(PackagesDir)'==''">$(RepoRoot)packages/</PackagesDir>
<ToolRuntimePath Condition="'$(ToolRuntimePath)'==''">$(RepoRoot)Tools/</ToolRuntimePath>
<LocalToolRuntimePath Condition="'$(LocalToolRuntimePath)' == ''">$(ToolRuntimePath)local/</LocalToolRuntimePath>
<ToolsDir Condition="'$(UseToolRuntimeForToolsDir)'=='true'">$(ToolRuntimePath)</ToolsDir>
<ToolsDir Condition="'$(ToolsDir)'==''">$(RepoRoot)Tools/</ToolsDir>
<BuildToolsTaskCoreDir>$(ToolsDir)</BuildToolsTaskCoreDir>
<BuildToolsTaskDesktopDir>$(ToolsDir)net46/</BuildToolsTaskDesktopDir>
<BuildToolsTaskDir>$(BuildToolsTaskCoreDir)</BuildToolsTaskDir>
<BuildToolsTaskDir Condition="'$(MSBuildRuntimeType)' != 'Core'">$(BuildToolsTaskDesktopDir)</BuildToolsTaskDir>
<LocalBuildToolsTaskDir>$(LocalToolRuntimePath)</LocalBuildToolsTaskDir>
<LocalBuildToolsTaskDir Condition="'$(MSBuildRuntimeType)' != 'Core'">$(LocalToolRuntimePath)net46/</LocalBuildToolsTaskDir>
<PackagingTaskDir Condition="'$(BuildToolsTaskDir)' != ''">$(BuildToolsTaskDir)</PackagingTaskDir>
<DotnetCliPath Condition="'$(DotnetCliPath)'==''">$(ToolsDir)dotnetcli/</DotnetCliPath>
</PropertyGroup>
</Project>

Просмотреть файл

Просмотреть файл

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0.25123" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0.25123</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>e484fcd8-e438-4559-a745-e58574263abd</ProjectGuid>
<RootNamespace>PortableApp</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>

Просмотреть файл

@ -1,386 +0,0 @@
{
"buildOptions": {
"emitEntryPoint": true
},
"dependencies": {},
"frameworks": {
"netcoreapp2.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "2.0.0-beta-*"
},
"Newtonsoft.Json": "9.0.1-beta1",
"Microsoft.CodeAnalysis.Analyzers": {
"version": "1.1.0",
"exclude": "all"
},
"Microsoft.CSharp": {
"version": "4.3.0",
"exclude": "all"
},
"Microsoft.DiaSymReader.Native": {
"version": "1.4.0",
"exclude": "all"
},
"Microsoft.VisualBasic": {
"version": "10.1.0",
"exclude": "all"
},
"Microsoft.Win32.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"Microsoft.Win32.Registry": {
"version": "4.3.0",
"exclude": "all"
},
"System.AppContext": {
"version": "4.3.0",
"exclude": "all"
},
"System.Buffers": {
"version": "4.3.0",
"exclude": "all"
},
"System.Collections": {
"version": "4.3.0",
"exclude": "all"
},
"System.Collections.Concurrent": {
"version": "4.3.0",
"exclude": "all"
},
"System.Collections.Immutable": {
"version": "1.3.0",
"exclude": "all"
},
"System.ComponentModel": {
"version": "4.3.0",
"exclude": "all"
},
"System.ComponentModel.Annotations": {
"version": "4.3.0",
"exclude": "all"
},
"System.Console": {
"version": "4.3.0",
"exclude": "all"
},
"System.Diagnostics.Debug": {
"version": "4.3.0",
"exclude": "all"
},
"System.Diagnostics.DiagnosticSource": {
"version": "4.3.0",
"exclude": "all"
},
"System.Diagnostics.FileVersionInfo": {
"version": "4.0.0",
"exclude": "all"
},
"System.Diagnostics.Process": {
"version": "4.3.0",
"exclude": "all"
},
"System.Diagnostics.StackTrace": {
"version": "4.0.1",
"exclude": "all"
},
"System.Diagnostics.Tools": {
"version": "4.3.0",
"exclude": "all"
},
"System.Diagnostics.Tracing": {
"version": "4.3.0",
"exclude": "all"
},
"System.Dynamic.Runtime": {
"version": "4.3.0",
"exclude": "all"
},
"System.Globalization": {
"version": "4.3.0",
"exclude": "all"
},
"System.Globalization.Calendars": {
"version": "4.3.0",
"exclude": "all"
},
"System.Globalization.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.Compression": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.Compression.ZipFile": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.FileSystem": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.FileSystem.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.FileSystem.Watcher": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.MemoryMappedFiles": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.UnmanagedMemoryStream": {
"version": "4.3.0",
"exclude": "all"
},
"System.Linq": {
"version": "4.3.0",
"exclude": "all"
},
"System.Linq.Expressions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Linq.Parallel": {
"version": "4.3.0",
"exclude": "all"
},
"System.Linq.Queryable": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.Http": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.NameResolution": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.Requests": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.Security": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.Sockets": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.WebHeaderCollection": {
"version": "4.3.0",
"exclude": "all"
},
"System.Numerics.Vectors": {
"version": "4.3.0",
"exclude": "all"
},
"System.ObjectModel": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.DispatchProxy": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.Emit": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.Emit.ILGeneration": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.Emit.Lightweight": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.Metadata": {
"version": "1.4.1",
"exclude": "all"
},
"System.Reflection.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.TypeExtensions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Resources.Reader": {
"version": "4.3.0",
"exclude": "all"
},
"System.Resources.ResourceManager": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime.Handles": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime.InteropServices": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime.InteropServices.RuntimeInformation": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime.Loader": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime.Numerics": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Claims": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.Algorithms": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.Cng": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.Csp": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.Encoding": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.OpenSsl": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.X509Certificates": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Principal": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Principal.Windows": {
"version": "4.3.0",
"exclude": "all"
},
"System.Text.Encoding": {
"version": "4.3.0",
"exclude": "all"
},
"System.Text.Encoding.CodePages": {
"version": "4.0.1",
"exclude": "all"
},
"System.Text.Encoding.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Text.RegularExpressions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.Overlapped": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.Tasks": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.Tasks.Dataflow": {
"version": "4.7.0",
"exclude": "all"
},
"System.Threading.Tasks.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.Tasks.Parallel": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.Thread": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.ThreadPool": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.Timer": {
"version": "4.3.0",
"exclude": "all"
},
"System.Xml.ReaderWriter": {
"version": "4.3.0",
"exclude": "all"
},
"System.Xml.XDocument": {
"version": "4.3.0",
"exclude": "all"
},
"System.Xml.XmlDocument": {
"version": "4.0.1",
"exclude": "all"
},
"System.Xml.XPath": {
"version": "4.0.1",
"exclude": "all"
},
"System.Xml.XPath.XDocument": {
"version": "4.0.1",
"exclude": "all"
}
}
}
}
}

Просмотреть файл

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0.25123" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0.25123</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>e484fcd8-e438-4559-a745-e58574263abd</ProjectGuid>
<RootNamespace>PortableApp</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>

Просмотреть файл

@ -1,393 +0,0 @@
{
"testRunner": "xunit",
"dependencies": {},
"frameworks": {
"netcoreapp2.0": {
"imports": [
"dotnet5.4",
"portable-net451+win8"
],
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "2.0.0-beta-*"
},
"Newtonsoft.Json": "9.0.1-beta1",
"xunit": "2.1.0",
"xunit.netcore.extensions": "1.0.0-prerelease-00206",
"dotnet-test-xunit": "1.0.0-rc2-192208-24",
"Microsoft.CodeAnalysis.Analyzers": {
"version": "1.1.0",
"exclude": "all"
},
"Microsoft.CSharp": {
"version": "4.3.0",
"exclude": "all"
},
"Microsoft.DiaSymReader.Native": {
"version": "1.4.0",
"exclude": "all"
},
"Microsoft.VisualBasic": {
"version": "10.1.0",
"exclude": "all"
},
"Microsoft.Win32.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"Microsoft.Win32.Registry": {
"version": "4.3.0",
"exclude": "all"
},
"System.AppContext": {
"version": "4.3.0",
"exclude": "all"
},
"System.Buffers": {
"version": "4.3.0",
"exclude": "all"
},
"System.Collections": {
"version": "4.3.0",
"exclude": "all"
},
"System.Collections.Concurrent": {
"version": "4.3.0",
"exclude": "all"
},
"System.Collections.Immutable": {
"version": "1.3.0",
"exclude": "all"
},
"System.ComponentModel": {
"version": "4.3.0",
"exclude": "all"
},
"System.ComponentModel.Annotations": {
"version": "4.3.0",
"exclude": "all"
},
"System.Console": {
"version": "4.3.0",
"exclude": "all"
},
"System.Diagnostics.Debug": {
"version": "4.3.0",
"exclude": "all"
},
"System.Diagnostics.DiagnosticSource": {
"version": "4.3.0",
"exclude": "all"
},
"System.Diagnostics.FileVersionInfo": {
"version": "4.0.0",
"exclude": "all"
},
"System.Diagnostics.Process": {
"version": "4.3.0",
"exclude": "all"
},
"System.Diagnostics.StackTrace": {
"version": "4.0.1",
"exclude": "all"
},
"System.Diagnostics.Tools": {
"version": "4.3.0",
"exclude": "all"
},
"System.Diagnostics.Tracing": {
"version": "4.3.0",
"exclude": "all"
},
"System.Dynamic.Runtime": {
"version": "4.3.0",
"exclude": "all"
},
"System.Globalization": {
"version": "4.3.0",
"exclude": "all"
},
"System.Globalization.Calendars": {
"version": "4.3.0",
"exclude": "all"
},
"System.Globalization.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.Compression": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.Compression.ZipFile": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.FileSystem": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.FileSystem.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.FileSystem.Watcher": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.MemoryMappedFiles": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.UnmanagedMemoryStream": {
"version": "4.3.0",
"exclude": "all"
},
"System.Linq": {
"version": "4.3.0",
"exclude": "all"
},
"System.Linq.Expressions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Linq.Parallel": {
"version": "4.3.0",
"exclude": "all"
},
"System.Linq.Queryable": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.Http": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.NameResolution": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.Requests": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.Security": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.Sockets": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.WebHeaderCollection": {
"version": "4.3.0",
"exclude": "all"
},
"System.Numerics.Vectors": {
"version": "4.3.0",
"exclude": "all"
},
"System.ObjectModel": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.DispatchProxy": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.Emit": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.Emit.ILGeneration": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.Emit.Lightweight": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.Metadata": {
"version": "1.4.1",
"exclude": "all"
},
"System.Reflection.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.TypeExtensions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Resources.Reader": {
"version": "4.3.0",
"exclude": "all"
},
"System.Resources.ResourceManager": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime.Handles": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime.InteropServices": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime.InteropServices.RuntimeInformation": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime.Loader": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime.Numerics": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Claims": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.Algorithms": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.Cng": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.Csp": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.Encoding": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.OpenSsl": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.X509Certificates": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Principal": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Principal.Windows": {
"version": "4.3.0",
"exclude": "all"
},
"System.Text.Encoding": {
"version": "4.3.0",
"exclude": "all"
},
"System.Text.Encoding.CodePages": {
"version": "4.0.1",
"exclude": "all"
},
"System.Text.Encoding.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Text.RegularExpressions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.Overlapped": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.Tasks": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.Tasks.Dataflow": {
"version": "4.7.0",
"exclude": "all"
},
"System.Threading.Tasks.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.Tasks.Parallel": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.Thread": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.ThreadPool": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.Timer": {
"version": "4.3.0",
"exclude": "all"
},
"System.Xml.ReaderWriter": {
"version": "4.3.0",
"exclude": "all"
},
"System.Xml.XDocument": {
"version": "4.3.0",
"exclude": "all"
},
"System.Xml.XmlDocument": {
"version": "4.0.1",
"exclude": "all"
},
"System.Xml.XPath": {
"version": "4.0.1",
"exclude": "all"
},
"System.Xml.XPath.XDocument": {
"version": "4.0.1",
"exclude": "all"
}
}
}
}
}

Просмотреть файл

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0.25123" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0.25123</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>e484fcd8-e438-4559-a745-e58574263abd</ProjectGuid>
<RootNamespace>PortableApp</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>

Просмотреть файл

@ -1,386 +0,0 @@
{
"buildOptions": {
"emitEntryPoint": true
},
"dependencies": {},
"frameworks": {
"netcoreapp2.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "2.0.0-beta-*"
},
"Newtonsoft.Json": "9.0.1-beta1",
"Microsoft.CodeAnalysis.Analyzers": {
"version": "1.1.0",
"exclude": "all"
},
"Microsoft.CSharp": {
"version": "4.3.0",
"exclude": "all"
},
"Microsoft.DiaSymReader.Native": {
"version": "1.4.0",
"exclude": "all"
},
"Microsoft.VisualBasic": {
"version": "10.1.0",
"exclude": "all"
},
"Microsoft.Win32.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"Microsoft.Win32.Registry": {
"version": "4.3.0",
"exclude": "all"
},
"System.AppContext": {
"version": "4.3.0",
"exclude": "all"
},
"System.Buffers": {
"version": "4.3.0",
"exclude": "all"
},
"System.Collections": {
"version": "4.3.0",
"exclude": "all"
},
"System.Collections.Concurrent": {
"version": "4.3.0",
"exclude": "all"
},
"System.Collections.Immutable": {
"version": "1.3.0",
"exclude": "all"
},
"System.ComponentModel": {
"version": "4.3.0",
"exclude": "all"
},
"System.ComponentModel.Annotations": {
"version": "4.3.0",
"exclude": "all"
},
"System.Console": {
"version": "4.3.0",
"exclude": "all"
},
"System.Diagnostics.Debug": {
"version": "4.3.0",
"exclude": "all"
},
"System.Diagnostics.DiagnosticSource": {
"version": "4.3.0",
"exclude": "all"
},
"System.Diagnostics.FileVersionInfo": {
"version": "4.0.0",
"exclude": "all"
},
"System.Diagnostics.Process": {
"version": "4.3.0",
"exclude": "all"
},
"System.Diagnostics.StackTrace": {
"version": "4.0.1",
"exclude": "all"
},
"System.Diagnostics.Tools": {
"version": "4.3.0",
"exclude": "all"
},
"System.Diagnostics.Tracing": {
"version": "4.3.0",
"exclude": "all"
},
"System.Dynamic.Runtime": {
"version": "4.3.0",
"exclude": "all"
},
"System.Globalization": {
"version": "4.3.0",
"exclude": "all"
},
"System.Globalization.Calendars": {
"version": "4.3.0",
"exclude": "all"
},
"System.Globalization.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.Compression": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.Compression.ZipFile": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.FileSystem": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.FileSystem.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.FileSystem.Watcher": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.MemoryMappedFiles": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.UnmanagedMemoryStream": {
"version": "4.3.0",
"exclude": "all"
},
"System.Linq": {
"version": "4.3.0",
"exclude": "all"
},
"System.Linq.Expressions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Linq.Parallel": {
"version": "4.3.0",
"exclude": "all"
},
"System.Linq.Queryable": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.Http": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.NameResolution": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.Requests": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.Security": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.Sockets": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.WebHeaderCollection": {
"version": "4.3.0",
"exclude": "all"
},
"System.Numerics.Vectors": {
"version": "4.3.0",
"exclude": "all"
},
"System.ObjectModel": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.DispatchProxy": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.Emit": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.Emit.ILGeneration": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.Emit.Lightweight": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.Metadata": {
"version": "1.4.1",
"exclude": "all"
},
"System.Reflection.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.TypeExtensions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Resources.Reader": {
"version": "4.3.0",
"exclude": "all"
},
"System.Resources.ResourceManager": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime.Handles": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime.InteropServices": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime.InteropServices.RuntimeInformation": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime.Loader": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime.Numerics": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Claims": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.Algorithms": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.Cng": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.Csp": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.Encoding": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.OpenSsl": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.X509Certificates": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Principal": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Principal.Windows": {
"version": "4.3.0",
"exclude": "all"
},
"System.Text.Encoding": {
"version": "4.3.0",
"exclude": "all"
},
"System.Text.Encoding.CodePages": {
"version": "4.0.1",
"exclude": "all"
},
"System.Text.Encoding.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Text.RegularExpressions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.Overlapped": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.Tasks": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.Tasks.Dataflow": {
"version": "4.7.0",
"exclude": "all"
},
"System.Threading.Tasks.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.Tasks.Parallel": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.Thread": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.ThreadPool": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.Timer": {
"version": "4.3.0",
"exclude": "all"
},
"System.Xml.ReaderWriter": {
"version": "4.3.0",
"exclude": "all"
},
"System.Xml.XDocument": {
"version": "4.3.0",
"exclude": "all"
},
"System.Xml.XmlDocument": {
"version": "4.0.1",
"exclude": "all"
},
"System.Xml.XPath": {
"version": "4.0.1",
"exclude": "all"
},
"System.Xml.XPath.XDocument": {
"version": "4.0.1",
"exclude": "all"
}
}
}
}
}

Просмотреть файл

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0.25123" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0.25123</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>9232aba5-e93c-4f80-821a-c98f6064a4bc</ProjectGuid>
<RootNamespace>StandaloneApp</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>

Просмотреть файл

@ -1,978 +0,0 @@
{
"buildOptions": {
"emitEntryPoint": true
},
"frameworks": {
"netcoreapp2.0": {
"dependencies": {
"Microsoft.NETCore.App": "2.0.0-beta-*",
"Newtonsoft.Json": "9.0.1-beta1",
"Microsoft.CodeAnalysis.Analyzers": {
"version": "1.1.0",
"exclude": "all"
},
"Microsoft.CSharp": {
"version": "4.3.0",
"exclude": "all"
},
"Microsoft.DiaSymReader.Native": {
"version": "1.4.0",
"exclude": "all"
},
"Microsoft.VisualBasic": {
"version": "10.1.0",
"exclude": "all"
},
"Microsoft.Win32.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"Microsoft.Win32.Registry": {
"version": "4.3.0",
"exclude": "all"
},
"System.AppContext": {
"version": "4.3.0",
"exclude": "all"
},
"System.Buffers": {
"version": "4.3.0",
"exclude": "all"
},
"System.Collections": {
"version": "4.3.0",
"exclude": "all"
},
"System.Collections.Concurrent": {
"version": "4.3.0",
"exclude": "all"
},
"System.Collections.Immutable": {
"version": "1.3.0",
"exclude": "all"
},
"System.ComponentModel": {
"version": "4.3.0",
"exclude": "all"
},
"System.ComponentModel.Annotations": {
"version": "4.3.0",
"exclude": "all"
},
"System.Console": {
"version": "4.3.0",
"exclude": "all"
},
"System.Diagnostics.Debug": {
"version": "4.3.0",
"exclude": "all"
},
"System.Diagnostics.DiagnosticSource": {
"version": "4.3.0",
"exclude": "all"
},
"System.Diagnostics.FileVersionInfo": {
"version": "4.0.0",
"exclude": "all"
},
"System.Diagnostics.Process": {
"version": "4.3.0",
"exclude": "all"
},
"System.Diagnostics.StackTrace": {
"version": "4.0.1",
"exclude": "all"
},
"System.Diagnostics.Tools": {
"version": "4.3.0",
"exclude": "all"
},
"System.Diagnostics.Tracing": {
"version": "4.3.0",
"exclude": "all"
},
"System.Dynamic.Runtime": {
"version": "4.3.0",
"exclude": "all"
},
"System.Globalization": {
"version": "4.3.0",
"exclude": "all"
},
"System.Globalization.Calendars": {
"version": "4.3.0",
"exclude": "all"
},
"System.Globalization.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.Compression": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.Compression.ZipFile": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.FileSystem": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.FileSystem.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.FileSystem.Watcher": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.MemoryMappedFiles": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.UnmanagedMemoryStream": {
"version": "4.3.0",
"exclude": "all"
},
"System.Linq": {
"version": "4.3.0",
"exclude": "all"
},
"System.Linq.Expressions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Linq.Parallel": {
"version": "4.3.0",
"exclude": "all"
},
"System.Linq.Queryable": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.Http": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.NameResolution": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.Requests": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.Security": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.Sockets": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.WebHeaderCollection": {
"version": "4.3.0",
"exclude": "all"
},
"System.Numerics.Vectors": {
"version": "4.3.0",
"exclude": "all"
},
"System.ObjectModel": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.DispatchProxy": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.Emit": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.Emit.ILGeneration": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.Emit.Lightweight": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.Metadata": {
"version": "1.4.1",
"exclude": "all"
},
"System.Reflection.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.TypeExtensions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Resources.Reader": {
"version": "4.3.0",
"exclude": "all"
},
"System.Resources.ResourceManager": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime.Handles": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime.InteropServices": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime.InteropServices.RuntimeInformation": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime.Loader": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime.Numerics": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Claims": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.Algorithms": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.Cng": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.Csp": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.Encoding": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.OpenSsl": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.X509Certificates": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Principal": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Principal.Windows": {
"version": "4.3.0",
"exclude": "all"
},
"System.Text.Encoding": {
"version": "4.3.0",
"exclude": "all"
},
"System.Text.Encoding.CodePages": {
"version": "4.0.1",
"exclude": "all"
},
"System.Text.Encoding.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Text.RegularExpressions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.Overlapped": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.Tasks": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.Tasks.Dataflow": {
"version": "4.7.0",
"exclude": "all"
},
"System.Threading.Tasks.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.Tasks.Parallel": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.Thread": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.ThreadPool": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.Timer": {
"version": "4.3.0",
"exclude": "all"
},
"System.Xml.ReaderWriter": {
"version": "4.3.0",
"exclude": "all"
},
"System.Xml.XDocument": {
"version": "4.3.0",
"exclude": "all"
},
"System.Xml.XmlDocument": {
"version": "4.0.1",
"exclude": "all"
},
"System.Xml.XPath": {
"version": "4.0.1",
"exclude": "all"
},
"System.Xml.XPath.XDocument": {
"version": "4.0.1",
"exclude": "all"
},
"runtime.any.System.Collections": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.any.System.Diagnostics.Tools": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.any.System.Diagnostics.Tracing": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.any.System.Globalization": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.any.System.Globalization.Calendars": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.any.System.IO": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.any.System.Reflection": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.any.System.Reflection.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.any.System.Reflection.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.any.System.Resources.ResourceManager": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.any.System.Runtime": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.any.System.Runtime.Handles": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.any.System.Runtime.InteropServices": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.any.System.Text.Encoding": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.any.System.Text.Encoding.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.any.System.Threading.Tasks": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.any.System.Threading.Timer": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.debian.8-x64.Microsoft.NETCore.DotNetHost": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.debian.8-x64.Microsoft.NETCore.DotNetHostPolicy": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.debian.8-x64.Microsoft.NETCore.DotNetHostResolver": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.debian.8-x64.Microsoft.NETCore.Jit": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.debian.8-x64.Microsoft.NETCore.Runtime.CoreCLR": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.debian.8-x64.runtime.native.System": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.debian.8-x64.runtime.native.System.IO.Compression": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.debian.8-x64.runtime.native.System.Net.Http": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.debian.8-x64.runtime.native.System.Net.Security": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.fedora.23-x64.Microsoft.NETCore.DotNetHost": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.fedora.23-x64.Microsoft.NETCore.DotNetHostPolicy": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.fedora.23-x64.Microsoft.NETCore.DotNetHostResolver": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.fedora.23-x64.Microsoft.NETCore.Jit": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.fedora.23-x64.Microsoft.NETCore.Runtime.CoreCLR": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.fedora.23-x64.runtime.native.System": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.fedora.23-x64.runtime.native.System.IO.Compression": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.fedora.23-x64.runtime.native.System.Net.Http": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.fedora.23-x64.runtime.native.System.Net.Security": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.fedora.24-x64.Microsoft.NETCore.DotNetHost": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.fedora.24-x64.Microsoft.NETCore.DotNetHostPolicy": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.fedora.24-x64.Microsoft.NETCore.DotNetHostResolver": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.fedora.24-x64.Microsoft.NETCore.Jit": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.fedora.24-x64.Microsoft.NETCore.Runtime.CoreCLR": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.fedora.24-x64.runtime.native.System": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.fedora.24-x64.runtime.native.System.IO.Compression": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.fedora.24-x64.runtime.native.System.Net.Http": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.fedora.24-x64.runtime.native.System.Net.Security": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.native.System": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.native.System.IO.Compression": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.native.System.Net.Http": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.native.System.Net.Security": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.native.System.Security.Cryptography.Apple": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.native.System.Security.Cryptography.OpenSsl": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.opensuse.42.1-x64.Microsoft.NETCore.DotNetHost": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.opensuse.42.1-x64.Microsoft.NETCore.DotNetHostPolicy": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.opensuse.42.1-x64.Microsoft.NETCore.DotNetHostResolver": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.opensuse.42.1-x64.Microsoft.NETCore.Jit": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.opensuse.42.1-x64.Microsoft.NETCore.Runtime.CoreCLR": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.opensuse.42.1-x64.runtime.native.System": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.opensuse.42.1-x64.runtime.native.System.IO.Compression": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.opensuse.42.1-x64.runtime.native.System.Net.Http": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.opensuse.42.1-x64.runtime.native.System.Net.Security": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.osx.10.10-x64.Microsoft.NETCore.DotNetHost": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.osx.10.10-x64.Microsoft.NETCore.DotNetHostPolicy": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.osx.10.10-x64.Microsoft.NETCore.DotNetHostResolver": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.osx.10.10-x64.Microsoft.NETCore.Jit": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.osx.10.10-x64.Microsoft.NETCore.Runtime.CoreCLR": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.osx.10.10-x64.runtime.native.System": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.osx.10.10-x64.runtime.native.System.IO.Compression": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.osx.10.10-x64.runtime.native.System.Net.Http": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.osx.10.10-x64.runtime.native.System.Net.Security": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.rhel.7-x64.Microsoft.NETCore.DotNetHost": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.rhel.7-x64.Microsoft.NETCore.DotNetHostPolicy": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.rhel.7-x64.Microsoft.NETCore.DotNetHostResolver": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.rhel.7-x64.Microsoft.NETCore.Jit": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.rhel.7-x64.Microsoft.NETCore.Runtime.CoreCLR": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.rhel.7-x64.runtime.native.System": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.rhel.7-x64.runtime.native.System.IO.Compression": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.rhel.7-x64.runtime.native.System.Net.Http": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.rhel.7-x64.runtime.native.System.Net.Security": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.ubuntu.14.04-x64.Microsoft.NETCore.DotNetHost": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.ubuntu.14.04-x64.Microsoft.NETCore.DotNetHostPolicy": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.ubuntu.14.04-x64.Microsoft.NETCore.DotNetHostResolver": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.ubuntu.14.04-x64.Microsoft.NETCore.Jit": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.ubuntu.14.04-x64.Microsoft.NETCore.Runtime.CoreCLR": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.ubuntu.14.04-x64.runtime.native.System": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.ubuntu.14.04-x64.runtime.native.System.IO.Compression": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.ubuntu.14.04-x64.runtime.native.System.Net.Http": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.ubuntu.14.04-x64.runtime.native.System.Net.Security": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.ubuntu.16.04-x64.Microsoft.NETCore.DotNetHost": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.ubuntu.16.04-x64.Microsoft.NETCore.DotNetHostPolicy": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.ubuntu.16.04-x64.Microsoft.NETCore.DotNetHostResolver": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.ubuntu.16.04-x64.Microsoft.NETCore.Jit": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.ubuntu.16.04-x64.Microsoft.NETCore.Runtime.CoreCLR": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.ubuntu.16.04-x64.runtime.native.System": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.ubuntu.16.04-x64.runtime.native.System.IO.Compression": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.ubuntu.16.04-x64.runtime.native.System.Net.Http": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.ubuntu.16.04-x64.runtime.native.System.Net.Security": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.ubuntu.16.10-x64.Microsoft.NETCore.DotNetHost": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.ubuntu.16.10-x64.Microsoft.NETCore.DotNetHostPolicy": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.ubuntu.16.10-x64.Microsoft.NETCore.DotNetHostResolver": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.ubuntu.16.10-x64.Microsoft.NETCore.Jit": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.ubuntu.16.10-x64.Microsoft.NETCore.Runtime.CoreCLR": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.ubuntu.16.10-x64.runtime.native.System": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.ubuntu.16.10-x64.runtime.native.System.IO.Compression": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.ubuntu.16.10-x64.runtime.native.System.Net.Http": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.ubuntu.16.10-x64.runtime.native.System.Net.Security": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.unix.Microsoft.Win32.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.unix.System.Console": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.unix.System.Diagnostics.Debug": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.unix.System.IO.FileSystem": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.unix.System.Net.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.unix.System.Net.Sockets": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.unix.System.Private.Uri": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.unix.System.Runtime.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.win.Microsoft.Win32.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.win.System.Console": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.win.System.Diagnostics.Debug": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.win.System.IO.FileSystem": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.win.System.Net.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.win.System.Net.Sockets": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.win.System.Runtime.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.win7-x64.Microsoft.NETCore.DotNetHost": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.win7-x64.Microsoft.NETCore.DotNetHostPolicy": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.win7-x64.Microsoft.NETCore.DotNetHostResolver": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.win7-x64.Microsoft.NETCore.Jit": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.win7-x64.Microsoft.NETCore.Runtime.CoreCLR": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.win7-x64.Microsoft.NETCore.Windows.ApiSets": {
"version": "1.0.1",
"exclude": "all"
},
"runtime.win7-x64.runtime.native.System.IO.Compression": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.win7-x86.Microsoft.NETCore.DotNetHost": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.win7-x86.Microsoft.NETCore.DotNetHostPolicy": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.win7-x86.Microsoft.NETCore.DotNetHostResolver": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.win7-x86.Microsoft.NETCore.Jit": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.win7-x86.Microsoft.NETCore.Runtime.CoreCLR": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.win7-x86.Microsoft.NETCore.Windows.ApiSets": {
"version": "1.0.1",
"exclude": "all"
},
"runtime.win7-x86.runtime.native.System.IO.Compression": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.win7.System.Private.Uri": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.win8-x64.Microsoft.NETCore.Windows.ApiSets": {
"version": "1.0.1",
"exclude": "all"
},
"runtime.win8-x86.Microsoft.NETCore.Windows.ApiSets": {
"version": "1.0.1",
"exclude": "all"
},
"runtime.win81-x64.Microsoft.NETCore.Windows.ApiSets": {
"version": "1.0.1",
"exclude": "all"
},
"runtime.win81-x86.Microsoft.NETCore.Windows.ApiSets": {
"version": "1.0.1",
"exclude": "all"
}
}
}
},
"runtimes": {
"{RID}": {}
}
}

Просмотреть файл

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0.25123" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0.25123</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>9232aba5-e93c-4f80-821a-c98f6064a4bc</ProjectGuid>
<RootNamespace>StandaloneApp</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>

Просмотреть файл

@ -1,988 +0,0 @@
{
"buildOptions": {
"emitEntryPoint": true
},
"frameworks": {
"netcoreapp2.0": {
"imports": [
"dotnet5.4",
"portable-net451+win8"
],
"dependencies": {
"Microsoft.NETCore.App": "2.0.0-beta-*",
"Newtonsoft.Json": "9.0.1-beta1",
"xunit": "2.1.0",
"xunit.netcore.extensions": "1.0.0-prerelease-00206",
"dotnet-test-xunit": "1.0.0-rc2-192208-24",
"Microsoft.CodeAnalysis.Analyzers": {
"version": "1.1.0",
"exclude": "all"
},
"Microsoft.CSharp": {
"version": "4.3.0",
"exclude": "all"
},
"Microsoft.DiaSymReader.Native": {
"version": "1.4.0",
"exclude": "all"
},
"Microsoft.VisualBasic": {
"version": "10.1.0",
"exclude": "all"
},
"Microsoft.Win32.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"Microsoft.Win32.Registry": {
"version": "4.3.0",
"exclude": "all"
},
"System.AppContext": {
"version": "4.3.0",
"exclude": "all"
},
"System.Buffers": {
"version": "4.3.0",
"exclude": "all"
},
"System.Collections": {
"version": "4.3.0",
"exclude": "all"
},
"System.Collections.Concurrent": {
"version": "4.3.0",
"exclude": "all"
},
"System.Collections.Immutable": {
"version": "1.3.0",
"exclude": "all"
},
"System.ComponentModel": {
"version": "4.3.0",
"exclude": "all"
},
"System.ComponentModel.Annotations": {
"version": "4.3.0",
"exclude": "all"
},
"System.Console": {
"version": "4.3.0",
"exclude": "all"
},
"System.Diagnostics.Debug": {
"version": "4.3.0",
"exclude": "all"
},
"System.Diagnostics.DiagnosticSource": {
"version": "4.3.0",
"exclude": "all"
},
"System.Diagnostics.FileVersionInfo": {
"version": "4.0.0",
"exclude": "all"
},
"System.Diagnostics.Process": {
"version": "4.3.0",
"exclude": "all"
},
"System.Diagnostics.StackTrace": {
"version": "4.0.1",
"exclude": "all"
},
"System.Diagnostics.Tools": {
"version": "4.3.0",
"exclude": "all"
},
"System.Diagnostics.Tracing": {
"version": "4.3.0",
"exclude": "all"
},
"System.Dynamic.Runtime": {
"version": "4.3.0",
"exclude": "all"
},
"System.Globalization": {
"version": "4.3.0",
"exclude": "all"
},
"System.Globalization.Calendars": {
"version": "4.3.0",
"exclude": "all"
},
"System.Globalization.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.Compression": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.Compression.ZipFile": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.FileSystem": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.FileSystem.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.FileSystem.Watcher": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.MemoryMappedFiles": {
"version": "4.3.0",
"exclude": "all"
},
"System.IO.UnmanagedMemoryStream": {
"version": "4.3.0",
"exclude": "all"
},
"System.Linq": {
"version": "4.3.0",
"exclude": "all"
},
"System.Linq.Expressions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Linq.Parallel": {
"version": "4.3.0",
"exclude": "all"
},
"System.Linq.Queryable": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.Http": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.NameResolution": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.Requests": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.Security": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.Sockets": {
"version": "4.3.0",
"exclude": "all"
},
"System.Net.WebHeaderCollection": {
"version": "4.3.0",
"exclude": "all"
},
"System.Numerics.Vectors": {
"version": "4.3.0",
"exclude": "all"
},
"System.ObjectModel": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.DispatchProxy": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.Emit": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.Emit.ILGeneration": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.Emit.Lightweight": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.Metadata": {
"version": "1.4.1",
"exclude": "all"
},
"System.Reflection.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"System.Reflection.TypeExtensions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Resources.Reader": {
"version": "4.3.0",
"exclude": "all"
},
"System.Resources.ResourceManager": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime.Handles": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime.InteropServices": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime.InteropServices.RuntimeInformation": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime.Loader": {
"version": "4.3.0",
"exclude": "all"
},
"System.Runtime.Numerics": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Claims": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.Algorithms": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.Cng": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.Csp": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.Encoding": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.OpenSsl": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Cryptography.X509Certificates": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Principal": {
"version": "4.3.0",
"exclude": "all"
},
"System.Security.Principal.Windows": {
"version": "4.3.0",
"exclude": "all"
},
"System.Text.Encoding": {
"version": "4.3.0",
"exclude": "all"
},
"System.Text.Encoding.CodePages": {
"version": "4.0.1",
"exclude": "all"
},
"System.Text.Encoding.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Text.RegularExpressions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.Overlapped": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.Tasks": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.Tasks.Dataflow": {
"version": "4.7.0",
"exclude": "all"
},
"System.Threading.Tasks.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.Tasks.Parallel": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.Thread": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.ThreadPool": {
"version": "4.3.0",
"exclude": "all"
},
"System.Threading.Timer": {
"version": "4.3.0",
"exclude": "all"
},
"System.Xml.ReaderWriter": {
"version": "4.3.0",
"exclude": "all"
},
"System.Xml.XDocument": {
"version": "4.3.0",
"exclude": "all"
},
"System.Xml.XmlDocument": {
"version": "4.0.1",
"exclude": "all"
},
"System.Xml.XPath": {
"version": "4.0.1",
"exclude": "all"
},
"System.Xml.XPath.XDocument": {
"version": "4.0.1",
"exclude": "all"
},
"runtime.any.System.Collections": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.any.System.Diagnostics.Tools": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.any.System.Diagnostics.Tracing": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.any.System.Globalization": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.any.System.Globalization.Calendars": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.any.System.IO": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.any.System.Reflection": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.any.System.Reflection.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.any.System.Reflection.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.any.System.Resources.ResourceManager": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.any.System.Runtime": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.any.System.Runtime.Handles": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.any.System.Runtime.InteropServices": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.any.System.Text.Encoding": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.any.System.Text.Encoding.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.any.System.Threading.Tasks": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.any.System.Threading.Timer": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.debian.8-x64.Microsoft.NETCore.DotNetHost": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.debian.8-x64.Microsoft.NETCore.DotNetHostPolicy": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.debian.8-x64.Microsoft.NETCore.DotNetHostResolver": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.debian.8-x64.Microsoft.NETCore.Jit": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.debian.8-x64.Microsoft.NETCore.Runtime.CoreCLR": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.debian.8-x64.runtime.native.System": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.debian.8-x64.runtime.native.System.IO.Compression": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.debian.8-x64.runtime.native.System.Net.Http": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.debian.8-x64.runtime.native.System.Net.Security": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.fedora.23-x64.Microsoft.NETCore.DotNetHost": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.fedora.23-x64.Microsoft.NETCore.DotNetHostPolicy": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.fedora.23-x64.Microsoft.NETCore.DotNetHostResolver": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.fedora.23-x64.Microsoft.NETCore.Jit": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.fedora.23-x64.Microsoft.NETCore.Runtime.CoreCLR": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.fedora.23-x64.runtime.native.System": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.fedora.23-x64.runtime.native.System.IO.Compression": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.fedora.23-x64.runtime.native.System.Net.Http": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.fedora.23-x64.runtime.native.System.Net.Security": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.fedora.24-x64.Microsoft.NETCore.DotNetHost": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.fedora.24-x64.Microsoft.NETCore.DotNetHostPolicy": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.fedora.24-x64.Microsoft.NETCore.DotNetHostResolver": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.fedora.24-x64.Microsoft.NETCore.Jit": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.fedora.24-x64.Microsoft.NETCore.Runtime.CoreCLR": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.fedora.24-x64.runtime.native.System": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.fedora.24-x64.runtime.native.System.IO.Compression": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.fedora.24-x64.runtime.native.System.Net.Http": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.fedora.24-x64.runtime.native.System.Net.Security": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.native.System": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.native.System.IO.Compression": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.native.System.Net.Http": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.native.System.Net.Security": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.native.System.Security.Cryptography.Apple": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.native.System.Security.Cryptography.OpenSsl": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.opensuse.42.1-x64.Microsoft.NETCore.DotNetHost": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.opensuse.42.1-x64.Microsoft.NETCore.DotNetHostPolicy": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.opensuse.42.1-x64.Microsoft.NETCore.DotNetHostResolver": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.opensuse.42.1-x64.Microsoft.NETCore.Jit": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.opensuse.42.1-x64.Microsoft.NETCore.Runtime.CoreCLR": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.opensuse.42.1-x64.runtime.native.System": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.opensuse.42.1-x64.runtime.native.System.IO.Compression": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.opensuse.42.1-x64.runtime.native.System.Net.Http": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.opensuse.42.1-x64.runtime.native.System.Net.Security": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.osx.10.10-x64.Microsoft.NETCore.DotNetHost": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.osx.10.10-x64.Microsoft.NETCore.DotNetHostPolicy": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.osx.10.10-x64.Microsoft.NETCore.DotNetHostResolver": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.osx.10.10-x64.Microsoft.NETCore.Jit": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.osx.10.10-x64.Microsoft.NETCore.Runtime.CoreCLR": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.osx.10.10-x64.runtime.native.System": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.osx.10.10-x64.runtime.native.System.IO.Compression": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.osx.10.10-x64.runtime.native.System.Net.Http": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.osx.10.10-x64.runtime.native.System.Net.Security": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.rhel.7-x64.Microsoft.NETCore.DotNetHost": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.rhel.7-x64.Microsoft.NETCore.DotNetHostPolicy": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.rhel.7-x64.Microsoft.NETCore.DotNetHostResolver": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.rhel.7-x64.Microsoft.NETCore.Jit": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.rhel.7-x64.Microsoft.NETCore.Runtime.CoreCLR": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.rhel.7-x64.runtime.native.System": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.rhel.7-x64.runtime.native.System.IO.Compression": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.rhel.7-x64.runtime.native.System.Net.Http": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.rhel.7-x64.runtime.native.System.Net.Security": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.ubuntu.14.04-x64.Microsoft.NETCore.DotNetHost": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.ubuntu.14.04-x64.Microsoft.NETCore.DotNetHostPolicy": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.ubuntu.14.04-x64.Microsoft.NETCore.DotNetHostResolver": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.ubuntu.14.04-x64.Microsoft.NETCore.Jit": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.ubuntu.14.04-x64.Microsoft.NETCore.Runtime.CoreCLR": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.ubuntu.14.04-x64.runtime.native.System": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.ubuntu.14.04-x64.runtime.native.System.IO.Compression": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.ubuntu.14.04-x64.runtime.native.System.Net.Http": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.ubuntu.14.04-x64.runtime.native.System.Net.Security": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.ubuntu.16.04-x64.Microsoft.NETCore.DotNetHost": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.ubuntu.16.04-x64.Microsoft.NETCore.DotNetHostPolicy": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.ubuntu.16.04-x64.Microsoft.NETCore.DotNetHostResolver": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.ubuntu.16.04-x64.Microsoft.NETCore.Jit": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.ubuntu.16.04-x64.Microsoft.NETCore.Runtime.CoreCLR": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.ubuntu.16.04-x64.runtime.native.System": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.ubuntu.16.04-x64.runtime.native.System.IO.Compression": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.ubuntu.16.04-x64.runtime.native.System.Net.Http": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.ubuntu.16.04-x64.runtime.native.System.Net.Security": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.ubuntu.16.10-x64.Microsoft.NETCore.DotNetHost": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.ubuntu.16.10-x64.Microsoft.NETCore.DotNetHostPolicy": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.ubuntu.16.10-x64.Microsoft.NETCore.DotNetHostResolver": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.ubuntu.16.10-x64.Microsoft.NETCore.Jit": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.ubuntu.16.10-x64.Microsoft.NETCore.Runtime.CoreCLR": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.ubuntu.16.10-x64.runtime.native.System": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.ubuntu.16.10-x64.runtime.native.System.IO.Compression": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.ubuntu.16.10-x64.runtime.native.System.Net.Http": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.ubuntu.16.10-x64.runtime.native.System.Net.Security": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.unix.Microsoft.Win32.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.unix.System.Console": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.unix.System.Diagnostics.Debug": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.unix.System.IO.FileSystem": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.unix.System.Net.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.unix.System.Net.Sockets": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.unix.System.Private.Uri": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.unix.System.Runtime.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.win.Microsoft.Win32.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.win.System.Console": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.win.System.Diagnostics.Debug": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.win.System.IO.FileSystem": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.win.System.Net.Primitives": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.win.System.Net.Sockets": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.win.System.Runtime.Extensions": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.win7-x64.Microsoft.NETCore.DotNetHost": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.win7-x64.Microsoft.NETCore.DotNetHostPolicy": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.win7-x64.Microsoft.NETCore.DotNetHostResolver": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.win7-x64.Microsoft.NETCore.Jit": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.win7-x64.Microsoft.NETCore.Runtime.CoreCLR": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.win7-x64.Microsoft.NETCore.Windows.ApiSets": {
"version": "1.0.1",
"exclude": "all"
},
"runtime.win7-x64.runtime.native.System.IO.Compression": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.win7-x86.Microsoft.NETCore.DotNetHost": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.win7-x86.Microsoft.NETCore.DotNetHostPolicy": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.win7-x86.Microsoft.NETCore.DotNetHostResolver": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.win7-x86.Microsoft.NETCore.Jit": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.win7-x86.Microsoft.NETCore.Runtime.CoreCLR": {
"version": "1.1.0",
"exclude": "all"
},
"runtime.win7-x86.Microsoft.NETCore.Windows.ApiSets": {
"version": "1.0.1",
"exclude": "all"
},
"runtime.win7-x86.runtime.native.System.IO.Compression": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.win7.System.Private.Uri": {
"version": "4.3.0",
"exclude": "all"
},
"runtime.win8-x64.Microsoft.NETCore.Windows.ApiSets": {
"version": "1.0.1",
"exclude": "all"
},
"runtime.win8-x86.Microsoft.NETCore.Windows.ApiSets": {
"version": "1.0.1",
"exclude": "all"
},
"runtime.win81-x64.Microsoft.NETCore.Windows.ApiSets": {
"version": "1.0.1",
"exclude": "all"
},
"runtime.win81-x86.Microsoft.NETCore.Windows.ApiSets": {
"version": "1.0.1",
"exclude": "all"
}
}
}
},
"testRunner": "xunit",
"runtimes": {
"{RID}": {}
}
}

Просмотреть файл

@ -2,10 +2,10 @@
# Any line that is not blank and does not start with '#' is interpreted as a variable to set.
# Each line is expected to be in the format "[Name]=[Value]".
MAJOR_VERSION=2
MINOR_VERSION=0
MINOR_VERSION=1
PATCH_VERSION=0
STABILIZE_PACKAGE_VERSION=false
LOCK_HOST_VERSION=false
RELEASE_SUFFIX=beta
RELEASE_SUFFIX=preview2
CHANNEL=master
BRANCH_NAME=master

Просмотреть файл

@ -1,35 +1,2 @@
@echo off
setlocal EnableDelayedExpansion
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.
:Arg_Loop
:: Since the native build requires some configuration information before msbuild is called, we have to do some manual args parsing
if [%1] == [] goto :InvokeBuild
if /i [%1] == [-TargetArch] (
if /i [%2] == [arm64] (
set __BuildArch=x86_amd64
)
if /i [%2] == [arm] (
set __BuildArch=x86_arm
)
if not defined VS140COMNTOOLS (
echo Error: Visual Studio 2015 required
echo Please see https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/developer-guide.md for build instructions.
exit /b 1
)
call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" !__BuildArch!
goto :InvokeBuild
)
shift
goto :Arg_Loop
:InvokeBuild
powershell -NoProfile -NoLogo -Command "%~dp0build_projects\dotnet-host-build\build.ps1 %*; exit $LastExitCode;"
if %errorlevel% neq 0 exit /b %errorlevel%
@call %~dp0run.cmd build %*
@exit /b %ERRORLEVEL%

56
build.proj Normal file
Просмотреть файл

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="dir.props" />
<!-- required to build the projects in their specified order -->
<PropertyGroup>
<SerializeProjects>true</SerializeProjects>
</PropertyGroup>
<PropertyGroup>
<!-- To disable the restoration of packages, set RestoreDuringBuild=false or pass /p:RestoreDuringBuild=false.-->
<RestoreDuringBuild Condition="'$(RestoreDuringBuild)'==''">true</RestoreDuringBuild>
</PropertyGroup>
<PropertyGroup>
<TraversalBuildDependencies>
CreateOrUpdateCurrentVersionFile;
CreateVersionInfoFile;
BatchRestorePackages;
BuildCustomTasks;
</TraversalBuildDependencies>
<TraversalBuildDependsOn>
$(TraversalBuildDependencies);
$(TraversalBuildDependsOn);
</TraversalBuildDependsOn>
</PropertyGroup>
<ItemGroup>
<Project Include="src/dir.proj" />
<Project Include="src/pkg/packaging/dir.proj"/>
<Project Include="$(MSBuildThisFileDirectory)src/test/dir.proj" Condition="'$(SkipTests)' != 'true'"/>
</ItemGroup>
<Target Name="BuildTraversalBuildDependencies"
DependsOnTargets="$(TraversalBuildDependencies)" />
<Target Name="BatchRestorePackages" Condition="'$(RestoreDuringBuild)'=='true'">
<Message Importance="High" Text="Restoring all packages..." />
<Exec Condition="'@(SdkRestoreProjects)' != ''" Command="$(DotnetRestoreCommand) &quot;%(SdkRestoreProjects.FullPath)&quot;" StandardOutputImportance="Low" />
</Target>
<Import Project="dir.targets" />
<Import Project="dir.traversal.targets" />
<Import Project="$(ToolsDir)clean.targets" />
<Import Project="$(ToolsDir)VersionTools.targets" Condition="Exists('$(ToolsDir)VersionTools.targets')" />
<!-- Override RestorePackages from dir.traversal.targets and do a batch restore -->
<Target Name="RestorePackages" DependsOnTargets="BatchRestorePackages" />
<!-- Override clean from dir.traversal.targets and just remove the full BinDir -->
<Target Name="CleanAllProjects">
<RemoveDir Directories="$(BinDir)" />
</Target>
</Project>

Просмотреть файл

@ -3,9 +3,6 @@
# Copyright (c) .NET Foundation and contributors. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
#
# Set OFFLINE environment variable to build offline
set -e
SOURCE="${BASH_SOURCE[0]}"
@ -17,41 +14,11 @@ done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
# Some things depend on HOME and it may not be set. We should fix those things, but until then, we just patch a value in
if [ -z "$HOME" ]; then
export HOME=$DIR/artifacts/home
if [ -z "$HOME" ] || [ ! -d "$HOME" ]; then
export HOME=$DIR/Bin/home
[ ! -d "$HOME" ] || rm -Rf $HOME
mkdir -p $HOME
fi
while [[ $# > 0 ]]; do
lowerI="$(echo $1 | awk '{print tolower($0)}')"
case $lowerI in
--docker)
export BUILD_IN_DOCKER=1
export DOCKER_IMAGENAME=$2
shift
;;
*)
args+=( $1 )
;;
esac
shift
done
# $args array may have empty elements in it.
# The easiest way to remove them is to cast to string and back to array.
temp="${args[@]}"
args=($temp)
dockerbuild()
{
BUILD_COMMAND=/opt/code/build_projects/dotnet-host-build/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-host-build/build.sh "${args[@]}"
fi
$DIR/run.sh build "$@"

Просмотреть файл

@ -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,29 +0,0 @@
using System;
namespace Microsoft.DotNet.Cli.Build.Framework
{
public partial class BuildFailureException : Exception
{
public BuildTarget Target { get; }
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, BuildTarget target) : base(message)
{
Target = target;
}
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,206 +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)
{
string[] targets;
string[] environmentVariables;
ParseArgs(args, out targets, out environmentVariables);
foreach (string environmentVariable in environmentVariables)
{
int delimiterIndex = environmentVariable.IndexOf('=');
string name = environmentVariable.Substring(0, delimiterIndex);
string value = environmentVariable.Substring(delimiterIndex + 1);
Environment.SetEnvironmentVariable(name, value);
}
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}".Black());
}
}
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 void ParseArgs(string[] args, out string[] targets, out string[] environmentVariables)
{
List<string> targetList = new List<string>();
List<string> environmentVariableList = new List<string>();
for (int i = 0; i < args.Length; i++)
{
if (args[i] == "-t")
{
i++;
while (i < args.Length && !args[i].StartsWith("-", StringComparison.Ordinal))
{
targetList.Add(args[i]);
i++;
}
}
if (args[i] == "-e")
{
i++;
while (i < args.Length && !args[i].StartsWith("-", StringComparison.Ordinal))
{
environmentVariableList.Add(args[i]);
i++;
}
}
}
targets = targetList.Any() ? targetList.ToArray() : new[] { BuildContext.DefaultTarget };
environmentVariables = environmentVariableList.ToArray();
}
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,89 +0,0 @@
using System;
using Microsoft.DotNet.InternalAbstractions;
namespace Microsoft.DotNet.Cli.Build.Framework
{
public static class CurrentArchitecture
{
public static BuildArchitecture Current
{
get
{
return DetermineCurrentArchitecture();
}
}
public static bool Isx86
{
get
{
var archName = RuntimeEnvironment.RuntimeArchitecture;
return string.Equals(archName, "x86", StringComparison.OrdinalIgnoreCase);
}
}
public static bool Isx64
{
get
{
var archName = RuntimeEnvironment.RuntimeArchitecture;
return string.Equals(archName, "x64", StringComparison.OrdinalIgnoreCase);
}
}
public static bool Isarm
{
get
{
var archName = Environment.GetEnvironmentVariable("TARGETPLATFORM");
return string.Equals(archName, "arm", StringComparison.OrdinalIgnoreCase);
}
}
public static bool Isarmel
{
get
{
var archName = Environment.GetEnvironmentVariable("TARGETPLATFORM");
return string.Equals(archName, "armel", StringComparison.OrdinalIgnoreCase);
}
}
public static bool Isarm64
{
get
{
var archName = Environment.GetEnvironmentVariable("TARGETPLATFORM");
return string.Equals(archName, "arm64", StringComparison.OrdinalIgnoreCase);
}
}
private static BuildArchitecture DetermineCurrentArchitecture()
{
if (Isarm)
{
return BuildArchitecture.arm;
}
else if (Isarmel)
{
return BuildArchitecture.armel;
}
else if (Isarm64)
{
return BuildArchitecture.arm64;
}
else if (Isx86)
{
return BuildArchitecture.x86;
}
else if (Isx64)
{
return BuildArchitecture.x64;
}
else
{
return default(BuildArchitecture);
}
}
}
}

Просмотреть файл

@ -1,182 +0,0 @@
using System;
using System.Runtime.InteropServices;
using Microsoft.DotNet.InternalAbstractions;
namespace Microsoft.DotNet.Cli.Build.Framework
{
public static class CurrentPlatform
{
public static BuildPlatform Current
{
get
{
return DetermineCurrentPlatform();
}
}
public static bool IsWindows
{
get
{
return RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
}
}
public static bool IsOSX
{
get
{
return RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
}
}
public static bool IsUbuntu
{
get
{
var osname = RuntimeEnvironment.OperatingSystem;
return string.Equals(osname, "ubuntu", StringComparison.OrdinalIgnoreCase);
}
}
public static bool IsCentOS
{
get
{
var osname = RuntimeEnvironment.OperatingSystem;
return string.Equals(osname, "centos", StringComparison.OrdinalIgnoreCase);
}
}
public static bool IsRHEL
{
get
{
var osname = RuntimeEnvironment.OperatingSystem;
return string.Equals(osname, "rhel", StringComparison.OrdinalIgnoreCase);
}
}
public static bool IsFedora
{
get
{
var osname = RuntimeEnvironment.OperatingSystem;
return string.Equals(osname, "fedora", StringComparison.OrdinalIgnoreCase);
}
}
public static bool IsOpenSUSE
{
get
{
var osname = RuntimeEnvironment.OperatingSystem;
return string.Equals(osname, "opensuse", StringComparison.OrdinalIgnoreCase);
}
}
public static bool IsUnix
{
get
{
return IsLinux || IsOSX;
}
}
public static bool IsDebian
{
get
{
var osname = RuntimeEnvironment.OperatingSystem;
return string.Equals(osname, "debian", StringComparison.OrdinalIgnoreCase);
}
}
public static bool IsLinux
{
get
{
return IsUbuntu || IsCentOS || IsRHEL || IsDebian || IsFedora || IsOpenSUSE;
}
}
public static bool IsPlatform(BuildPlatform platform, string version = null)
{
return IsPlatform(platform) && (version == null || IsVersion(version));
}
public static bool IsPlatform(BuildPlatform platform)
{
switch (platform)
{
case BuildPlatform.Windows:
return IsWindows;
case BuildPlatform.Ubuntu:
return IsUbuntu;
case BuildPlatform.OSX:
return IsOSX;
case BuildPlatform.CentOS:
return IsCentOS;
case BuildPlatform.RHEL:
return IsRHEL;
case BuildPlatform.Debian:
return IsDebian;
case BuildPlatform.Fedora:
return IsFedora;
case BuildPlatform.OpenSUSE:
return IsOpenSUSE;
case BuildPlatform.Unix:
return IsUnix;
case BuildPlatform.Linux:
return IsLinux;
default:
throw new Exception("Unrecognized Platform.");
}
}
public static bool IsVersion(string version)
{
return RuntimeEnvironment.OperatingSystemVersion.Equals(version, StringComparison.OrdinalIgnoreCase);
}
private static BuildPlatform DetermineCurrentPlatform()
{
if (IsWindows)
{
return BuildPlatform.Windows;
}
else if (IsOSX)
{
return BuildPlatform.OSX;
}
else if (IsUbuntu)
{
return BuildPlatform.Ubuntu;
}
else if (IsCentOS)
{
return BuildPlatform.CentOS;
}
else if (IsRHEL)
{
return BuildPlatform.RHEL;
}
else if (IsDebian)
{
return BuildPlatform.Debian;
}
else if (IsFedora)
{
return BuildPlatform.Fedora;
}
else if (IsOpenSUSE)
{
return BuildPlatform.OpenSUSE;
}
else
{
return default(BuildPlatform);
}
}
}
}

Просмотреть файл

@ -1,29 +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.Diagnostics;
using System.Linq;
namespace Microsoft.DotNet.Cli.Build.Framework
{
public static class DebugHelper
{
[Conditional("DEBUG")]
public static void HandleDebugSwitch(ref string[] args)
{
if (args.Length > 0 && string.Equals("--debug", args[0], StringComparison.OrdinalIgnoreCase))
{
args = args.Skip(1).ToArray();
WaitForDebugger();
}
}
private static void WaitForDebugger()
{
Console.WriteLine("Waiting for debugger to attach. Press ENTER to continue");
Console.WriteLine($"Process ID: {Process.GetCurrentProcess().Id}");
Console.ReadLine();
}
}
}

Просмотреть файл

@ -1,11 +0,0 @@
namespace Microsoft.DotNet.Cli.Build.Framework
{
public enum BuildArchitecture
{
x86 = 1,
x64 = 2,
arm = 3,
arm64 = 4,
armel = 5
}
}

Просмотреть файл

@ -1,16 +0,0 @@
namespace Microsoft.DotNet.Cli.Build.Framework
{
public enum BuildPlatform
{
Windows = 1,
Unix = 2,
Linux = 3,
OSX = 4,
Ubuntu = 5,
CentOS = 6,
RHEL = 7,
Debian = 8,
Fedora = 9,
OpenSUSE = 10
}
}

Просмотреть файл

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>49beb486-ab5a-4416-91ea-8cd34abb0c9d</ProjectGuid>
<RootNamespace>Microsoft.DotNet.Cli.Build.Framework</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin</OutputPath>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>

Просмотреть файл

@ -1,23 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Microsoft.DotNet.Cli.Build.Framework
{
public static class StandardGoals
{
public static BuildSetup UseStandardGoals(this BuildSetup self)
{
return self.UseTargets(new[]
{
new BuildTarget("Default", "Standard Goals", new [] { "Prepare", "Compile", "Test", "Package", "Publish" }),
new BuildTarget("Prepare", "Standard Goals"),
new BuildTarget("Compile", "Standard Goals"),
new BuildTarget("Test", "Standard Goals"),
new BuildTarget("Package", "Standard Goals"),
new BuildTarget("Publish", "Standard Goals")
});
}
}
}

Просмотреть файл

@ -1,24 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace Microsoft.DotNet.Cli.Build.Framework
{
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public class TargetAttribute : Attribute
{
public string Name { get; set; }
public IEnumerable<string> Dependencies { get; }
public TargetAttribute()
{
Dependencies = Enumerable.Empty<string>();
}
// Attributes can only use constants, so a comma-separated string is better :)
public TargetAttribute(params string[] dependencies)
{
Dependencies = dependencies;
}
}
}

Просмотреть файл

@ -1,41 +0,0 @@
using System;
using System.Collections.Generic;
namespace Microsoft.DotNet.Cli.Build.Framework
{
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public class BuildArchitecturesAttribute : TargetConditionAttribute
{
private IEnumerable<BuildArchitecture> _buildArchitectures;
public BuildArchitecturesAttribute(params BuildArchitecture[] architectures)
{
if (architectures == null)
{
throw new ArgumentNullException(nameof(architectures));
}
_buildArchitectures = architectures;
}
public override bool EvaluateCondition()
{
var currentArchitecture = CurrentArchitecture.Current;
if (currentArchitecture == default(BuildArchitecture))
{
throw new Exception("Unrecognized Architecture");
}
foreach (var architecture in _buildArchitectures)
{
if (architecture == currentArchitecture)
{
return true;
}
}
return false;
}
}
}

Просмотреть файл

@ -1,41 +0,0 @@
using System;
using System.Collections.Generic;
namespace Microsoft.DotNet.Cli.Build.Framework
{
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public class BuildPlatformsAttribute : TargetConditionAttribute
{
private IEnumerable<BuildPlatform> _buildPlatforms;
private string _version;
public BuildPlatformsAttribute(params BuildPlatform[] platforms)
{
if (platforms == null)
{
throw new ArgumentNullException(nameof(platforms));
}
_buildPlatforms = platforms;
}
public BuildPlatformsAttribute(BuildPlatform platform, string version)
{
_buildPlatforms = new BuildPlatform[] { platform };
_version = version;
}
public override bool EvaluateCondition()
{
foreach (var platform in _buildPlatforms)
{
if (CurrentPlatform.IsPlatform(platform, _version))
{
return true;
}
}
return false;
}
}
}

Просмотреть файл

@ -1,41 +0,0 @@
using System;
using System.Linq;
namespace Microsoft.DotNet.Cli.Build.Framework
{
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = false)]
public class EnvironmentAttribute : TargetConditionAttribute
{
private string _envVar;
private string[] _expectedVals;
public EnvironmentAttribute(string envVar, params string[] expectedVals)
{
if (string.IsNullOrEmpty(envVar))
{
throw new ArgumentNullException(nameof(envVar));
}
if (expectedVals == null)
{
throw new ArgumentNullException(nameof(expectedVals));
}
_envVar = envVar;
_expectedVals = expectedVals;
}
public override bool EvaluateCondition()
{
var actualVal = Environment.GetEnvironmentVariable(_envVar);
if (_expectedVals.Any())
{
return _expectedVals.Any(ev => string.Equals(actualVal, ev, StringComparison.Ordinal));
}
else
{
return !string.IsNullOrEmpty(actualVal);
}
}
}
}

Просмотреть файл

@ -1,9 +0,0 @@
using System;
namespace Microsoft.DotNet.Cli.Build.Framework
{
public abstract class TargetConditionAttribute : Attribute
{
public abstract bool EvaluateCondition();
}
}

Просмотреть файл

@ -1,9 +0,0 @@
using System;
namespace Microsoft.DotNet.Cli.Build.Framework
{
public class UndefinedTargetException : Exception
{
public UndefinedTargetException(string message) : base(message) { }
}
}

Просмотреть файл

@ -1,18 +0,0 @@
{
"version": "1.0.0-*",
"buildOptions": {
"warningsAsErrors": true,
"allowUnsafe": true
},
"dependencies": {
"NETStandard.Library": "1.6.1-beta-24506-02",
"System.Diagnostics.Process": "4.1.0",
"System.Reflection.TypeExtensions": "4.1.0",
"Microsoft.DotNet.InternalAbstractions": "1.0.0-rc2-002702"
},
"frameworks": {
"netstandard1.6": {
"imports": "dnxcore50"
}
}
}

Просмотреть файл

@ -1,562 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using Microsoft.DotNet.Cli.Build.Framework;
using Microsoft.DotNet.InternalAbstractions;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Microsoft.DotNet.Cli.Build;
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
using static Microsoft.DotNet.Cli.Build.FS;
namespace Microsoft.DotNet.Host.Build
{
public class CompileTargets
{
public static readonly bool IsWinx86 = CurrentPlatform.IsWindows && CurrentArchitecture.Isx86;
public const string SharedFrameworkName = "Microsoft.NETCore.App";
public static readonly Dictionary<string, string> HostPackageSupportedRids = new Dictionary<string, string>()
{
// Key: Current platform RID. Value: The actual publishable (non-dummy) package name produced by the build system for this RID.
{ "win7-x64", "win7-x64" },
{ "win7-x86", "win7-x86" },
{ "win8-arm", "win8-arm" },
{ "win10-arm64", "win10-arm64" },
{ "osx.10.10-x64", "osx.10.10-x64" },
{ "osx.10.11-x64", "osx.10.10-x64" },
{ "osx.10.12-x64", "osx.10.10-x64" },
{ "linux-x64", "linux-x64" },
{ "ubuntu.14.04-x64", "ubuntu.14.04-x64" },
{ "ubuntu.16.04-x64", "ubuntu.16.04-x64" },
{ "ubuntu.16.10-x64", "ubuntu.16.10-x64" },
{ "ubuntu.14.04-arm", "ubuntu.14.04-arm" },
{ "ubuntu.16.04-arm", "ubuntu.16.04-arm" },
// { "ubuntu.14.04-arm64", "ubuntu.14.04-arm64" },
// { "ubuntu.16.04-arm64", "ubuntu.16.04-arm64" },
{ "centos.7-x64", "rhel.7-x64" },
{ "rhel.7-x64", "rhel.7-x64" },
{ "rhel.7.0-x64", "rhel.7-x64" },
{ "rhel.7.1-x64", "rhel.7-x64" },
{ "rhel.7.2-x64", "rhel.7-x64" },
{ "rhel.7.3-x64", "rhel.7-x64" },
{ "debian.8-armel", "debian.8-armel" },
{ "debian.8-x64", "debian.8-x64" },
{ "fedora.23-x64", "fedora.23-x64" },
{ "fedora.24-x64", "fedora.24-x64" },
{ "opensuse.42.1-x64", "opensuse.42.1-x64" },
{ "tizen.4.0.0-armel", "tizen.4.0.0-armel" }
};
[Target(nameof(PrepareTargets.Init),
nameof(CompileCoreHost),
nameof(PackagePkgProjects),
nameof(BuildProjectsForNuGetPackages),
nameof(PublishSharedFrameworkAndSharedHost))]
public static BuildTargetResult Compile(BuildTargetContext c)
{
return c.Success();
}
// We need to generate stub host packages so we can restore our standalone test assets against the metapackage
// we built earlier in the build
// https://github.com/dotnet/cli/issues/2438
[Target]
public static BuildTargetResult GenerateStubHostPackages(BuildTargetContext c)
{
var hostVersion = c.BuildContext.Get<HostVersion>("HostVersion");
var currentRid = HostPackageSupportedRids[c.BuildContext.Get<string>("TargetRID")];
var stubPackageBuilder = new StubPackageBuilder(DotNetCli.Stage0, Dirs.Intermediate, Dirs.CorehostDummyPackages);
foreach (var hostPackage in hostVersion.LatestHostPackages)
{
foreach (var rid in HostPackageSupportedRids.Values.Distinct())
{
if (!rid.Equals(currentRid))
{
var basePackageId = hostPackage.Key;
var packageVersion = hostPackage.Value.ToString();
var packageId = $"runtime.{rid}.{basePackageId}";
stubPackageBuilder.GeneratePackage(packageId, packageVersion);
}
}
}
return c.Success();
}
private static void GetVersionResourceForAssembly(
string assemblyName,
HostVersion.VerInfo hostVer,
string commitHash,
string tempRcDirectory)
{
var semVer = hostVer.ToString();
var majorVersion = hostVer.Major;
var minorVersion = hostVer.Minor;
var patchVersion = hostVer.Patch;
var buildNumberMajor = hostVer.VerRsrcBuildMajor;
var buildNumberMinor = hostVer.VerRsrcBuildMinor;
var buildDetails = $"{semVer}, {commitHash} built by: {System.Environment.MachineName}, UTC: {DateTime.UtcNow.ToString()}";
var rcContent = $@"
#include <Windows.h>
#ifndef VER_COMPANYNAME_STR
#define VER_COMPANYNAME_STR ""Microsoft Corporation""
#endif
#ifndef VER_FILEDESCRIPTION_STR
#define VER_FILEDESCRIPTION_STR ""{assemblyName}""
#endif
#ifndef VER_INTERNALNAME_STR
#define VER_INTERNALNAME_STR VER_FILEDESCRIPTION_STR
#endif
#ifndef VER_ORIGINALFILENAME_STR
#define VER_ORIGINALFILENAME_STR VER_FILEDESCRIPTION_STR
#endif
#ifndef VER_PRODUCTNAME_STR
#define VER_PRODUCTNAME_STR ""Microsoft\xae .NET Core Framework"";
#endif
#undef VER_PRODUCTVERSION
#define VER_PRODUCTVERSION {majorVersion},{minorVersion},{patchVersion},{buildNumberMajor}
#undef VER_PRODUCTVERSION_STR
#define VER_PRODUCTVERSION_STR ""{buildDetails}""
#undef VER_FILEVERSION
#define VER_FILEVERSION {majorVersion},{minorVersion},{patchVersion},{buildNumberMajor}
#undef VER_FILEVERSION_STR
#define VER_FILEVERSION_STR ""{majorVersion},{minorVersion},{buildNumberMajor},{buildNumberMinor},{buildDetails}"";
#ifndef VER_LEGALCOPYRIGHT_STR
#define VER_LEGALCOPYRIGHT_STR ""\xa9 Microsoft Corporation. All rights reserved."";
#endif
#ifndef VER_DEBUG
#ifdef DEBUG
#define VER_DEBUG VS_FF_DEBUG
#else
#define VER_DEBUG 0
#endif
#endif
";
var tempRcHdrDir = Path.Combine(tempRcDirectory, assemblyName);
Mkdirp(tempRcHdrDir);
var tempRcHdrFile = Path.Combine(tempRcHdrDir, "version_info.h");
File.WriteAllText(tempRcHdrFile, rcContent);
}
public static string GenerateVersionResource(BuildTargetContext c)
{
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
return null;
}
var tempRcDirectory = Path.Combine(Dirs.Intermediate, "hostResourceFiles");
Rmdir(tempRcDirectory);
Mkdirp(tempRcDirectory);
var hostVersion = c.BuildContext.Get<HostVersion>("HostVersion");
var commitHash = c.BuildContext.Get<string>("CommitHash");
foreach (var binary in hostVersion.LatestHostBinaries)
{
GetVersionResourceForAssembly(binary.Key, binary.Value, commitHash, tempRcDirectory);
}
return tempRcDirectory;
}
[Target]
public static BuildTargetResult CompileCoreHost(BuildTargetContext c)
{
var hostVersion = c.BuildContext.Get<HostVersion>("HostVersion");
var configuration = c.BuildContext.Get<string>("Configuration");
string platform = c.BuildContext.Get<string>("Platform");
string crossEnv = c.BuildContext.Get<string>("Cross");
bool linkPortable = c.BuildContext.Get<bool>("LinkPortable");
// Generate build files
var cmakeOut = Path.Combine(Dirs.CorehostLatest, "cmake");
Rmdir(cmakeOut);
Mkdirp(cmakeOut);
// Run the build
string corehostSrcDir = Path.Combine(c.BuildContext.BuildDirectory, "src", "corehost");
string commitHash = c.BuildContext.Get<string>("CommitHash");
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
// Create .rc files on Windows.
var resourceDir = GenerateVersionResource(c);
if (configuration.Equals("Release"))
{
// Cmake calls it "RelWithDebInfo" in the generated MSBuild
configuration = "RelWithDebInfo";
}
// Why does Windows directly call cmake but Linux/Mac calls "build.sh" in the corehost dir?
// See the comment in "src/corehost/build.sh" for details. It doesn't work for some reason.
List<string> cmakeArgList = new List<string>();
string cmakeBaseRid, visualStudio, archMacro, arch;
string cmakeHostVer = $"-DCLI_CMAKE_HOST_VER:STRING={hostVersion.LatestHostVersion.ToString()}";
string cmakeAppHostVer = $"-DCLI_CMAKE_APPHOST_VER:STRING={hostVersion.LatestAppHostVersion.ToString()}";
string cmakeHostPolicyVer = $"-DCLI_CMAKE_HOST_POLICY_VER:STRING={hostVersion.LatestHostPolicyVersion.ToString()}";
string cmakeHostFxrVer = $"-DCLI_CMAKE_HOST_FXR_VER:STRING={hostVersion.LatestHostFxrVersion.ToString()}";
string cmakeCommitHash = $"-DCLI_CMAKE_COMMIT_HASH:STRING={commitHash}";
string cmakeResourceDir = $"-DCLI_CMAKE_RESOURCE_DIR:STRING={resourceDir}";
string cmakeExtraArgs = null;
switch (platform.ToLower())
{
case "x86":
cmakeBaseRid = "-DCLI_CMAKE_PKG_RID:STRING=win7-x86";
visualStudio = "Visual Studio 14 2015";
archMacro = "-DCLI_CMAKE_PLATFORM_ARCH_I386=1";
arch = "x86";
break;
case "arm":
cmakeBaseRid = "-DCLI_CMAKE_PKG_RID:STRING=win8-arm";
visualStudio = "Visual Studio 14 2015 ARM";
archMacro = "-DCLI_CMAKE_PLATFORM_ARCH_ARM=1";
cmakeExtraArgs ="-DCMAKE_SYSTEM_VERSION=10.0";
arch = "arm";
break;
case "arm64":
cmakeBaseRid = "-DCLI_CMAKE_PKG_RID:STRING=win10-arm64";
visualStudio = "Visual Studio 14 2015 Win64";
archMacro = "-DCLI_CMAKE_PLATFORM_ARCH_ARM64=1";
arch = "arm64";
if (Environment.GetEnvironmentVariable("__ToolsetDir") == null)
{
throw new Exception("Toolset Dir must be set when the Platform is ARM64");
}
break;
case "x64":
cmakeBaseRid = "-DCLI_CMAKE_PKG_RID:STRING=win7-x64";
visualStudio = "Visual Studio 14 2015 Win64";
archMacro = "-DCLI_CMAKE_PLATFORM_ARCH_AMD64=1";
arch = "x64";
break;
default:
throw new PlatformNotSupportedException("Target Architecture: " + platform + " is not currently supported.");
}
cmakeArgList.Add(corehostSrcDir);
cmakeArgList.Add(archMacro);
cmakeArgList.Add(cmakeHostVer);
cmakeArgList.Add(cmakeAppHostVer);
cmakeArgList.Add(cmakeHostFxrVer);
cmakeArgList.Add(cmakeHostPolicyVer);
cmakeArgList.Add(cmakeBaseRid);
cmakeArgList.Add(cmakeCommitHash);
cmakeArgList.Add(cmakeResourceDir);
cmakeArgList.Add("-G");
cmakeArgList.Add(visualStudio);
if (!String.IsNullOrEmpty(cmakeExtraArgs))
{
cmakeArgList.Add(cmakeExtraArgs);
}
ExecIn(cmakeOut, "cmake", cmakeArgList);
var pf32 = RuntimeInformation.OSArchitecture == Architecture.X64 ?
Environment.GetEnvironmentVariable("ProgramFiles(x86)") :
Environment.GetEnvironmentVariable("ProgramFiles");
string msbuildPath = Path.Combine(pf32, "MSBuild", "14.0", "Bin", "MSBuild.exe");
string cmakeOutPath = Path.Combine(cmakeOut, "ALL_BUILD.vcxproj");
string configParameter = $"/p:Configuration={configuration}";
if (arch == "arm64")
Exec(msbuildPath, cmakeOutPath, configParameter, "/p:useEnv=true");
else
Exec(msbuildPath, cmakeOutPath, configParameter);
// Copy the output out
File.Copy(Path.Combine(cmakeOut, "cli", "exe", "dotnet", configuration, "dotnet.exe"), Path.Combine(Dirs.CorehostLatest, "dotnet.exe"), overwrite: true);
File.Copy(Path.Combine(cmakeOut, "cli", "exe", "dotnet", configuration, "dotnet.pdb"), Path.Combine(Dirs.CorehostLatest, "dotnet.pdb"), overwrite: true);
File.Copy(Path.Combine(cmakeOut, "cli", "exe", "apphost", configuration, "apphost.exe"), Path.Combine(Dirs.CorehostLatest, "apphost.exe"), overwrite: true);
File.Copy(Path.Combine(cmakeOut, "cli", "exe", "apphost", configuration, "apphost.pdb"), Path.Combine(Dirs.CorehostLatest, "apphost.pdb"), overwrite: true);
File.Copy(Path.Combine(cmakeOut, "cli", "dll", configuration, "hostpolicy.dll"), Path.Combine(Dirs.CorehostLatest, "hostpolicy.dll"), overwrite: true);
File.Copy(Path.Combine(cmakeOut, "cli", "dll", configuration, "hostpolicy.pdb"), Path.Combine(Dirs.CorehostLatest, "hostpolicy.pdb"), overwrite: true);
File.Copy(Path.Combine(cmakeOut, "cli", "fxr", configuration, "hostfxr.dll"), Path.Combine(Dirs.CorehostLatest, "hostfxr.dll"), overwrite: true);
File.Copy(Path.Combine(cmakeOut, "cli", "fxr", configuration, "hostfxr.pdb"), Path.Combine(Dirs.CorehostLatest, "hostfxr.pdb"), overwrite: true);
}
else
{
string arch;
switch (platform.ToLower())
{
case "x64":
arch = "x64";
break;
case "arm":
arch = "arm";
break;
case "armel":
arch = "armel";
break;
case "arm64":
arch = "arm64";
break;
default:
throw new PlatformNotSupportedException("Target Architecture: " + platform + " is not currently supported.");
}
// Why does Windows directly call cmake but Linux/Mac calls "build.sh" in the corehost dir?
// See the comment in "src/corehost/build.sh" for details. It doesn't work for some reason.
List<string> buildScriptArgList = new List<string>();
string buildScriptFile = Path.Combine(corehostSrcDir, "build.sh");
buildScriptArgList.Add("--configuration");
buildScriptArgList.Add(configuration);
buildScriptArgList.Add("--arch");
buildScriptArgList.Add(arch);
buildScriptArgList.Add("--hostver");
buildScriptArgList.Add(hostVersion.LatestHostVersion.ToString());
buildScriptArgList.Add("--apphostver");
buildScriptArgList.Add(hostVersion.LatestAppHostVersion.ToString());
buildScriptArgList.Add("--fxrver");
buildScriptArgList.Add(hostVersion.LatestHostFxrVersion.ToString());
buildScriptArgList.Add("--policyver");
buildScriptArgList.Add(hostVersion.LatestHostPolicyVersion.ToString());
buildScriptArgList.Add("--commithash");
buildScriptArgList.Add(commitHash);
if (string.Equals(crossEnv, "1"))
{
buildScriptArgList.Add("--cross");
}
if (linkPortable)
{
buildScriptArgList.Add("--portableLinux");
}
ExecIn(cmakeOut, buildScriptFile, buildScriptArgList);
// Copy the output out
File.Copy(Path.Combine(cmakeOut, "cli", "exe", "dotnet", "dotnet"), Path.Combine(Dirs.CorehostLatest, "dotnet"), overwrite: true);
File.Copy(Path.Combine(cmakeOut, "cli", "exe", "apphost", "apphost"), Path.Combine(Dirs.CorehostLatest, "apphost"), overwrite: true);
File.Copy(Path.Combine(cmakeOut, "cli", "dll", HostArtifactNames.HostPolicyBaseName), Path.Combine(Dirs.CorehostLatest, HostArtifactNames.HostPolicyBaseName), overwrite: true);
File.Copy(Path.Combine(cmakeOut, "cli", "fxr", HostArtifactNames.DotnetHostFxrBaseName), Path.Combine(Dirs.CorehostLatest, HostArtifactNames.DotnetHostFxrBaseName), overwrite: true);
}
return c.Success();
}
[Target]
public static BuildTargetResult BuildProjectsForNuGetPackages(BuildTargetContext c)
{
var configuration = c.BuildContext.Get<string>("Configuration");
// build projects for nuget packages
var packagingOutputDir = Path.Combine(Dirs.Intermediate, "forPackaging");
Mkdirp(packagingOutputDir);
foreach (var project in PackageTargets.ProjectsToPack)
{
var pathToProjectRoot = Path.Combine(c.BuildContext.BuildDirectory, "src", project);
foreach (var framework in FilterToBuildableFrameworks(GetFrameworksFromProjectJson(Path.Combine(pathToProjectRoot, "project.json"))))
{
// Just build them, we'll pack later
var packBuildResult = DotNetCli.Stage0.Build(
"--build-base-path",
packagingOutputDir,
"--configuration",
configuration,
"--framework",
framework,
pathToProjectRoot)
.Execute();
packBuildResult.EnsureSuccessful();
}
}
return c.Success();
}
[Target]
public static BuildTargetResult GenerateMSbuildPropsFile(BuildTargetContext c)
{
var buildVersion = c.BuildContext.Get<BuildVersion>("BuildVersion");
var hostVersion = c.BuildContext.Get<HostVersion>("HostVersion");
string platform = c.BuildContext.Get<string>("Platform");
var msbuildProps = new StringBuilder();
msbuildProps.AppendLine(@"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">");
msbuildProps.AppendLine(" <PropertyGroup>");
msbuildProps.AppendLine($" <Platform>{platform}</Platform>");
msbuildProps.AppendLine($" <DotNetHostBinDir>{Dirs.CorehostLatest}</DotNetHostBinDir>");
msbuildProps.AppendLine($" <HostVersion>{hostVersion.LatestHostVersion.WithoutSuffix}</HostVersion>");
msbuildProps.AppendLine($" <AppHostVersion>{hostVersion.LatestAppHostVersion.WithoutSuffix}</AppHostVersion>");
msbuildProps.AppendLine($" <HostResolverVersion>{hostVersion.LatestHostFxrVersion.WithoutSuffix}</HostResolverVersion>");
msbuildProps.AppendLine($" <HostPolicyVersion>{hostVersion.LatestHostPolicyVersion.WithoutSuffix}</HostPolicyVersion>");
msbuildProps.AppendLine($" <BuildNumberMajor>{hostVersion.LatestHostBuildMajor}</BuildNumberMajor>");
msbuildProps.AppendLine($" <BuildNumberMinor>{hostVersion.LatestHostBuildMinor}</BuildNumberMinor>");
msbuildProps.AppendLine($" <PreReleaseLabel>{hostVersion.ReleaseSuffix}</PreReleaseLabel>");
msbuildProps.AppendLine($" <EnsureStableVersion>{hostVersion.EnsureStableVersion}</EnsureStableVersion>");
msbuildProps.AppendLine($" <NetCoreAppVersion>{buildVersion.ProductionVersion}</NetCoreAppVersion>");
msbuildProps.AppendLine(" </PropertyGroup>");
msbuildProps.AppendLine("</Project>");
File.WriteAllText(Path.Combine(c.BuildContext.BuildDirectory, "pkg", "version.props"), msbuildProps.ToString());
return c.Success();
}
[Target(nameof(GenerateStubHostPackages), nameof(GenerateMSbuildPropsFile))]
public static BuildTargetResult PackagePkgProjects(BuildTargetContext c)
{
var hostVersion = c.BuildContext.Get<HostVersion>("HostVersion");
var hostNugetversion = hostVersion.LatestHostVersion.ToString();
var content = $@"{c.BuildContext["CommitHash"]}{Environment.NewLine}{hostNugetversion}{Environment.NewLine}";
var pkgDir = Path.Combine(c.BuildContext.BuildDirectory, "pkg");
string rid = HostPackageSupportedRids[c.BuildContext.Get<string>("TargetRID")];
File.WriteAllText(Path.Combine(pkgDir, "version.txt"), content);
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
Exec(Path.Combine(pkgDir, "pack.cmd"));
}
else
{
List<string> buildScriptArgList = new List<string>();
string buildScriptFile = Path.Combine(pkgDir, "pack.sh");
buildScriptArgList.Add("--rid");
buildScriptArgList.Add(rid);
Exec(buildScriptFile, buildScriptArgList);
}
foreach (var file in Directory.GetFiles(Path.Combine(pkgDir, "bin", "packages"), "*.nupkg"))
{
var fileName = Path.GetFileName(file);
File.Copy(file, Path.Combine(Dirs.CorehostLocalPackages, fileName), true);
Console.WriteLine($"Copying package {fileName} to artifacts directory {Dirs.CorehostLocalPackages}.");
}
foreach (var item in hostVersion.LatestHostPackagesToValidate)
{
var fileFilter = $"runtime.{rid}.{item.Key}.{item.Value.ToString()}.nupkg";
if (Directory.GetFiles(Dirs.CorehostLocalPackages, fileFilter).Length == 0)
{
throw new BuildFailureException($"Nupkg for {fileFilter} was not created.");
}
}
return c.Success();
}
[Target(nameof(PrepareTargets.Init))]
public static BuildTargetResult RestoreLockedCoreHost(BuildTargetContext c)
{
var hostVersion = c.BuildContext.Get<HostVersion>("HostVersion");
var lockedHostFxrVersion = hostVersion.LockedHostFxrVersion.ToString();
string currentRid = HostPackageSupportedRids[c.BuildContext.Get<string>("TargetRID")];
string framework = c.BuildContext.Get<string>("TargetFramework");
string projectJson = $@"{{
""dependencies"": {{
""Microsoft.NETCore.DotNetHostResolver"" : ""{lockedHostFxrVersion}""
}},
""frameworks"": {{
""{framework}"": {{}}
}},
""runtimes"": {{
""{currentRid}"": {{}}
}}
}}";
var tempPjDirectory = Path.Combine(Dirs.Intermediate, "lockedHostTemp");
FS.Rmdir(tempPjDirectory);
Directory.CreateDirectory(tempPjDirectory);
var tempPjFile = Path.Combine(tempPjDirectory, "project.json");
File.WriteAllText(tempPjFile, projectJson);
DotNetCli.Stage0.Restore("--verbosity", "verbose",
"--fallbacksource", Dirs.CorehostLocalPackages,
"--fallbacksource", Dirs.CorehostDummyPackages)
.WorkingDirectory(tempPjDirectory)
.Execute()
.EnsureSuccessful();
// Clean out before publishing locked binaries
FS.Rmdir(Dirs.CorehostLocked);
// Use specific RIDS for non-backward compatible platforms.
DotNetCli.Stage0.Publish("--output", Dirs.CorehostLocked, "--no-build", "-r", currentRid)
.WorkingDirectory(tempPjDirectory)
.Execute()
.EnsureSuccessful();
return c.Success();
}
[Target(nameof(RestoreLockedCoreHost))]
public static BuildTargetResult PublishSharedFrameworkAndSharedHost(BuildTargetContext c)
{
var outputDir = Dirs.SharedFrameworkPublish;
Utils.DeleteDirectory(outputDir);
Directory.CreateDirectory(outputDir);
var dotnetCli = DotNetCli.Stage0;
var hostVersion = c.BuildContext.Get<HostVersion>("HostVersion");
string sharedFrameworkNugetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
string sharedFrameworkRid = c.BuildContext.Get<string>("TargetRID");
string sharedFrameworkTarget = c.BuildContext.Get<string>("TargetFramework");
var hostFxrVersion = hostVersion.LockedHostFxrVersion.ToString();
var commitHash = c.BuildContext.Get<string>("CommitHash");
var sharedFrameworkPublisher = new SharedFrameworkPublisher(
Dirs.RepoRoot,
Dirs.CorehostLocked,
Dirs.CorehostLatest,
Dirs.CorehostLocalPackages,
sharedFrameworkNugetVersion,
sharedFrameworkRid,
sharedFrameworkTarget);
sharedFrameworkPublisher.PublishSharedFramework(outputDir, commitHash, dotnetCli, hostFxrVersion);
sharedFrameworkPublisher.CopyMuxer(outputDir);
sharedFrameworkPublisher.CopyHostFxrToVersionedDirectory(outputDir, hostFxrVersion);
return c.Success();
}
private static IEnumerable<string> FilterToBuildableFrameworks(IEnumerable<string> frameworks)
{
if (CurrentPlatform.IsWindows)
{
return frameworks;
}
// On non windows platforms, we can not depend on reference assemblies for net4X projects being around, just build netstandard and netcoreapp configurations.
return frameworks.Where(f => f.StartsWith("netstandard", StringComparison.Ordinal) || f.StartsWith("netcoreapp", StringComparison.Ordinal));
}
private static IEnumerable<string> GetFrameworksFromProjectJson(string projectJsonPath)
{
using (TextReader projectFileReader = File.OpenText(projectJsonPath))
{
var projectJsonReader = new JsonTextReader(projectFileReader);
var serializer = new JsonSerializer();
var project = serializer.Deserialize<JObject>(projectJsonReader);
var frameworksSection = project.Value<JObject>("frameworks");
foreach (var framework in frameworksSection.Properties())
{
yield return framework.Name;
}
}
}
}
}

Просмотреть файл

@ -1,276 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Runtime.InteropServices;
using Microsoft.DotNet.Cli.Build;
using Microsoft.DotNet.Cli.Build.Framework;
using Microsoft.DotNet.InternalAbstractions;
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
namespace Microsoft.DotNet.Host.Build
{
public class DebTargets
{
[Target(nameof(GenerateSharedHostDeb),
nameof(GenerateHostFxrDeb),
nameof(GenerateSharedFrameworkDeb))]
[BuildPlatforms(BuildPlatform.Ubuntu, BuildPlatform.Debian)]
[BuildArchitectures(BuildArchitecture.x64)]
public static BuildTargetResult GenerateDebs(BuildTargetContext c)
{
return c.Success();
}
[Target]
[BuildPlatforms(BuildPlatform.Ubuntu, BuildPlatform.Debian)]
public static BuildTargetResult GenerateSharedHostDeb(BuildTargetContext c)
{
// Ubuntu 16.04 Jenkins Machines don't have docker or debian package build tools
// So we need to skip this target if the tools aren't present.
// https://github.com/dotnet/core-setup/issues/167
if (ShouldSkipBuildDebPackages() || DebuildNotPresent())
{
c.Info("Debuild not present, skipping target: {nameof(GenerateSharedHostDeb)}");
return c.Success();
}
var packageName = Monikers.GetDebianSharedHostPackageName(c);
var version = c.BuildContext.Get<HostVersion>("HostVersion").LockedHostVersion.ToString();
var inputRoot = c.BuildContext.Get<string>("SharedHostPublishRoot");
var debFile = c.BuildContext.Get<string>("SharedHostInstallerFile");
var manPagesDir = Path.Combine(Dirs.RepoRoot, "Documentation", "manpages");
var debianConfigFile = Path.Combine(Dirs.DebPackagingConfig, "dotnet-sharedhost-debian_config.json");
var debianConfigVariables = new Dictionary<string, string>()
{
{ "SHARED_HOST_BRAND_NAME", Monikers.GetSharedHostBrandName(c) }
};
var debCreator = new DebPackageCreator(
DotNetCli.Stage0,
Dirs.Intermediate,
dotnetDebToolPackageSource: Dirs.Packages);
debCreator.CreateDeb(
debianConfigFile,
packageName,
version,
inputRoot,
debianConfigVariables,
debFile,
manPagesDir);
return c.Success();
}
[Target]
[BuildPlatforms(BuildPlatform.Ubuntu, BuildPlatform.Debian)]
public static BuildTargetResult GenerateHostFxrDeb(BuildTargetContext c)
{
// Ubuntu 16.04 Jenkins Machines don't have docker or debian package build tools
// So we need to skip this target if the tools aren't present.
// https://github.com/dotnet/core-setup/issues/167
if (ShouldSkipBuildDebPackages() || DebuildNotPresent())
{
c.Info("Debuild not present, skipping target: {nameof(GenerateHostFxrDeb)}");
return c.Success();
}
var hostFxrVersion = c.BuildContext.Get<HostVersion>("HostVersion").LockedHostFxrVersion.ToString();
var packageName = Monikers.GetDebianHostFxrPackageName(hostFxrVersion);
var sharedHostVersion = c.BuildContext.Get<HostVersion>("HostVersion").LockedHostVersion.ToString();
var inputRoot = c.BuildContext.Get<string>("HostFxrPublishRoot");
var debFile = c.BuildContext.Get<string>("HostFxrInstallerFile");
var debianConfigFile = Path.Combine(Dirs.DebPackagingConfig, "dotnet-hostfxr-debian_config.json");
var debianConfigVariables = new Dictionary<string, string>()
{
{ "HOSTFXR_BRAND_NAME", Monikers.GetHostFxrBrandName(c) },
{ "SHARED_HOST_DEBIAN_VERSION", sharedHostVersion },
{ "HOSTFXR_NUGET_VERSION", hostFxrVersion },
{ "HOSTFXR_DEBIAN_PACKAGE_NAME", packageName }
};
var debCreator = new DebPackageCreator(
DotNetCli.Stage0,
Dirs.Intermediate,
dotnetDebToolPackageSource: Dirs.Packages);
debCreator.CreateDeb(
debianConfigFile,
packageName,
hostFxrVersion,
inputRoot,
debianConfigVariables,
debFile);
return c.Success();
}
[Target(nameof(InstallSharedHost))]
[BuildPlatforms(BuildPlatform.Ubuntu, BuildPlatform.Debian)]
public static BuildTargetResult GenerateSharedFrameworkDeb(BuildTargetContext c)
{
// Ubuntu 16.04 Jenkins Machines don't have docker or debian package build tools
// So we need to skip this target if the tools aren't present.
// https://github.com/dotnet/core-setup/issues/167
if (ShouldSkipBuildDebPackages() || DebuildNotPresent())
{
c.Info("Debuild not present, skipping target: {nameof(GenerateSharedFrameworkDeb)}");
return c.Success();
}
var sharedFrameworkNugetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
var packageName = Monikers.GetDebianSharedFrameworkPackageName(sharedFrameworkNugetVersion);
var sharedHostVersion = c.BuildContext.Get<HostVersion>("HostVersion").LockedHostVersion.ToString();
var hostFxrVersion = c.BuildContext.Get<HostVersion>("HostVersion").LockedHostFxrVersion.ToString();
var hostfxrDebianPackageName = Monikers.GetDebianHostFxrPackageName(hostFxrVersion);
var version = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
var inputRoot = c.BuildContext.Get<string>("SharedFrameworkPublishRoot");
var debFile = c.BuildContext.Get<string>("SharedFrameworkInstallerFile");
var debianConfigFile = Path.Combine(Dirs.DebPackagingConfig, "dotnet-sharedframework-debian_config.json");
var debianConfigVariables = new Dictionary<string, string>()
{
{ "SHARED_HOST_DEBIAN_VERSION", sharedHostVersion },
{ "HOSTFXR_DEBIAN_PACKAGE_NAME", hostfxrDebianPackageName},
{ "HOSTFXR_DEBIAN_VERSION", hostFxrVersion },
{ "SHARED_FRAMEWORK_DEBIAN_PACKAGE_NAME", packageName },
{ "SHARED_FRAMEWORK_NUGET_NAME", Monikers.SharedFrameworkName },
{ "SHARED_FRAMEWORK_NUGET_VERSION", c.BuildContext.Get<string>("SharedFrameworkNugetVersion")},
{ "SHARED_FRAMEWORK_BRAND_NAME", Monikers.GetSharedFxBrandName(c) }
};
var debCreator = new DebPackageCreator(
DotNetCli.Stage0,
Dirs.Intermediate,
dotnetDebToolPackageSource: Dirs.Packages);
debCreator.CreateDeb(
debianConfigFile,
packageName,
version,
inputRoot,
debianConfigVariables,
debFile);
return c.Success();
}
[Target(nameof(InstallSharedFramework),
nameof(RemovePackages))]
[BuildPlatforms(BuildPlatform.Ubuntu, BuildPlatform.Debian)]
[BuildArchitectures(BuildArchitecture.x64)]
public static BuildTargetResult TestDebInstaller(BuildTargetContext c)
{
return c.Success();
}
[Target]
public static BuildTargetResult InstallSharedHost(BuildTargetContext c)
{
// Ubuntu 16.04 Jenkins Machines don't have docker or debian package build tools
// So we need to skip this target if the tools aren't present.
// https://github.com/dotnet/core-setup/issues/167
if (ShouldSkipBuildDebPackages() || DebuildNotPresent())
{
c.Info("Debuild not present, skipping target: {nameof(InstallSharedHost)}");
return c.Success();
}
InstallPackage(c.BuildContext.Get<string>("SharedHostInstallerFile"));
return c.Success();
}
[Target(nameof(InstallSharedHost))]
public static BuildTargetResult InstallHostFxr(BuildTargetContext c)
{
// Ubuntu 16.04 Jenkins Machines don't have docker or debian package build tools
// So we need to skip this target if the tools aren't present.
// https://github.com/dotnet/core-setup/issues/167
if (ShouldSkipBuildDebPackages() || DebuildNotPresent())
{
c.Info("Debuild not present, skipping target: {nameof(InstallHostFxr)}");
return c.Success();
}
InstallPackage(c.BuildContext.Get<string>("HostFxrInstallerFile"));
return c.Success();
}
[Target(nameof(InstallHostFxr))]
public static BuildTargetResult InstallSharedFramework(BuildTargetContext c)
{
// Ubuntu 16.04 Jenkins Machines don't have docker or debian package build tools
// So we need to skip this target if the tools aren't present.
// https://github.com/dotnet/core-setup/issues/167
if (ShouldSkipBuildDebPackages() || DebuildNotPresent())
{
c.Info("Debuild not present, skipping target: {nameof(InstallSharedFramework)}");
return c.Success();
}
InstallPackage(c.BuildContext.Get<string>("SharedFrameworkInstallerFile"));
return c.Success();
}
[Target]
public static BuildTargetResult RemovePackages(BuildTargetContext c)
{
// Ubuntu 16.04 Jenkins Machines don't have docker or debian package build tools
// So we need to skip this target if the tools aren't present.
// https://github.com/dotnet/core-setup/issues/167
if (ShouldSkipBuildDebPackages() || DebuildNotPresent())
{
c.Info("Debuild not present, skipping target: {nameof(RemovePackages)}");
return c.Success();
}
var sharedFrameworkNugetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
var hostFxrVersion = c.BuildContext.Get<HostVersion>("HostVersion").LockedHostFxrVersion.ToString();
IEnumerable<string> orderedPackageNames = new List<string>()
{
Monikers.GetDebianSharedFrameworkPackageName(sharedFrameworkNugetVersion),
Monikers.GetDebianHostFxrPackageName(hostFxrVersion),
Monikers.GetDebianSharedHostPackageName(c)
};
foreach(var packageName in orderedPackageNames)
{
RemovePackage(packageName);
}
return c.Success();
}
private static void InstallPackage(string packagePath)
{
Cmd("sudo", "dpkg", "-i", packagePath)
.Execute()
.EnsureSuccessful();
}
private static void RemovePackage(string packageName)
{
Cmd("sudo", "dpkg", "-r", packageName)
.Execute()
.EnsureSuccessful();
}
private static bool DebuildNotPresent()
{
return Cmd("/usr/bin/env", "debuild", "-h").Execute().ExitCode != 0;
}
private static bool ShouldSkipBuildDebPackages()
{
return Environment.GetEnvironmentVariable("DOTNET_BUILD_SKIP_DEB_PACKAGING") == "1";
}
}
}

Просмотреть файл

@ -1,23 +0,0 @@
using Microsoft.DotNet.Cli.Build.Framework;
namespace Microsoft.DotNet.Host.Build
{
public class InstallerTargets
{
[Target(nameof(MsiTargets.GenerateMsis),
nameof(MsiTargets.GenerateBundles),
nameof(PkgTargets.GeneratePkgs),
nameof(DebTargets.GenerateDebs))]
public static BuildTargetResult GenerateInstaller(BuildTargetContext c)
{
return c.Success();
}
[Target(nameof(DebTargets.TestDebInstaller))]
public static BuildTargetResult TestInstaller(BuildTargetContext c)
{
return c.Success();
}
}
}

Просмотреть файл

@ -1,263 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Net.Http;
using Microsoft.DotNet.Cli.Build;
using System.Runtime.InteropServices;
using Microsoft.DotNet.Cli.Build.Framework;
using Microsoft.DotNet.InternalAbstractions;
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
namespace Microsoft.DotNet.Host.Build
{
public class MsiTargets
{
private const string ENGINE = "engine.exe";
private const string WixVersion = "3.10.2";
private static string WixRoot
{
get
{
return Path.Combine(Dirs.Output, $"WixTools.{WixVersion}");
}
}
private static string HostFxrMsi { get; set; }
private static string SharedHostMsi { get; set; }
private static string SharedFrameworkMsi { get; set; }
private static string SharedFrameworkBundle { get; set; }
private static string SharedFrameworkEngine { get; set; }
private static string MsiVersion { get; set; }
private static string DisplayVersion { get; set; }
// Processor Architecture of MSI's contents
private static string TargetArch { get; set; }
// Processor Architecture of MSI itself
private static string MSIBuildArch { get; set; }
private static void AcquireWix(BuildTargetContext c)
{
if (File.Exists(Path.Combine(WixRoot, "candle.exe")))
{
return;
}
Directory.CreateDirectory(WixRoot);
c.Info("Downloading WixTools..");
DownloadFile($"https://dotnetcli.blob.core.windows.net/build/wix/wix.{WixVersion}.zip", Path.Combine(WixRoot, "WixTools.zip"));
c.Info("Extracting WixTools..");
ZipFile.ExtractToDirectory(Path.Combine(WixRoot, "WixTools.zip"), WixRoot);
}
private static void DownloadFile(string uri, string destinationPath)
{
using (var httpClient = new HttpClient())
{
var getTask = httpClient.GetStreamAsync(uri);
using (var outStream = File.OpenWrite(destinationPath))
{
getTask.Result.CopyTo(outStream);
}
}
}
[Target]
[BuildPlatforms(BuildPlatform.Windows)]
public static BuildTargetResult InitMsi(BuildTargetContext c)
{
SharedFrameworkBundle = c.BuildContext.Get<string>("CombinedMuxerHostFxrFrameworkInstallerFile");
SharedHostMsi = Path.ChangeExtension(c.BuildContext.Get<string>("SharedHostInstallerFile"), "msi");
HostFxrMsi = Path.ChangeExtension(c.BuildContext.Get<string>("HostFxrInstallerFile"), "msi");
SharedFrameworkMsi = Path.ChangeExtension(c.BuildContext.Get<string>("SharedFrameworkInstallerFile"), "msi");
SharedFrameworkEngine = GetEngineName(SharedFrameworkBundle);
var buildVersion = c.BuildContext.Get<BuildVersion>("BuildVersion");
MsiVersion = buildVersion.GenerateMsiVersion();
DisplayVersion = buildVersion.SimpleVersion;
TargetArch = c.BuildContext.Get<string>("Platform");
MSIBuildArch = CurrentArchitecture.Current.ToString();
// If we are building the MSI for Arm32 or Arm64, then build it as x86 or x64 for now.
if (String.Compare(TargetArch, "arm", true) == 0)
{
MSIBuildArch = "x86";
}
else if (String.Compare(TargetArch, "arm64", true) == 0)
{
MSIBuildArch = "x64";
}
AcquireWix(c);
return c.Success();
}
[Target(nameof(MsiTargets.InitMsi),
nameof(GenerateDotnetSharedHostMsi),
nameof(GenerateDotnetHostFxrMsi),
nameof(GenerateDotnetSharedFrameworkMsi))]
[BuildPlatforms(BuildPlatform.Windows)]
public static BuildTargetResult GenerateMsis(BuildTargetContext c)
{
return c.Success();
}
[Target(nameof(MsiTargets.InitMsi),
nameof(GenerateSharedFxBundle))]
[BuildPlatforms(BuildPlatform.Windows)]
public static BuildTargetResult GenerateBundles(BuildTargetContext c)
{
return c.Success();
}
[Target]
[BuildPlatforms(BuildPlatform.Windows)]
public static BuildTargetResult GenerateDotnetSharedHostMsi(BuildTargetContext c)
{
var hostVersion = c.BuildContext.Get<HostVersion>("HostVersion");
var hostMsiVersion = hostVersion.LockedHostVersion.GenerateMsiVersion();
var hostNugetVersion = hostVersion.LockedHostVersion.ToString();
var inputDir = c.BuildContext.Get<string>("SharedHostPublishRoot");
var wixObjRoot = Path.Combine(Dirs.Output, "obj", "wix", "sharedhost");
var sharedHostBrandName = $"'{Monikers.GetSharedHostBrandName(c)}'";
var upgradeCode = Utils.GenerateGuidFromName(SharedHostMsi).ToString().ToUpper();
if (Directory.Exists(wixObjRoot))
{
Utils.DeleteDirectory(wixObjRoot);
}
Directory.CreateDirectory(wixObjRoot);
Cmd("powershell", "-NoProfile", "-NoLogo",
Path.Combine(Dirs.RepoRoot, "packaging", "windows", "host", "generatemsi.ps1"),
inputDir, SharedHostMsi, WixRoot, sharedHostBrandName, hostMsiVersion, hostNugetVersion, MSIBuildArch, TargetArch, wixObjRoot, upgradeCode)
.Execute()
.EnsureSuccessful();
return c.Success();
}
[Target]
[BuildPlatforms(BuildPlatform.Windows)]
public static BuildTargetResult GenerateDotnetHostFxrMsi(BuildTargetContext c)
{
var hostVersion = c.BuildContext.Get<HostVersion>("HostVersion");
var hostFxrMsiVersion = hostVersion.LockedHostFxrVersion.GenerateMsiVersion();
var hostFxrNugetVersion = hostVersion.LockedHostFxrVersion.ToString();
var inputDir = c.BuildContext.Get<string>("HostFxrPublishRoot");
var wixObjRoot = Path.Combine(Dirs.Output, "obj", "wix", "hostfxr");
var hostFxrBrandName = $"'{Monikers.GetHostFxrBrandName(c)}'";
var upgradeCode = Utils.GenerateGuidFromName(HostFxrMsi).ToString().ToUpper();
if (Directory.Exists(wixObjRoot))
{
Utils.DeleteDirectory(wixObjRoot);
}
Directory.CreateDirectory(wixObjRoot);
Cmd("powershell", "-NoProfile", "-NoLogo",
Path.Combine(Dirs.RepoRoot, "packaging", "windows", "hostfxr", "generatemsi.ps1"),
inputDir, HostFxrMsi, WixRoot, hostFxrBrandName, hostFxrMsiVersion, hostFxrNugetVersion, MSIBuildArch, TargetArch, wixObjRoot, upgradeCode)
.Execute()
.EnsureSuccessful();
return c.Success();
}
[Target]
[BuildPlatforms(BuildPlatform.Windows)]
public static BuildTargetResult GenerateDotnetSharedFrameworkMsi(BuildTargetContext c)
{
var inputDir = c.BuildContext.Get<string>("SharedFrameworkPublishRoot");
var sharedFrameworkNuGetName = Monikers.SharedFrameworkName;
var sharedFrameworkNuGetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
var msiVerison = sharedFrameworkNuGetVersion.Split('-')[0];
var upgradeCode = Utils.GenerateGuidFromName(SharedFrameworkMsi).ToString().ToUpper();
var wixObjRoot = Path.Combine(Dirs.Output, "obj", "wix", "sharedframework");
var sharedFxBrandName = $"'{Monikers.GetSharedFxBrandName(c)}'";
if (Directory.Exists(wixObjRoot))
{
Utils.DeleteDirectory(wixObjRoot);
}
Directory.CreateDirectory(wixObjRoot);
Cmd("powershell", "-NoProfile", "-NoLogo",
Path.Combine(Dirs.RepoRoot, "packaging", "windows", "sharedframework", "generatemsi.ps1"),
inputDir, SharedFrameworkMsi, WixRoot, sharedFxBrandName, msiVerison, sharedFrameworkNuGetName, sharedFrameworkNuGetVersion, upgradeCode, MSIBuildArch, TargetArch, wixObjRoot)
.Execute()
.EnsureSuccessful();
return c.Success();
}
[Target(nameof(MsiTargets.InitMsi))]
[BuildPlatforms(BuildPlatform.Windows)]
public static BuildTargetResult GenerateSharedFxBundle(BuildTargetContext c)
{
var sharedFrameworkNuGetName = Monikers.SharedFrameworkName;
var sharedFrameworkNuGetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
var upgradeCode = Utils.GenerateGuidFromName(SharedFrameworkBundle).ToString().ToUpper();
var sharedFxBrandName = $"'{Monikers.GetSharedFxBrandName(c)}'";
Cmd("powershell", "-NoProfile", "-NoLogo",
Path.Combine(Dirs.RepoRoot, "packaging", "windows", "sharedframework", "generatebundle.ps1"),
SharedFrameworkMsi, SharedHostMsi, HostFxrMsi, SharedFrameworkBundle, WixRoot, sharedFxBrandName, MsiVersion, DisplayVersion, sharedFrameworkNuGetName, sharedFrameworkNuGetVersion, upgradeCode, TargetArch, MSIBuildArch)
.Execute()
.EnsureSuccessful();
return c.Success();
}
private static string GetEngineName(string bundle)
{
var engine = $"{Path.GetFileNameWithoutExtension(bundle)}-{ENGINE}";
return Path.Combine(Path.GetDirectoryName(bundle), engine);
}
[Target(nameof(MsiTargets.InitMsi))]
[BuildPlatforms(BuildPlatform.Windows)]
public static BuildTargetResult ExtractEngineFromBundle(BuildTargetContext c)
{
ExtractEngineFromBundleHelper(SharedFrameworkBundle, SharedFrameworkEngine);
return c.Success();
}
[Target(nameof(MsiTargets.InitMsi))]
[BuildPlatforms(BuildPlatform.Windows)]
public static BuildTargetResult ReattachEngineToBundle(BuildTargetContext c)
{
ReattachEngineToBundleHelper(SharedFrameworkBundle, SharedFrameworkEngine);
return c.Success();
}
private static void ExtractEngineFromBundleHelper(string bundle, string engine)
{
Cmd($"{WixRoot}\\insignia.exe", "-ib", bundle, "-o", engine)
.Execute()
.EnsureSuccessful();
}
private static void ReattachEngineToBundleHelper(string bundle, string engine)
{
Cmd($"{WixRoot}\\insignia.exe", "-ab", engine, bundle, "-o", bundle)
.Execute()
.EnsureSuccessful();
File.Delete(engine);
}
}
}

Просмотреть файл

@ -1,56 +0,0 @@
using System.IO;
using System.Linq;
using System.Reflection;
using Microsoft.DotNet.Cli.Build.Framework;
using NugetProgram = NuGet.CommandLine.XPlat.Program;
namespace Microsoft.DotNet.Cli.Build
{
public static class NuGetUtil
{
public static void PushPackages(
string packageDirPath,
string destinationUrl,
string apiKey,
bool includeSymbolPackages)
{
string[] paths;
if (includeSymbolPackages)
{
paths = new[]
{
Path.Combine(packageDirPath, "*.nupkg")
};
}
else
{
paths = Directory.GetFiles(packageDirPath, "*.nupkg")
.Where(path => !path.EndsWith(".symbols.nupkg"))
.ToArray();
}
foreach (var path in paths)
{
int result = RunNuGetCommand(
"push",
"-s", destinationUrl,
"-k", apiKey,
"--timeout", "3600",
path);
if (result != 0)
{
throw new BuildFailureException($"NuGet Push failed with exit code '{result}'.");
}
}
}
private static int RunNuGetCommand(params string[] nugetArgs)
{
var nugetAssembly = typeof(NugetProgram).GetTypeInfo().Assembly;
var mainMethod = nugetAssembly.EntryPoint;
return (int)mainMethod.Invoke(null, new object[] { nugetArgs });
}
}
}

Просмотреть файл

@ -1,259 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.IO.Compression;
using System.Runtime.InteropServices;
using Microsoft.DotNet.Cli.Build;
using Microsoft.DotNet.Cli.Build.Framework;
using Microsoft.DotNet.InternalAbstractions;
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
namespace Microsoft.DotNet.Host.Build
{
public static class PackageTargets
{
public static readonly string[] ProjectsToPack = new string[]
{
"Microsoft.DotNet.PlatformAbstractions",
"Microsoft.Extensions.DependencyModel",
};
[Target(
nameof(PackageTargets.CopySharedHostLayout),
nameof(PackageTargets.CopyHostFxrLayout),
nameof(PackageTargets.CopySharedFxLayout),
nameof(PackageTargets.CopyCombinedMuxerHostFxrFrameworkLayout))]
public static BuildTargetResult InitPackage(BuildTargetContext c)
{
Directory.CreateDirectory(Dirs.Packages);
return c.Success();
}
[Target(nameof(PrepareTargets.Init),
nameof(PackageTargets.InitPackage),
nameof(PackageTargets.GenerateVersionBadge),
nameof(PackageTargets.GenerateCompressedFile),
nameof(InstallerTargets.GenerateInstaller),
nameof(PackageTargets.GenerateNugetPackages),
nameof(InstallerTargets.TestInstaller))]
[Environment("DOTNET_BUILD_SKIP_PACKAGING", null, "0", "false")]
public static BuildTargetResult Package(BuildTargetContext c)
{
return c.Success();
}
[Target]
public static BuildTargetResult GenerateVersionBadge(BuildTargetContext c)
{
var sharedFrameworkNugetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
var versionSvg = Path.Combine(Dirs.RepoRoot, "resources", "images", "version_badge.svg");
var outputVersionSvg = c.BuildContext.Get<string>("VersionBadge");
var versionSvgContent = File.ReadAllText(versionSvg);
versionSvgContent = versionSvgContent.Replace("ver_number", sharedFrameworkNugetVersion);
File.WriteAllText(outputVersionSvg, versionSvgContent);
return c.Success();
}
[Target]
public static BuildTargetResult CopySharedHostLayout(BuildTargetContext c)
{
var sharedHostRoot = Path.Combine(Dirs.Output, "obj", "sharedHost");
if (Directory.Exists(sharedHostRoot))
{
Utils.DeleteDirectory(sharedHostRoot);
}
Directory.CreateDirectory(sharedHostRoot);
foreach (var file in Directory.GetFiles(Dirs.SharedFrameworkPublish, "*", SearchOption.TopDirectoryOnly))
{
var destFile = file.Replace(Dirs.SharedFrameworkPublish, sharedHostRoot);
File.Copy(file, destFile, true);
c.Warn(destFile);
}
FixPermissions(sharedHostRoot);
File.Copy(
Path.Combine(Dirs.RepoRoot, "resources", "ThirdPartyNotices.txt"),
Path.Combine(sharedHostRoot, "ThirdPartyNotices.txt"));
File.Copy(
Path.Combine(Dirs.RepoRoot, "resources", "LICENSE.txt"),
Path.Combine(sharedHostRoot, "LICENSE.txt"));
c.BuildContext["SharedHostPublishRoot"] = sharedHostRoot;
return c.Success();
}
[Target]
public static BuildTargetResult CopyHostFxrLayout(BuildTargetContext c)
{
var hostFxrRoot = Path.Combine(Dirs.Output, "obj", "hostFxr");
if (Directory.Exists(hostFxrRoot))
{
Utils.DeleteDirectory(hostFxrRoot);
}
Directory.CreateDirectory(hostFxrRoot);
string srcHostDir = Path.Combine(Dirs.SharedFrameworkPublish, "host");
string destHostDir = Path.Combine(hostFxrRoot, "host");
FS.CopyRecursive(srcHostDir, destHostDir);
FixPermissions(hostFxrRoot);
c.BuildContext["HostFxrPublishRoot"] = hostFxrRoot;
return c.Success();
}
[Target]
public static BuildTargetResult CopySharedFxLayout(BuildTargetContext c)
{
var sharedFxRoot = Path.Combine(Dirs.Output, "obj", "sharedFx");
if (Directory.Exists(sharedFxRoot))
{
Utils.DeleteDirectory(sharedFxRoot);
}
Directory.CreateDirectory(sharedFxRoot);
Utils.CopyDirectoryRecursively(Path.Combine(Dirs.SharedFrameworkPublish, "shared"), sharedFxRoot, true);
FixPermissions(sharedFxRoot);
c.BuildContext["SharedFrameworkPublishRoot"] = sharedFxRoot;
return c.Success();
}
[Target]
public static BuildTargetResult CopyCombinedMuxerHostFxrFrameworkLayout(BuildTargetContext c)
{
var combinedRoot = Path.Combine(Dirs.Output, "obj", "combined-framework-host");
if (Directory.Exists(combinedRoot))
{
Utils.DeleteDirectory(combinedRoot);
}
Directory.CreateDirectory(combinedRoot);
string sharedFrameworkPublishRoot = c.BuildContext.Get<string>("SharedFrameworkPublishRoot");
Utils.CopyDirectoryRecursively(sharedFrameworkPublishRoot, combinedRoot);
string sharedHostPublishRoot = c.BuildContext.Get<string>("SharedHostPublishRoot");
Utils.CopyDirectoryRecursively(sharedHostPublishRoot, combinedRoot);
string hostFxrPublishRoot = c.BuildContext.Get<string>("HostFxrPublishRoot");
Utils.CopyDirectoryRecursively(hostFxrPublishRoot, combinedRoot);
c.BuildContext["CombinedMuxerHostFxrFrameworkPublishRoot"] = combinedRoot;
return c.Success();
}
[Target(nameof(PackageTargets.GenerateZip), nameof(PackageTargets.GenerateTarBall))]
public static BuildTargetResult GenerateCompressedFile(BuildTargetContext c)
{
return c.Success();
}
[Target(nameof(PackageTargets.InitPackage))]
[BuildPlatforms(BuildPlatform.Windows)]
public static BuildTargetResult GenerateZip(BuildTargetContext c)
{
CreateZipFromDirectory(
c.BuildContext.Get<string>("CombinedMuxerHostFxrFrameworkPublishRoot"),
c.BuildContext.Get<string>("CombinedMuxerHostFxrFrameworkCompressedFile"));
CreateZipFromDirectory(
c.BuildContext.Get<string>("HostFxrPublishRoot"),
c.BuildContext.Get<string>("HostFxrCompressedFile"));
CreateZipFromDirectory(
c.BuildContext.Get<string>("SharedFrameworkPublishRoot"),
c.BuildContext.Get<string>("SharedFrameworkCompressedFile"));
return c.Success();
}
[Target(nameof(PackageTargets.InitPackage))]
[BuildPlatforms(BuildPlatform.Unix)]
public static BuildTargetResult GenerateTarBall(BuildTargetContext c)
{
CreateTarBallFromDirectory(
c.BuildContext.Get<string>("CombinedMuxerHostFxrFrameworkPublishRoot"),
c.BuildContext.Get<string>("CombinedMuxerHostFxrFrameworkCompressedFile"));
CreateTarBallFromDirectory(
c.BuildContext.Get<string>("HostFxrPublishRoot"),
c.BuildContext.Get<string>("HostFxrCompressedFile"));
CreateTarBallFromDirectory(
c.BuildContext.Get<string>("SharedFrameworkPublishRoot"),
c.BuildContext.Get<string>("SharedFrameworkCompressedFile"));
return c.Success();
}
[Target]
public static BuildTargetResult GenerateNugetPackages(BuildTargetContext c)
{
var versionSuffix = c.BuildContext.Get<BuildVersion>("BuildVersion").CommitCountString;
var configuration = c.BuildContext.Get<string>("Configuration");
var dotnet = DotNetCli.Stage0;
var packagingBuildBasePath = Path.Combine(Dirs.Intermediate, "forPackaging");
FS.Mkdirp(Dirs.Packages);
foreach (var projectName in ProjectsToPack)
{
var projectFile = Path.Combine(Dirs.RepoRoot, "src", projectName, "project.json");
dotnet.Pack(
projectFile,
"--no-build",
"--serviceable",
"--build-base-path", packagingBuildBasePath,
"--output", Dirs.Packages,
"--configuration", configuration,
"--version-suffix", versionSuffix)
.Execute()
.EnsureSuccessful();
}
return c.Success();
}
private static void CreateZipFromDirectory(string directory, string artifactPath)
{
if (File.Exists(artifactPath))
{
File.Delete(artifactPath);
}
ZipFile.CreateFromDirectory(directory, artifactPath, CompressionLevel.Optimal, false);
}
private static void CreateTarBallFromDirectory(string directory, string artifactPath)
{
if (File.Exists(artifactPath))
{
File.Delete(artifactPath);
}
Cmd("tar", "-czf", artifactPath, "-C", directory, ".")
.Execute()
.EnsureSuccessful();
}
private static void FixPermissions(string directory)
{
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
// Reset everything to user readable/writeable and group and world readable.
FS.ChmodAll(directory, "*", "644");
// Now make things that should be executable, executable.
FS.FixModeFlags(directory);
}
}
}
}

Просмотреть файл

@ -1,163 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Runtime.InteropServices;
using Microsoft.DotNet.Cli.Build.Framework;
using Microsoft.DotNet.InternalAbstractions;
using Microsoft.DotNet.Cli.Build;
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
namespace Microsoft.DotNet.Host.Build
{
public class PkgTargets
{
public static string PkgsIntermediateDir { get; set; }
public static string SharedHostComponentId { get; set; }
public static string SharedFxComponentId { get; set; }
public static string HostFxrComponentId { get; set; }
public static string SharedFxPkgId { get; set; }
public static string SharedFrameworkNugetVersion { get; set; }
public static string CLISdkComponentId { get; set; }
public static string CLISdkPkgId { get; set; }
public static string CLISdkNugetVersion { get; set; }
[Target]
[BuildPlatforms(BuildPlatform.OSX)]
public static BuildTargetResult InitPkg(BuildTargetContext c)
{
PkgsIntermediateDir = Path.Combine(Dirs.Packages, "intermediate");
Directory.CreateDirectory(PkgsIntermediateDir);
SharedHostComponentId = $"com.microsoft.dotnet.sharedhost.component.osx.x64";
string hostFxrVersion = c.BuildContext.Get<HostVersion>("HostVersion").LockedHostFxrVersion.ToString();
HostFxrComponentId = $"com.microsoft.dotnet.hostfxr.{hostFxrVersion}.component.osx.x64";
string sharedFrameworkNugetName = Monikers.SharedFrameworkName;
SharedFrameworkNugetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
SharedFxComponentId = $"com.microsoft.dotnet.sharedframework.{sharedFrameworkNugetName}.{SharedFrameworkNugetVersion}.component.osx.x64";
SharedFxPkgId = $"com.microsoft.dotnet.{sharedFrameworkNugetName}.{SharedFrameworkNugetVersion}.osx.x64";
return c.Success();
}
[Target(nameof(InitPkg), nameof(GenerateSharedFrameworkProductArchive))]
[BuildPlatforms(BuildPlatform.OSX)]
public static BuildTargetResult GeneratePkgs(BuildTargetContext c)
{
return c.Success();
}
[Target(nameof(GenerateSharedFrameworkPkg), nameof(GenerateSharedHostPkg), nameof(GenerateHostFxrPkg))]
[BuildPlatforms(BuildPlatform.OSX)]
public static BuildTargetResult GenerateSharedFrameworkProductArchive(BuildTargetContext c)
{
string resourcePath = Path.Combine(Dirs.RepoRoot, "packaging", "osx", "sharedframework", "resources");
string outFilePath = Path.Combine(PkgsIntermediateDir, c.BuildContext.Get<string>("CombinedMuxerHostFxrFrameworkInstallerFile"));
string inputDistTemplatePath = Path.Combine(
Dirs.RepoRoot,
"packaging",
"osx",
"sharedframework",
"shared-framework-distribution-template.xml");
string distTemplate = File.ReadAllText(inputDistTemplatePath);
string distributionPath = Path.Combine(PkgsIntermediateDir, "shared-framework-formatted-distribution.xml");
string formattedDistContents =
distTemplate.Replace("{SharedFxComponentId}", SharedFxComponentId)
.Replace("{SharedHostComponentId}", SharedHostComponentId)
.Replace("{HostFxrComponentId}", HostFxrComponentId)
.Replace("{SharedFrameworkNugetName}", Monikers.SharedFrameworkName)
.Replace("{SharedFrameworkNugetVersion}", SharedFrameworkNugetVersion)
.Replace("{SharedFxBrandName}", Monikers.GetSharedFxBrandName(c))
.Replace("{SharedHostBrandName}", Monikers.GetSharedHostBrandName(c))
.Replace("{HostFxrBrandName}", Monikers.GetHostFxrBrandName(c));
File.WriteAllText(distributionPath, formattedDistContents);
Cmd("productbuild",
"--version", SharedFrameworkNugetVersion,
"--identifier", SharedFxPkgId,
"--package-path", PkgsIntermediateDir,
"--resources", resourcePath,
"--distribution", distributionPath,
outFilePath)
.Execute()
.EnsureSuccessful();
return c.Success();
}
[Target]
[BuildPlatforms(BuildPlatform.OSX)]
public static BuildTargetResult GenerateSharedFrameworkPkg(BuildTargetContext c)
{
string outFilePath = Path.Combine(PkgsIntermediateDir, SharedFxComponentId + ".pkg");
string installLocation = "/usr/local/share/dotnet";
string scriptsLocation = Path.Combine(Dirs.RepoRoot, "packaging", "osx", "sharedframework", "scripts");
Cmd("pkgbuild",
"--root", c.BuildContext.Get<string>("SharedFrameworkPublishRoot"),
"--identifier", SharedFxComponentId,
"--version", SharedFrameworkNugetVersion,
"--install-location", installLocation,
"--scripts", scriptsLocation,
outFilePath)
.Execute()
.EnsureSuccessful();
File.Copy(outFilePath, c.BuildContext.Get<string>("SharedFrameworkInstallerFile"), true);
return c.Success();
}
[Target]
[BuildPlatforms(BuildPlatform.OSX)]
public static BuildTargetResult GenerateSharedHostPkg(BuildTargetContext c)
{
string version = c.BuildContext.Get<HostVersion>("HostVersion").LockedHostVersion.ToString();
string outFilePath = Path.Combine(PkgsIntermediateDir, SharedHostComponentId + ".pkg");
string installLocation = "/usr/local/share/dotnet";
string scriptsLocation = Path.Combine(Dirs.RepoRoot, "packaging", "osx", "sharedhost", "scripts");
Cmd("pkgbuild",
"--root", c.BuildContext.Get<string>("SharedHostPublishRoot"),
"--identifier", SharedHostComponentId,
"--version", version,
"--install-location", installLocation,
"--scripts", scriptsLocation,
outFilePath)
.Execute()
.EnsureSuccessful();
File.Copy(outFilePath, c.BuildContext.Get<string>("SharedHostInstallerFile"), true);
return c.Success();
}
[Target]
[BuildPlatforms(BuildPlatform.OSX)]
public static BuildTargetResult GenerateHostFxrPkg(BuildTargetContext c)
{
string hostFxrVersion = c.BuildContext.Get<HostVersion>("HostVersion").LockedHostFxrVersion.ToString();
string outFilePath = Path.Combine(PkgsIntermediateDir, HostFxrComponentId + ".pkg");
string installLocation = "/usr/local/share/dotnet";
string scriptsLocation = Path.Combine(Dirs.RepoRoot, "packaging", "osx", "hostfxr", "scripts");
Cmd("pkgbuild",
"--root", c.BuildContext.Get<string>("HostFxrPublishRoot"),
"--identifier", HostFxrComponentId,
"--version", hostFxrVersion,
"--install-location", installLocation,
"--scripts", scriptsLocation,
outFilePath)
.Execute()
.EnsureSuccessful();
File.Copy(outFilePath, c.BuildContext.Get<string>("HostFxrInstallerFile"), true);
return c.Success();
}
}
}

Просмотреть файл

@ -1,414 +0,0 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Text.RegularExpressions;
using Microsoft.DotNet.Cli.Build.Framework;
using Microsoft.DotNet.InternalAbstractions;
using Newtonsoft.Json.Linq;
using Microsoft.DotNet.Cli.Build;
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
using static Microsoft.DotNet.Cli.Build.FS;
using static Microsoft.DotNet.Cli.Build.Utils;
namespace Microsoft.DotNet.Host.Build
{
public class PrepareTargets
{
[Target(nameof(Init))]
public static BuildTargetResult Prepare(BuildTargetContext c) => c.Success();
[Target(nameof(CheckPrereqCmakePresent), nameof(CheckPlatformDependencies))]
public static BuildTargetResult CheckPrereqs(BuildTargetContext c) => c.Success();
[Target(nameof(CheckCoreclrPlatformDependencies))]
public static BuildTargetResult CheckPlatformDependencies(BuildTargetContext c) => c.Success();
[Target(nameof(CheckUbuntuCoreclrAndCoreFxDependencies), nameof(CheckCentOSCoreclrAndCoreFxDependencies))]
public static BuildTargetResult CheckCoreclrPlatformDependencies(BuildTargetContext c) => c.Success();
// All major targets will depend on this in order to ensure variables are set up right if they are run independently.
// The targets listed below are executed before Init Target is invoked.
[Target(
nameof(CommonInit),
nameof(SetNuGetPackagesDir),
nameof(GenerateVersions),
nameof(CheckPrereqs),
nameof(LocateStage0),
nameof(ExpectedBuildArtifacts),
nameof(RestorePackages),
nameof(PackDotnetDebTool))]
public static BuildTargetResult Init(BuildTargetContext c)
{
string platformEnv = c.BuildContext.Get<string>("Platform");
string targetFramework = Environment.GetEnvironmentVariable("TARGETFRAMEWORK") ?? "netcoreapp2.0";
string crossEnv = Environment.GetEnvironmentVariable("CROSS") ?? "0";
if (string.Equals(crossEnv, "1"))
{
string rootfsDir = Environment.GetEnvironmentVariable("ROOTFS_DIR");
if (string.IsNullOrEmpty(rootfsDir))
{
rootfsDir = Path.Combine(Dirs.RepoRoot, "cross", "rootfs", platformEnv);
Environment.SetEnvironmentVariable("ROOTFS_DIR", rootfsDir);
}
}
c.BuildContext["Channel"] = Environment.GetEnvironmentVariable("CHANNEL");
c.BuildContext["TargetFramework"] = targetFramework;
c.BuildContext["Cross"] = crossEnv;
bool linkPortable = c.BuildContext.Get<bool>("LinkPortable");
string targetRID = c.BuildContext.Get<string>("TargetRID");
c.Info($"Building {c.BuildContext["Configuration"]} to: {Dirs.Output}");
c.Info("Build Environment:");
c.Info($" Operating System: {RuntimeEnvironment.OperatingSystem} {RuntimeEnvironment.OperatingSystemVersion}");
c.Info($" Platform: " + platformEnv);
c.Info($" Cross Build: " + int.Parse(crossEnv));
c.Info($" Portable Linking: " + linkPortable);
c.Info($" TargetRID: " + targetRID);
return c.Success();
}
[Target]
public static BuildTargetResult CommonInit(BuildTargetContext c)
{
string platformEnv = Environment.GetEnvironmentVariable("TARGETPLATFORM") ?? RuntimeEnvironment.RuntimeArchitecture.ToString();
var configEnv = Environment.GetEnvironmentVariable("CONFIGURATION");
if (string.IsNullOrEmpty(configEnv))
{
configEnv = "Debug";
}
c.BuildContext["Configuration"] = configEnv;
string targetRID = Environment.GetEnvironmentVariable("TARGETRID");
string realTargetRID = targetRID;
if (targetRID == null)
{
targetRID = RuntimeEnvironment.GetRuntimeIdentifier();
realTargetRID = targetRID;
// Question: Why do we perform this translation? Utilities (e.g. Dirs.cs) do not account for this.
if (targetRID.StartsWith("win") && (targetRID.EndsWith("x86") || targetRID.EndsWith("x64")))
{
targetRID = $"win7-{RuntimeEnvironment.RuntimeArchitecture}";
}
}
string szLinkPortable = Environment.GetEnvironmentVariable("DOTNET_BUILD_LINK_PORTABLE")?? "0";
bool linkPortable = (int.Parse(szLinkPortable) == 1)?true:false;
if (linkPortable)
{
// Portable build only supports Linux RID
targetRID = $"linux-{platformEnv}";
realTargetRID = targetRID;
// Update/set the TARGETRID environment variable that will be used by various parts of the build
Environment.SetEnvironmentVariable("TARGETRID", targetRID);
}
c.BuildContext["TargetRID"] = targetRID;
// Save the RID that will be used to create the RID specific subfolder under artifacts folder.
// See Dirs.cs for details.
c.BuildContext["ArtifactsTargetRID"] = realTargetRID;
c.BuildContext["LinkPortable"] = linkPortable;
c.BuildContext["Platform"] = platformEnv;
return c.Success();
}
[Target]
public static BuildTargetResult SetNuGetPackagesDir(BuildTargetContext c)
{
Environment.SetEnvironmentVariable("NUGET_PACKAGES", Dirs.NuGetPackages);
return c.Success();
}
[Target]
[BuildPlatforms(BuildPlatform.Ubuntu, BuildPlatform.Debian)]
public static BuildTargetResult PackDotnetDebTool(BuildTargetContext c)
{
var dotnet = DotNetCli.Stage0;
var versionSuffix = c.BuildContext.Get<BuildVersion>("BuildVersion").VersionSuffix;
dotnet.Pack(
Path.Combine(Dirs.RepoRoot, "setuptools", "dotnet-deb-tool", "project.json"),
"--output", Dirs.PackagesIntermediate,
"--version-suffix", versionSuffix)
.Execute()
.EnsureSuccessful();
var packageFiles = Directory.EnumerateFiles(Dirs.PackagesIntermediate, "dotnet-deb-tool.*.nupkg");
foreach (var packageFile in packageFiles)
{
if (!packageFile.EndsWith(".symbols.nupkg"))
{
var destinationPath = Path.Combine(Dirs.Packages, Path.GetFileName(packageFile));
File.Copy(packageFile, destinationPath, overwrite: true);
}
}
return c.Success();
}
[Target]
public static BuildTargetResult GenerateVersions(BuildTargetContext c)
{
var commitCount = GitUtils.GetCommitCount();
var commitHash = GitUtils.GetCommitHash();
var branchInfo = new BranchInfo(Dirs.RepoRoot);
// Read details from branchinfo.txt for our build configuration
int iMajor = int.Parse(branchInfo.Entries["MAJOR_VERSION"]);
int iMinor = int.Parse(branchInfo.Entries["MINOR_VERSION"]);
int iPatch = int.Parse(branchInfo.Entries["PATCH_VERSION"]);
string sReleaseSuffix = branchInfo.Entries["RELEASE_SUFFIX"];
bool fStabilizePackageVersion = bool.Parse(branchInfo.Entries["STABILIZE_PACKAGE_VERSION"]);
bool fLockHostVersion = bool.Parse(branchInfo.Entries["LOCK_HOST_VERSION"]);
var hostVersion = new HostVersion()
{
Major = iMajor,
Minor = iMinor,
Patch = iPatch,
ReleaseSuffix = sReleaseSuffix,
EnsureStableVersion = fStabilizePackageVersion,
IsLocked = fLockHostVersion,
CommitCount = commitCount
};
var buildVersion = new BuildVersion()
{
Major = iMajor,
Minor = iMinor,
Patch = iPatch,
ReleaseSuffix = sReleaseSuffix,
CommitCount = commitCount
};
c.BuildContext["BuildVersion"] = buildVersion;
c.BuildContext["HostVersion"] = hostVersion;
c.BuildContext["CommitHash"] = commitHash;
c.BuildContext["BranchName"] = branchInfo.Entries["BRANCH_NAME"];
// Define the version string to be used based upon whether we are stabilizing the versions or not.
if (!fStabilizePackageVersion)
c.BuildContext["SharedFrameworkNugetVersion"] = buildVersion.NetCoreAppVersion;
else
c.BuildContext["SharedFrameworkNugetVersion"] = buildVersion.ProductionVersion;
c.Info($"Building Version: {hostVersion.LatestHostVersion.WithoutSuffix} (NuGet Packages: {hostVersion.LatestHostVersion})");
c.Info($"From Commit: {commitHash}");
return c.Success();
}
[Target]
public static BuildTargetResult LocateStage0(BuildTargetContext c)
{
// We should have been run in the repo root, so locate the stage 0 relative to current directory
var stage0 = DotNetCli.Stage0.BinPath;
if (!Directory.Exists(stage0))
{
return c.Failed($"Stage 0 directory does not exist: {stage0}");
}
// Identify the version
string versionFile = Directory.GetFiles(stage0, ".version", SearchOption.AllDirectories).FirstOrDefault();
if (string.IsNullOrEmpty(versionFile))
{
throw new Exception($"'.version' file not found in '{stage0}' folder");
}
var version = File.ReadAllLines(versionFile);
c.Info($"Using Stage 0 Version: {version[1]}");
return c.Success();
}
[Target]
public static BuildTargetResult ExpectedBuildArtifacts(BuildTargetContext c)
{
var config = c.BuildContext.Get<string>("Configuration");
var versionBadgeName = $"sharedfx_{Monikers.GetBadgeMoniker(c)}_{config}_version_badge.svg";
c.BuildContext["VersionBadge"] = Path.Combine(Dirs.Output, versionBadgeName);
var sharedFrameworkVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
var hostVersion = c.BuildContext.Get<HostVersion>("HostVersion").LockedHostVersion.ToString();
var hostFxrVersion = c.BuildContext.Get<HostVersion>("HostVersion").LockedHostFxrVersion.ToString();
AddInstallerArtifactToContext(c, "dotnet-host", "SharedHost", hostVersion);
AddInstallerArtifactToContext(c, "dotnet-hostfxr", "HostFxr", hostFxrVersion);
AddInstallerArtifactToContext(c, "dotnet-sharedframework", "SharedFramework", sharedFrameworkVersion);
AddInstallerArtifactToContext(c, "dotnet", "CombinedMuxerHostFxrFramework", sharedFrameworkVersion);
return c.Success();
}
private static void AddInstallerArtifactToContext(
BuildTargetContext c,
string artifactPrefix,
string contextPrefix,
string version)
{
var productName = Monikers.GetProductMoniker(c, artifactPrefix, version);
var extension = CurrentPlatform.IsWindows ? ".zip" : ".tar.gz";
c.BuildContext[contextPrefix + "CompressedFile"] = Path.Combine(Dirs.Packages, productName + extension);
string installer = "";
switch (CurrentPlatform.Current)
{
case BuildPlatform.Windows:
if (contextPrefix.Contains("Combined"))
{
installer = productName + ".exe";
}
else
{
installer = productName + ".msi";
}
break;
case BuildPlatform.OSX:
installer = productName + ".pkg";
break;
case BuildPlatform.Ubuntu:
case BuildPlatform.Debian:
installer = productName + ".deb";
break;
default:
break;
}
if (!string.IsNullOrEmpty(installer))
{
c.BuildContext[contextPrefix + "InstallerFile"] = Path.Combine(Dirs.Packages, installer);
}
}
[Target]
[BuildPlatforms(BuildPlatform.Ubuntu, "14.04")]
public static BuildTargetResult CheckUbuntuCoreclrAndCoreFxDependencies(BuildTargetContext c)
{
var errorMessageBuilder = new StringBuilder();
var stage0 = DotNetCli.Stage0.BinPath;
foreach (var package in PackageDependencies.UbuntuCoreclrAndCoreFxDependencies)
{
if (!AptDependencyUtility.PackageIsInstalled(package))
{
errorMessageBuilder.Append($"Error: Coreclr package dependency {package} missing.");
errorMessageBuilder.Append(Environment.NewLine);
errorMessageBuilder.Append($"-> install with apt-get install {package}");
errorMessageBuilder.Append(Environment.NewLine);
}
}
if (errorMessageBuilder.Length == 0)
{
return c.Success();
}
else
{
return c.Failed(errorMessageBuilder.ToString());
}
}
[Target]
[BuildPlatforms(BuildPlatform.CentOS)]
public static BuildTargetResult CheckCentOSCoreclrAndCoreFxDependencies(BuildTargetContext c)
{
var errorMessageBuilder = new StringBuilder();
foreach (var package in PackageDependencies.CentosCoreclrAndCoreFxDependencies)
{
if (!YumDependencyUtility.PackageIsInstalled(package))
{
errorMessageBuilder.Append($"Error: Coreclr package dependency {package} missing.");
errorMessageBuilder.Append(Environment.NewLine);
errorMessageBuilder.Append($"-> install with yum install {package}");
errorMessageBuilder.Append(Environment.NewLine);
}
}
if (errorMessageBuilder.Length == 0)
{
return c.Success();
}
else
{
return c.Failed(errorMessageBuilder.ToString());
}
}
[Target]
public static BuildTargetResult RestorePackages(BuildTargetContext c)
{
var dotnet = DotNetCli.Stage0;
dotnet.Restore("--verbosity", "verbose", "--disable-parallel")
.WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "setuptools", "dotnet-deb-tool"))
.Execute()
.EnsureSuccessful();
dotnet.Restore("--verbosity", "verbose", "--disable-parallel", "--infer-runtimes")
.WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "setuptools", "independent"))
.Execute()
.EnsureSuccessful();
dotnet.Restore("--verbosity", "verbose", "--disable-parallel")
.WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "src"))
.Execute()
.EnsureSuccessful();
return c.Success();
}
[Target]
public static BuildTargetResult CheckPrereqCmakePresent(BuildTargetContext c)
{
try
{
Command.Create("cmake", "--version")
.CaptureStdOut()
.CaptureStdErr()
.Execute();
}
catch (Exception ex)
{
string message = $@"Error running cmake: {ex.Message}
cmake is required to build the native host 'corehost'";
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
message += Environment.NewLine + "Download it from https://www.cmake.org";
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
message += Environment.NewLine + "Ubuntu: 'sudo apt-get install cmake'";
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
message += Environment.NewLine + "OS X w/Homebrew: 'brew install cmake'";
}
return c.Failed(message);
}
return c.Success();
}
}
}

Просмотреть файл

@ -1,17 +0,0 @@
using Microsoft.DotNet.Cli.Build.Framework;
namespace Microsoft.DotNet.Host.Build
{
public class Program
{
public static int Main(string[] args)
{
DebugHelper.HandleDebugSwitch(ref args);
return BuildSetup.Create(".NET Core Host")
.UseStandardGoals()
.UseAllTargetsFromAssembly<Program>()
.Run(args);
}
}
}

Просмотреть файл

@ -1,478 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Text.RegularExpressions;
using Microsoft.DotNet.Cli.Build.Framework;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Blob;
using Microsoft.DotNet.Cli.Build;
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
namespace Microsoft.DotNet.Host.Build
{
public static class PublishTargets
{
private static AzurePublisher AzurePublisherTool { get; set; }
private static DebRepoPublisher DebRepoPublisherTool { get; set; }
private static string Channel { get; set; }
private static string CommitHash { get; set; }
private static string SharedFrameworkNugetVersion { get; set; }
private static string SharedHostNugetVersion { get; set; }
private static string HostFxrNugetVersion { get; set; }
private static bool IncludeSymbolPackages { get; set; }
[Target]
public static BuildTargetResult InitPublish(BuildTargetContext c)
{
AzurePublisherTool = new AzurePublisher();
DebRepoPublisherTool = new DebRepoPublisher(Dirs.Packages);
SharedFrameworkNugetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
SharedHostNugetVersion = c.BuildContext.Get<HostVersion>("HostVersion").LockedHostVersion.ToString();
HostFxrNugetVersion = c.BuildContext.Get<HostVersion>("HostVersion").LockedHostFxrVersion.ToString();
Channel = c.BuildContext.Get<string>("Channel");
CommitHash = c.BuildContext.Get<string>("CommitHash");
// Do not publish symbol packages on a release branch.
IncludeSymbolPackages = !c.BuildContext.Get<string>("BranchName").StartsWith("release/");
return c.Success();
}
[Target(nameof(PrepareTargets.Init),
nameof(PublishTargets.InitPublish),
nameof(PublishTargets.PublishArtifacts),
nameof(PublishTargets.FinalizeBuild))]
[Environment("PUBLISH_TO_AZURE_BLOB", "1", "true")] // This is set by CI systems
public static BuildTargetResult Publish(BuildTargetContext c)
{
return c.Success();
}
[Target]
[BuildPlatforms(BuildPlatform.Ubuntu, "14.04")]
[BuildArchitectures(BuildArchitecture.x64)]
public static BuildTargetResult PublishDotnetDebToolPackage(BuildTargetContext c)
{
string nugetFeedUrl = EnvVars.EnsureVariable("CLI_NUGET_FEED_URL");
string apiKey = EnvVars.EnsureVariable("CLI_NUGET_API_KEY");
NuGetUtil.PushPackages(Dirs.Packages, nugetFeedUrl, apiKey, IncludeSymbolPackages);
return c.Success();
}
[Target]
public static BuildTargetResult FinalizeBuild(BuildTargetContext c)
{
if (CheckIfAllBuildsHavePublished(c))
{
string targetContainer = $"{Channel}/Binaries/Latest/";
string targetVersionFile = $"{targetContainer}{CommitHash}";
string semaphoreBlob = $"{Channel}/Binaries/sharedFxPublishSemaphore";
AzurePublisherTool.CreateBlobIfNotExists(semaphoreBlob);
string leaseId = AzurePublisherTool.AcquireLeaseOnBlob(semaphoreBlob);
// Prevent race conditions by dropping a version hint of what version this is. If we see this file
// and it is the same as our version then we know that a race happened where two+ builds finished
// at the same time and someone already took care of publishing and we have no work to do.
if (AzurePublisherTool.IsLatestSpecifiedVersion(targetVersionFile))
{
AzurePublisherTool.ReleaseLeaseOnBlob(semaphoreBlob, leaseId);
return c.Success();
}
else
{
Regex versionFileRegex = new Regex(@"(?<CommitHash>[\w\d]{40})");
// Delete old version files
AzurePublisherTool.ListBlobs($"{targetContainer}")
.Select(s => s.Replace("/dotnet/", ""))
.Where(s => versionFileRegex.IsMatch(s))
.ToList()
.ForEach(f => AzurePublisherTool.TryDeleteBlob(f));
// Drop the version file signaling such for any race-condition builds (see above comment).
AzurePublisherTool.DropLatestSpecifiedVersion(targetVersionFile);
}
try
{
// Copy the shared framework + host Archives
CopyBlobs($"{Channel}/Binaries/{SharedFrameworkNugetVersion}/", targetContainer);
// Copy the shared framework installers
CopyBlobs($"{Channel}/Installers/{SharedFrameworkNugetVersion}/", $"{Channel}/Installers/Latest/");
// Copy the shared host installers
CopyBlobs($"{Channel}/Installers/{SharedHostNugetVersion}/", $"{Channel}/Installers/Latest/");
// Generate the Sharedfx Version text files
List<string> versionFiles = new List<string>()
{
"win.x86.version",
"win.x64.version",
"win.arm.version",
"win.arm64.version",
"linux.x64.version",
"ubuntu.x64.version",
"ubuntu.arm.version",
"ubuntu.16.04.x64.version",
"ubuntu.16.04.arm.version",
"ubuntu.16.10.x64.version",
"rhel.x64.version",
"osx.x64.version",
"debian.8.armel.version",
"debian.x64.version",
"centos.x64.version",
"fedora.23.x64.version",
"fedora.24.x64.version",
"opensuse.42.1.x64.version"
};
PublishCoreHostPackagesToFeed();
string sfxVersion = Utils.GetSharedFrameworkVersionFileContent(c);
foreach (string version in versionFiles)
{
AzurePublisherTool.PublishStringToBlob($"{Channel}/dnvm/latest.sharedfx.{version}", sfxVersion);
}
}
finally
{
AzurePublisherTool.ReleaseLeaseOnBlob(semaphoreBlob, leaseId);
}
}
return c.Success();
}
private static void CopyBlobs(string sourceFolder, string destinationFolder)
{
foreach (string blob in AzurePublisherTool.ListBlobs(sourceFolder))
{
string source = blob.Replace("/dotnet/", "");
string targetName = Path.GetFileName(blob)
.Replace(SharedFrameworkNugetVersion, "latest")
.Replace(SharedHostNugetVersion, "latest");
string target = $"{destinationFolder}{targetName}";
AzurePublisherTool.CopyBlob(source, target);
}
}
private static void PublishCoreHostPackagesToFeed()
{
var hostBlob = $"{Channel}/Binaries/{SharedFrameworkNugetVersion}";
Directory.CreateDirectory(Dirs.PackagesNoRID);
AzurePublisherTool.DownloadFilesWithExtension(hostBlob, ".nupkg", Dirs.PackagesNoRID);
string nugetFeedUrl = EnvVars.EnsureVariable("NUGET_FEED_URL");
string apiKey = EnvVars.EnsureVariable("NUGET_API_KEY");
NuGetUtil.PushPackages(Dirs.PackagesNoRID, nugetFeedUrl, apiKey, IncludeSymbolPackages);
string githubAuthToken = EnvVars.EnsureVariable("GITHUB_PASSWORD");
VersionRepoUpdater repoUpdater = new VersionRepoUpdater(githubAuthToken);
repoUpdater.UpdatePublishedVersions(Dirs.PackagesNoRID, $"build-info/dotnet/core-setup/{Channel}/Latest").Wait();
}
private static bool CheckIfAllBuildsHavePublished(BuildTargetContext c)
{
Dictionary<string, bool> badges = new Dictionary<string, bool>()
{
{ "sharedfx_Windows_x86", false },
{ "sharedfx_Windows_x64", false },
{ "sharedfx_Windows_arm", false },
{ "sharedfx_Windows_arm64", false },
{ "sharedfx_Linux_x64", false },
{ "sharedfx_Ubuntu_x64", false },
{ "sharedfx_Ubuntu_arm", false },
{ "sharedfx_Ubuntu_16_04_x64", false },
{ "sharedfx_Ubuntu_16_04_arm", false },
{ "sharedfx_Ubuntu_16_10_x64", false },
{ "sharedfx_RHEL_x64", false },
{ "sharedfx_OSX_x64", false },
// { "sharedfx_Debian_8_armel", false },
{ "sharedfx_Debian_x64", false },
{ "sharedfx_CentOS_x64", false },
{ "sharedfx_Fedora_23_x64", false },
{ "sharedfx_Fedora_24_x64", false },
{ "sharedfx_openSUSE_42_1_x64", false }
};
List<string> blobs = new List<string>(AzurePublisherTool.ListBlobs($"{Channel}/Binaries/{SharedFrameworkNugetVersion}/"));
var versionBadgeName = $"sharedfx_{Monikers.GetBadgeMoniker(c)}";
if (badges.ContainsKey(versionBadgeName) == false)
{
throw new ArgumentException($"A new OS build ({versionBadgeName}) was added without adding the moniker to the {nameof(badges)} lookup");
}
foreach (string file in blobs)
{
string name = Path.GetFileName(file);
if (!name.EndsWith(".svg"))
{
continue;
}
// Include _ delimiter when matching to prevent finding both arm and arm64 badges
// when checking the arm badge file.
string[] matchingBadgeKeys = badges.Keys
.Where(badgeName => name.StartsWith($"{badgeName}_"))
.ToArray();
if (matchingBadgeKeys.Length == 1)
{
badges[matchingBadgeKeys[0]] = true;
}
else if (matchingBadgeKeys.Length > 1)
{
throw new BuildFailureException(
$"Expected 0 or 1 badges matching file '{name}', " +
$"found {matchingBadgeKeys.Length}: " +
string.Join(", ", matchingBadgeKeys));
}
}
foreach (string unfinishedBadge in badges.Where(pair => !pair.Value).Select(pair => pair.Key))
{
Console.WriteLine($"Not all builds complete, badge not found: {unfinishedBadge}");
}
return badges.Keys.All(key => badges[key]);
}
[Target(
nameof(PublishTargets.PublishInstallerFilesToAzure),
nameof(PublishTargets.PublishArchivesToAzure),
nameof(PublishTargets.PublishDotnetDebToolPackage),
nameof(PublishTargets.PublishDebFilesToDebianRepo),
nameof(PublishTargets.PublishCoreHostPackages),
nameof(PublishTargets.PublishManagedPackages),
nameof(PublishTargets.PublishSharedFrameworkVersionBadge))]
public static BuildTargetResult PublishArtifacts(BuildTargetContext c) => c.Success();
[Target(
nameof(PublishTargets.PublishSharedHostInstallerFileToAzure),
nameof(PublishTargets.PublishHostFxrInstallerFileToAzure),
nameof(PublishTargets.PublishSharedFrameworkInstallerFileToAzure),
nameof(PublishTargets.PublishCombinedMuxerHostFxrFrameworkInstallerFileToAzure))]
[BuildPlatforms(BuildPlatform.Ubuntu, BuildPlatform.OSX, BuildPlatform.Windows, BuildPlatform.Debian)]
// We do not spport publishing platform installers for any other architecture on any supported platform
// yet.
[BuildArchitectures(BuildArchitecture.x64,BuildArchitecture.x86)]
public static BuildTargetResult PublishInstallerFilesToAzure(BuildTargetContext c) => c.Success();
[Target(
nameof(PublishTargets.PublishHostFxrArchiveToAzure),
nameof(PublishTargets.PublishSharedFrameworkArchiveToAzure),
nameof(PublishTargets.PublishCombinedMuxerHostFxrFrameworkArchiveToAzure))]
public static BuildTargetResult PublishArchivesToAzure(BuildTargetContext c) => c.Success();
[Target(
nameof(PublishSharedFrameworkDebToDebianRepo),
nameof(PublishHostFxrDebToDebianRepo),
nameof(PublishSharedHostDebToDebianRepo))]
[BuildPlatforms(BuildPlatform.Ubuntu, BuildPlatform.Debian)]
// We do not spport publishing platform installers for any other architecture on any supported platform
// yet.
[BuildArchitectures(BuildArchitecture.x64)]
public static BuildTargetResult PublishDebFilesToDebianRepo(BuildTargetContext c)
{
return c.Success();
}
[Target]
public static BuildTargetResult PublishSharedFrameworkVersionBadge(BuildTargetContext c)
{
var versionBadge = c.BuildContext.Get<string>("VersionBadge");
var versionBadgeBlob = $"{Channel}/Binaries/{SharedFrameworkNugetVersion}/{Path.GetFileName(versionBadge)}";
AzurePublisherTool.PublishFile(versionBadgeBlob, versionBadge);
return c.Success();
}
[Target]
public static BuildTargetResult PublishCoreHostPackages(BuildTargetContext c)
{
foreach (var file in Directory.GetFiles(Dirs.CorehostLocalPackages, "*.nupkg"))
{
var hostBlob = $"{Channel}/Binaries/{SharedFrameworkNugetVersion}/{Path.GetFileName(file)}";
AzurePublisherTool.PublishFile(hostBlob, file);
Console.WriteLine($"Publishing package {hostBlob} to Azure.");
}
return c.Success();
}
[Target]
public static BuildTargetResult PublishManagedPackages(BuildTargetContext c)
{
// When building on non windows platforms, we don't compile the full set of
// tfms a package targets (to prevent the need of having mono and the reference
// assemblies installed. So we shouldn't publish these packages.
if (EnvVars.Signed && CurrentPlatform.IsWindows)
{
foreach (var file in Directory.GetFiles(Dirs.Packages, "*.nupkg"))
{
var hostBlob = $"{Channel}/Binaries/{SharedFrameworkNugetVersion}/{Path.GetFileName(file)}";
AzurePublisherTool.PublishFile(hostBlob, file);
Console.WriteLine($"Publishing package {hostBlob} to Azure.");
}
}
return c.Success();
}
[Target]
public static BuildTargetResult PublishSharedHostInstallerFileToAzure(BuildTargetContext c)
{
var version = SharedHostNugetVersion;
var installerFile = c.BuildContext.Get<string>("SharedHostInstallerFile");
if (CurrentPlatform.Current == BuildPlatform.Windows)
{
installerFile = Path.ChangeExtension(installerFile, "msi");
}
AzurePublisherTool.PublishInstallerFile(installerFile, Channel, version);
return c.Success();
}
[Target]
public static BuildTargetResult PublishHostFxrInstallerFileToAzure(BuildTargetContext c)
{
var version = HostFxrNugetVersion;
var installerFile = c.BuildContext.Get<string>("HostFxrInstallerFile");
if (CurrentPlatform.Current == BuildPlatform.Windows)
{
installerFile = Path.ChangeExtension(installerFile, "msi");
}
AzurePublisherTool.PublishInstallerFile(installerFile, Channel, version);
return c.Success();
}
[Target]
public static BuildTargetResult PublishSharedFrameworkInstallerFileToAzure(BuildTargetContext c)
{
var version = SharedFrameworkNugetVersion;
var installerFile = c.BuildContext.Get<string>("SharedFrameworkInstallerFile");
AzurePublisherTool.PublishInstallerFile(installerFile, Channel, version);
return c.Success();
}
[Target]
[BuildPlatforms(BuildPlatform.OSX, BuildPlatform.Windows)]
public static BuildTargetResult PublishCombinedMuxerHostFxrFrameworkInstallerFileToAzure(BuildTargetContext c)
{
var version = SharedFrameworkNugetVersion;
var installerFile = c.BuildContext.Get<string>("CombinedMuxerHostFxrFrameworkInstallerFile");
AzurePublisherTool.PublishInstallerFile(installerFile, Channel, version);
return c.Success();
}
[Target]
public static BuildTargetResult PublishCombinedMuxerHostFxrFrameworkArchiveToAzure(BuildTargetContext c)
{
var version = SharedFrameworkNugetVersion;
var archiveFile = c.BuildContext.Get<string>("CombinedMuxerHostFxrFrameworkCompressedFile");
AzurePublisherTool.PublishArchive(archiveFile, Channel, version);
return c.Success();
}
[Target]
public static BuildTargetResult PublishHostFxrArchiveToAzure(BuildTargetContext c)
{
var version = SharedFrameworkNugetVersion;
var archiveFile = c.BuildContext.Get<string>("HostFxrCompressedFile");
AzurePublisherTool.PublishArchive(archiveFile, Channel, version);
return c.Success();
}
[Target]
public static BuildTargetResult PublishSharedFrameworkArchiveToAzure(BuildTargetContext c)
{
var version = SharedFrameworkNugetVersion;
var archiveFile = c.BuildContext.Get<string>("SharedFrameworkCompressedFile");
AzurePublisherTool.PublishArchive(archiveFile, Channel, version);
return c.Success();
}
[Target]
[BuildPlatforms(BuildPlatform.Ubuntu, BuildPlatform.Debian)]
public static BuildTargetResult PublishSharedFrameworkDebToDebianRepo(BuildTargetContext c)
{
var version = SharedFrameworkNugetVersion;
var packageName = Monikers.GetDebianSharedFrameworkPackageName(version);
var installerFile = c.BuildContext.Get<string>("SharedFrameworkInstallerFile");
var uploadUrl = AzurePublisherTool.CalculateInstallerUploadUrl(installerFile, Channel, version);
DebRepoPublisherTool.PublishDebFileToDebianRepo(
packageName,
version,
uploadUrl);
return c.Success();
}
[Target]
[BuildPlatforms(BuildPlatform.Ubuntu, BuildPlatform.Debian)]
public static BuildTargetResult PublishSharedHostDebToDebianRepo(BuildTargetContext c)
{
var version = SharedHostNugetVersion;
var packageName = Monikers.GetDebianSharedHostPackageName(c);
var installerFile = c.BuildContext.Get<string>("SharedHostInstallerFile");
var uploadUrl = AzurePublisherTool.CalculateInstallerUploadUrl(installerFile, Channel, version);
DebRepoPublisherTool.PublishDebFileToDebianRepo(
packageName,
version,
uploadUrl);
return c.Success();
}
[Target]
[BuildPlatforms(BuildPlatform.Ubuntu, BuildPlatform.Debian)]
public static BuildTargetResult PublishHostFxrDebToDebianRepo(BuildTargetContext c)
{
var version = HostFxrNugetVersion;
var packageName = Monikers.GetDebianHostFxrPackageName(version);
var installerFile = c.BuildContext.Get<string>("HostFxrInstallerFile");
var uploadUrl = AzurePublisherTool.CalculateInstallerUploadUrl(installerFile, Channel, version);
DebRepoPublisherTool.PublishDebFileToDebianRepo(
packageName,
version,
uploadUrl);
return c.Success();
}
}
}

Просмотреть файл

@ -1,75 +0,0 @@
using System.IO;
using System.Text;
using Microsoft.DotNet.Cli.Build;
namespace Microsoft.DotNet.Host.Build
{
public class StubPackageBuilder
{
private DotNetCli _dotnet;
private string _intermediateDirectory;
private string _outputDirectory;
private bool _dummyFileCreated;
public StubPackageBuilder(DotNetCli dotnet, string intermediateDirectory, string outputDirectory)
{
_dotnet = dotnet;
_intermediateDirectory = intermediateDirectory;
_outputDirectory = outputDirectory;
}
public void GeneratePackage(string packageId, string version)
{
if (!_dummyFileCreated)
{
CreateDummyFile(_dotnet, _intermediateDirectory);
}
CreateStubPackage(_dotnet, packageId, version, _intermediateDirectory, _outputDirectory);
}
private void CreateDummyFile(DotNetCli dotnet, string intermediateDirectory)
{
var dummyTxt = "dummy text";
var tempPjDirectory = Path.Combine(intermediateDirectory, "dummyNuGetPackageIntermediate");
FS.Rmdir(tempPjDirectory);
Directory.CreateDirectory(tempPjDirectory);
var dummyTextFile = Path.Combine(tempPjDirectory, "dummy.txt");
File.WriteAllText(dummyTextFile, dummyTxt);
_dummyFileCreated = true;
}
private static void CreateStubPackage(DotNetCli dotnet,
string packageId,
string version,
string intermediateDirectory,
string outputDirectory)
{
var projectJson = new StringBuilder();
projectJson.Append("{");
projectJson.Append($" \"version\": \"{version}\",");
projectJson.Append($" \"name\": \"{packageId}\",");
projectJson.Append(" \"packOptions\": { \"files\": { \"include\": \"dummy.txt\" } },");
projectJson.Append(" \"frameworks\": { \"netcoreapp1.0\": { } },");
projectJson.Append("}");
var tempPjDirectory = Path.Combine(intermediateDirectory, "dummyNuGetPackageIntermediate");
var tempPjFile = Path.Combine(tempPjDirectory, "project.json");
File.WriteAllText(tempPjFile, projectJson.ToString());
dotnet.Pack(
tempPjFile, "--no-build",
"--output", outputDirectory)
.WorkingDirectory(tempPjDirectory)
.Execute()
.EnsureSuccessful();
}
}
}

Просмотреть файл

@ -1,152 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using Microsoft.DotNet.Cli.Build.Framework;
using static Microsoft.DotNet.Cli.Build.FS;
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
using static Microsoft.DotNet.Cli.Build.Utils;
using Microsoft.DotNet.Cli.Build;
namespace Microsoft.DotNet.Host.Build
{
public class TestTargets
{
public static readonly string[] TestProjects = new[]
{
"HostActivationTests",
"Microsoft.Extensions.DependencyModel.Tests"
};
[Target(
nameof(PrepareTargets.Init),
nameof(RestoreTestAssets),
nameof(RestoreTests),
nameof(BuildTests),
nameof(RunTests))]
[Environment("DOTNET_BUILD_SKIP_TESTS", null, "0", "false")]
public static BuildTargetResult Test(BuildTargetContext c) => c.Success();
[Target]
public static BuildTargetResult RestoreTestAssets(BuildTargetContext c)
{
var dotnet = DotNetCli.Stage0;
CleanBinObj(c, Path.Combine(Dirs.RepoRoot, "TestAssets"));
dotnet.Restore(
"--fallbacksource", Dirs.CorehostLocalPackages,
"--fallbacksource", Dirs.CorehostDummyPackages,
"--disable-parallel")
.WorkingDirectory(Path.Combine(Dirs.RepoRoot, "TestAssets"))
.Execute()
.EnsureSuccessful();
return c.Success();
}
[Target]
public static BuildTargetResult RestoreTests(BuildTargetContext c)
{
var dotnet = DotNetCli.Stage0;
CleanBinObj(c, Path.Combine(Dirs.RepoRoot, "test"));
dotnet.Restore("--disable-parallel")
.WorkingDirectory(Path.Combine(Dirs.RepoRoot, "test"))
.Execute()
.EnsureSuccessful();
return c.Success();
}
[Target]
public static BuildTargetResult BuildTests(BuildTargetContext c)
{
var dotnet = DotNetCli.Stage0;
var configuration = c.BuildContext.Get<string>("Configuration");
foreach (var testProject in TestProjects)
{
c.Info($"Building tests: {testProject}");
dotnet.Build("--configuration", configuration)
.WorkingDirectory(Path.Combine(Dirs.RepoRoot, "test", testProject))
.Execute()
.EnsureSuccessful();
}
return c.Success();
}
[Target]
public static BuildTargetResult RunTests(BuildTargetContext c)
{
var dotnet = DotNetCli.Stage0;
var configuration = c.BuildContext.Get<string>("Configuration");
var failingTests = RunDotnetTestOnTestProjects(c, dotnet, configuration);
if (failingTests.Any())
{
foreach (var project in failingTests)
{
c.Error($"{project} failed");
}
return c.Failed("Tests failed!");
}
return c.Success();
}
private static bool IsCrossArch(string rid) {
if (!String.IsNullOrEmpty(rid))
{
return (String.Compare(rid, "win8-arm", true) == 0)
|| (String.Compare(rid, "win10-arm64", true) == 0)
|| (String.Compare(rid, "ubuntu.14.04-arm", true) == 0)
|| (String.Compare(rid, "ubuntu.16.04-arm", true) == 0)
|| (rid.EndsWith("-armel"));
}
return false;
}
private static List<string> RunDotnetTestOnTestProjects(BuildTargetContext c, DotNetCli dotnet, string configuration)
{
var failingTests = new List<string>();
// Fetch the target RID to determine if we support running tests or not.
string rid = c.BuildContext.Get<string>("TargetRID");
bool fIsCrossArch = IsCrossArch(rid); // We dont support running native tests for cross-architecture builds yet.
foreach (var project in TestProjects)
{
// Explicitly checking for the host tests since they are the only ones running native code.
if (String.Compare("HostActivationTests", project) == 0)
{
if (fIsCrossArch)
{
c.Info($"Skipping tests in: {project} since cross-arch test runs are not yet supported for {rid}.");
continue;
}
}
c.Info($"Running tests in: {project}");
string actualTargetRid = c.BuildContext.Get<string>("ArtifactsTargetRID");
var result = dotnet.Test("--configuration", configuration, "-xml", $"{project}-testResults.xml", "-notrait", "category=failing")
.WorkingDirectory(Path.Combine(Dirs.RepoRoot, "test", project))
.EnvironmentVariable("PATH", $"{dotnet.BinPath}{Path.PathSeparator}{Environment.GetEnvironmentVariable("PATH")}")
.EnvironmentVariable("TEST_ARTIFACTS", Dirs.TestArtifacts)
.EnvironmentVariable("TEST_TARGETRID", actualTargetRid)
.Execute();
if (result.ExitCode != 0)
{
failingTests.Add(project);
}
}
return failingTests;
}
}
}

Просмотреть файл

@ -1,133 +0,0 @@
#
# Copyright (c) .NET Foundation and contributors. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
#
param(
[string]$Configuration="Debug",
[string]$Architecture="x64",
[string]$TargetArch="",
[string]$ToolsetDir="",
[string]$Framework="netcoreapp2.0",
[string[]]$Targets=@("Default"),
[string[]]$EnvVars=@(),
[switch]$NoPackage,
[switch]$Help)
if($Help)
{
Write-Host "Usage: .\build.ps1 [-Configuration <CONFIGURATION>] [-NoPackage] [-Help] [-Targets <TARGETS...>]"
Write-Host ""
Write-Host "Options:"
Write-Host " -Configuration <CONFIGURATION> Build the specified Configuration (Debug or Release, default: Debug)"
Write-Host " -Architecture <ARCHITECTURE> Build on the specified architecture (x64 or x86 (supported only on Windows), default: x64)"
Write-Host " -TargetArch <ARCHITECTURE> Build for the specified architecture (x64, x86 (supported only on Windows), arm, or arm64, default: x64)"
Write-Host " -ToolsetDir <TOOLSETDIR> Temporary variable specifying a path to a toolset to use when building the native host for ARM64. To be removed when the toolset is publicly available. )"
Write-Host " -Framework <FRAMEWORK> Build the specified framework (netcoreapp1.0 or netcoreapp1.1, default: netcoreapp1.0)"
Write-Host " -Targets <TARGETS...> Comma separated build targets to run (Init, Compile, Publish, etc.; Default is a full build and publish)"
Write-Host " -EnvVars <'V1=val1','V2=val2'...> Comma separated list of environment variable name-value pairs"
Write-Host " -NoPackage Skip packaging targets"
Write-Host " -Help Display this help message"
exit 0
}
$env:CONFIGURATION = $Configuration;
if (!$TargetArch)
{
$TargetArch = $Architecture
}
$env:TARGETPLATFORM = $TargetArch;
$env:TARGETFRAMEWORK = $Framework;
$RepoRoot = "$PSScriptRoot\..\.."
$env:NUGET_PACKAGES = "$RepoRoot\.nuget\packages"
if($TargetArch -eq "arm64")
{
if ($Framework -eq "netcoreapp1.0")
{
throw "ARM64 is not available on netcoreapp1.0. Pass in '-Framework netcoreapp1.1' to enable ARM64"
}
$env:__ToolsetDir = $ToolsetDir;
$env:TARGETRID = "win10-arm64";
$env:PATH="$ToolsetDir\VC_sdk\bin;$env:PATH";
$env:LIB="$ToolsetDir\VC_sdk\lib\arm64;$ToolsetDir\sdpublic\sdk\lib\arm64";
$env:INCLUDE="$ToolsetDir\VC_sdk\inc;$ToolsetDir\sdpublic\sdk\inc;$ToolsetDir\sdpublic\shared\inc;$ToolsetDir\sdpublic\shared\inc\minwin;$ToolsetDir\sdpublic\sdk\inc\ucrt;$ToolsetDir\sdpublic\sdk\inc\minwin;$ToolsetDir\sdpublic\sdk\inc\mincore;$ToolsetDir\sdpublic\sdk\inc\abi;$ToolsetDir\sdpublic\sdk\inc\clientcore;$ToolsetDir\diasdk\include";
}
# No use in specifying a RID if the current and target architecture are equivalent.
if($TargetArch -eq "x86" -and $Architecture -ne "x86")
{
$env:TARGETRID = "win7-x86";
}
if($TargetArch -eq "x64" -and $Architecture -ne "x64")
{
$env:TARGETRID = "win7-x64";
}
if($TargetArch -eq "arm")
{
$env:TARGETRID = "win8-arm";
}
if($NoPackage)
{
$env:DOTNET_BUILD_SKIP_PACKAGING=1
}
else
{
$env:DOTNET_BUILD_SKIP_PACKAGING=0
}
# Load Branch Info
cat "$RepoRoot\branchinfo.txt" | ForEach-Object {
if(!$_.StartsWith("#") -and ![String]::IsNullOrWhiteSpace($_)) {
$splat = $_.Split([char[]]@("="), 2)
Set-Content "env:\$($splat[0])" -Value $splat[1]
}
}
# Use a repo-local install directory (but not the artifacts directory because that gets cleaned a lot
if (!$env:DOTNET_INSTALL_DIR)
{
$env:DOTNET_INSTALL_DIR="$RepoRoot\.dotnet_stage0\Windows\$Architecture"
}
if (!(Test-Path $env:DOTNET_INSTALL_DIR))
{
mkdir $env:DOTNET_INSTALL_DIR | Out-Null
}
if (!(Test-Path "$RepoRoot\artifacts"))
{
mkdir "$RepoRoot\artifacts" | Out-Null
}
# Install a stage 0
$DOTNET_INSTALL_SCRIPT_URL="https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/dotnet-install.ps1"
Invoke-WebRequest $DOTNET_INSTALL_SCRIPT_URL -OutFile "$RepoRoot\artifacts\dotnet-install.ps1"
& "$RepoRoot\artifacts\dotnet-install.ps1" -Version 1.0.0-preview3-003886 -Architecture $Architecture -Verbose
if($LASTEXITCODE -ne 0) { throw "Failed to install stage0" }
# Put the stage0 on the path
$env:PATH = "$env:DOTNET_INSTALL_DIR;$env:PATH"
# Disable first run since we want to control all package sources
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
# Restore the build scripts
Write-Host "Restoring Build Script projects..."
pushd "$PSScriptRoot\.."
dotnet restore --infer-runtimes
if($LASTEXITCODE -ne 0) { throw "Failed to restore" }
popd
# Publish the builder
Write-Host "Compiling Build Scripts..."
dotnet publish "$PSScriptRoot" -o "$PSScriptRoot\bin" --framework netcoreapp1.0
if($LASTEXITCODE -ne 0) { throw "Failed to compile build scripts" }
# Run the builder
Write-Host "Invoking Build Scripts..."
Write-Host " Configuration: $env:CONFIGURATION"
& "$PSScriptRoot\bin\dotnet-host-build.exe" -t @Targets -e @EnvVars
if($LASTEXITCODE -ne 0) { throw "Build failed" }

Просмотреть файл

@ -1,183 +0,0 @@
#!/usr/bin/env bash
#
# Copyright (c) .NET Foundation and contributors. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
#
set -e
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
OLDPATH="$PATH"
REPOROOT="$DIR/../.."
source "$REPOROOT/scripts/common/_prettyprint.sh"
__BuildDriverOnly=0
# Use uname to determine what the OS is.
OSName=$(uname -s)
case $OSName in
Linux)
__BuildOS=Linux
__HostOS=Linux
;;
Darwin)
__BuildOS=OSX
__HostOS=OSX
;;
FreeBSD)
__BuildOS=FreeBSD
__HostOS=FreeBSD
;;
OpenBSD)
__BuildOS=OpenBSD
__HostOS=OpenBSD
;;
NetBSD)
__BuildOS=NetBSD
__HostOS=NetBSD
;;
SunOS)
__BuildOS=SunOS
__HostOS=SunOS
;;
*)
echo "Unsupported OS $OSName detected, configuring as if for Linux"
__BuildOS=Linux
__HostOS=Linux
;;
esac
while [[ $# > 0 ]]; do
lowerI="$(echo $1 | awk '{print tolower($0)}')"
case $lowerI in
-c|--configuration)
export CONFIGURATION=$2
shift
;;
--targets)
IFS=',' read -r -a targets <<< $2
shift
;;
--env-vars)
IFS=',' read -r -a envVars <<< $2
shift
;;
--skiptests)
export DOTNET_BUILD_SKIP_TESTS=1
;;
--nopackage)
export DOTNET_BUILD_SKIP_PACKAGING=1
;;
--portablelinux)
if [ "$__BuildOS" == "Linux" ]; then
export DOTNET_BUILD_LINK_PORTABLE=1
else
echo "ERROR: portableLinux not supported for non-Linux platforms."
exit 1
fi
;;
--skip-prereqs)
# Allow CI to disable prereqs check since the CI has the pre-reqs but not ldconfig it seems
export DOTNET_INSTALL_SKIP_PREREQS=1
;;
--skip-deb-package-build)
export DOTNET_BUILD_SKIP_DEB_PACKAGING=1
;;
--build-driver-only)
__BuildDriverOnly=1
;;
--verbose)
export DOTNET_BUILD_VERBOSE=1
;;
--help)
echo "Usage: $0 [--configuration <CONFIGURATION>] [--skip-prereqs] [--nopackage] [--docker <IMAGENAME>] [--help] [--targets <TARGETS...>]"
echo ""
echo "Options:"
echo " --configuration <CONFIGURATION> Build the specified Configuration (Debug or Release, default: Debug)"
echo " --targets <TARGETS...> Comma separated build targets to run (Init, Compile, Publish, etc.; Default is a full build and publish)"
echo " --env-vars <'V1=val1','V2=val2'...> Comma separated list of environment variables"
echo " --nopackage Skip packaging targets"
echo " --skip-prereqs Skip checks for pre-reqs in dotnet_install"
echo " --build-driver-only Just build dotnet-host-build binary"
echo " --portableLinux Optional argument to build native libraries portable over GLIBC based Linux distros."
echo " --docker <IMAGENAME> Build in Docker using the Dockerfile located in scripts/docker/IMAGENAME"
echo " --help Display this help message"
echo " <TARGETS...> The build targets to run (Init, Compile, Publish, etc.; Default is a full build and publish)"
exit 0
;;
*)
break
;;
esac
shift
done
# Set nuget package cache under the repo
export NUGET_PACKAGES="$REPOROOT/.nuget/packages"
# Load Branch Info
while read line; do
if [[ $line != \#* ]]; then
IFS='=' read -ra splat <<< "$line"
export ${splat[0]}="${splat[1]}"
fi
done < "$REPOROOT/branchinfo.txt"
# Use a repo-local install directory (but not the artifacts directory because that gets cleaned a lot
[ -z "$DOTNET_INSTALL_DIR" ] && export DOTNET_INSTALL_DIR=$REPOROOT/.dotnet_stage0/$(uname)
[ -d "$DOTNET_INSTALL_DIR" ] || mkdir -p $DOTNET_INSTALL_DIR
DOTNET_INSTALL_SCRIPT_URL="https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/dotnet-install.sh"
curl -sSL "$DOTNET_INSTALL_SCRIPT_URL" | bash /dev/stdin --version 1.0.0-preview3-003886 --verbose
# Put stage 0 on the PATH (for this shell only)
PATH="$DOTNET_INSTALL_DIR:$PATH"
# Increases the file descriptors limit for this bash. It prevents an issue we were hitting during restore
FILE_DESCRIPTOR_LIMIT=$( ulimit -n )
if [ $FILE_DESCRIPTOR_LIMIT -lt 1024 ]
then
echo "Increasing file description limit to 1024"
ulimit -n 1024
fi
# Disable first run since we want to control all package sources
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
# Restore the build scripts
echo "Restoring Build Script projects..."
(
cd "$DIR/.."
dotnet restore --infer-runtimes --disable-parallel
)
# Build the builder
echo "Compiling Build Scripts..."
dotnet publish "$DIR" -o "$DIR/bin" --framework netcoreapp1.0
if [ $__BuildDriverOnly == 1 ]; then
echo "Skipping invoking build scripts."
exit 0
fi
export PATH="$OLDPATH"
# Run the builder
echo "Invoking Build Scripts..."
echo "Configuration: $CONFIGURATION"
$DIR/bin/dotnet-host-build -t ${targets[@]} -e ${envVars[@]}
exit $?

Просмотреть файл

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>1dbb7542-0345-4f4b-a84b-3b00b185d416</ProjectGuid>
<RootNamespace>Microsoft.DotNet.Cli.Build</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin</OutputPath>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>

Просмотреть файл

@ -1,32 +0,0 @@
{
"version": "1.0.0-*",
"description": "Build scripts for dotnet-cli",
"buildOptions": {
"emitEntryPoint": true
},
"dependencies": {
"NETStandard.Library": "1.6.1-beta-24506-02",
"Microsoft.NETCore.Runtime.CoreCLR": "1.1.0-beta-24507-05",
"Microsoft.CSharp": "4.0.1",
"System.Dynamic.Runtime": "4.0.11",
"System.Reflection.Metadata": "1.3.0",
"System.Runtime.Serialization.Primitives": "4.1.1",
"System.Xml.XmlSerializer": "4.0.11",
"WindowsAzure.Storage": "6.2.2-preview",
"NuGet.CommandLine.XPlat": "4.0.0-rc3-2140",
"Microsoft.DotNet.Cli.Build.Framework": {
"target": "project"
},
"shared-build-targets-utils": {
"target": "project"
}
},
"frameworks": {
"netcoreapp1.0": {
"imports": [
"dnxcore50",
"portable-net45+win8"
]
}
}
}

Просмотреть файл

@ -1,13 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Microsoft.DotNet.Cli.Build
{
public class DependencyVersions
{
public static readonly string CoreCLRVersion = "2.0.0-beta-25110-03";
public static readonly string JitVersion = "2.0.0-beta-25110-03";
}
}

Просмотреть файл

@ -1,15 +0,0 @@
using Microsoft.DotNet.Cli.Build.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Microsoft.DotNet.Cli.Build
{
public class HostArtifactNames
{
public static string DotnetHostBaseName => $"dotnet{Constants.ExeSuffix}";
public static string DotnetHostFxrBaseName => $"{Constants.DynamicLibPrefix}hostfxr{Constants.DynamicLibSuffix}";
public static string HostPolicyBaseName => $"{Constants.DynamicLibPrefix}hostpolicy{Constants.DynamicLibSuffix}";
}
}

Просмотреть файл

@ -1,95 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Microsoft.DotNet.Cli.Build
{
public class PackageDependencies
{
public static string[] DebianPackageBuildDependencies
{
get
{
return new string[]
{
"devscripts",
"debhelper",
"build-essential"
};
}
}
public static string[] UbuntuCoreclrAndCoreFxDependencies
{
get
{
return new string[]
{
"libc6",
"libedit2",
"libffi6",
"libgcc1",
"libicu52",
"liblldb-3.6",
"libllvm3.6",
"liblttng-ust0",
"liblzma5",
"libncurses5",
"libpython2.7",
"libstdc++6",
"libtinfo5",
"libunwind8",
"liburcu1",
"libuuid1",
"zlib1g",
"libasn1-8-heimdal",
"libcomerr2",
"libcurl3",
"libgcrypt11",
"libgnutls26",
"libgpg-error0",
"libgssapi3-heimdal",
"libgssapi-krb5-2",
"libhcrypto4-heimdal",
"libheimbase1-heimdal",
"libheimntlm0-heimdal",
"libhx509-5-heimdal",
"libidn11",
"libk5crypto3",
"libkeyutils1",
"libkrb5-26-heimdal",
"libkrb5-3",
"libkrb5support0",
"libldap-2.4-2",
"libp11-kit0",
"libroken18-heimdal",
"librtmp0",
"libsasl2-2",
"libsqlite3-0",
"libssl1.0.0",
"libtasn1-6",
"libwind0-heimdal"
};
}
}
public static string[] CentosCoreclrAndCoreFxDependencies
{
get
{
return new string[]
{
"libunwind",
"gettext",
"libcurl-devel",
"openssl-devel",
"zlib",
"libicu-devel"
};
}
}
}
}

Просмотреть файл

@ -1,323 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Diagnostics;
using System.Threading;
using Microsoft.DotNet.Cli.Build.Framework;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Blob;
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
using System.Threading.Tasks;
namespace Microsoft.DotNet.Cli.Build
{
public class AzurePublisher
{
private static readonly string s_dotnetBlobRootUrl = "https://dotnetcli.blob.core.windows.net/dotnet/";
private static readonly string s_dotnetBlobContainerName = "dotnet";
private Task _leaseRenewalTask = null;
private CancellationTokenSource _cancellationTokenSource = null;
private string _connectionString { get; set; }
private CloudBlobContainer _blobContainer { get; set; }
public AzurePublisher()
{
_connectionString = EnvVars.EnsureVariable("CONNECTION_STRING").Trim('"');
_blobContainer = GetDotnetBlobContainer(_connectionString);
}
private CloudBlobContainer GetDotnetBlobContainer(string connectionString)
{
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connectionString);
CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
return blobClient.GetContainerReference(s_dotnetBlobContainerName);
}
public void PublishInstallerFile(string installerFile, string channel, string version)
{
var installerFileBlob = CalculateInstallerBlob(installerFile, channel, version);
PublishFile(installerFileBlob, installerFile);
}
public void PublishArchive(string archiveFile, string channel, string version)
{
var archiveFileBlob = CalculateArchiveBlob(archiveFile, channel, version);
PublishFile(archiveFileBlob, archiveFile);
}
public void PublishFile(string blob, string file)
{
CloudBlockBlob blockBlob = _blobContainer.GetBlockBlobReference(blob);
blockBlob.UploadFromFileAsync(file, FileMode.Open).Wait();
SetBlobPropertiesBasedOnFileType(blockBlob);
}
public void PublishStringToBlob(string blob, string content)
{
CloudBlockBlob blockBlob = _blobContainer.GetBlockBlobReference(blob);
blockBlob.UploadTextAsync(content).Wait();
blockBlob.Properties.ContentType = "text/plain";
blockBlob.SetPropertiesAsync().Wait();
}
public void CopyBlob(string sourceBlob, string targetBlob)
{
CloudBlockBlob source = _blobContainer.GetBlockBlobReference(sourceBlob);
CloudBlockBlob target = _blobContainer.GetBlockBlobReference(targetBlob);
// Create the empty blob
using (MemoryStream ms = new MemoryStream())
{
target.UploadFromStreamAsync(ms).Wait();
}
// Copy actual blob data
target.StartCopyAsync(source).Wait();
}
private void SetBlobPropertiesBasedOnFileType(CloudBlockBlob blockBlob)
{
if (Path.GetExtension(blockBlob.Uri.AbsolutePath.ToLower()) == ".svg")
{
blockBlob.Properties.ContentType = "image/svg+xml";
blockBlob.Properties.CacheControl = "no-cache";
blockBlob.SetPropertiesAsync().Wait();
}
else if (Path.GetExtension(blockBlob.Uri.AbsolutePath.ToLower()) == ".version")
{
blockBlob.Properties.ContentType = "text/plain";
blockBlob.SetPropertiesAsync().Wait();
}
}
public IEnumerable<string> ListBlobs(string virtualDirectory)
{
CloudBlobDirectory blobDir = _blobContainer.GetDirectoryReference(virtualDirectory);
BlobContinuationToken continuationToken = new BlobContinuationToken();
var blobFiles = blobDir.ListBlobsSegmentedAsync(continuationToken).Result;
return blobFiles.Results.Select(bf => bf.Uri.PathAndQuery);
}
public string AcquireLeaseOnBlob(
string blob,
TimeSpan? maxWaitDefault=null,
TimeSpan? delayDefault=null)
{
TimeSpan maxWait = maxWaitDefault ?? TimeSpan.FromSeconds(120);
TimeSpan delay = delayDefault ?? TimeSpan.FromMilliseconds(500);
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
// This will throw an exception with HTTP code 409 when we cannot acquire the lease
// But we should block until we can get this lease, with a timeout (maxWaitSeconds)
while (stopWatch.ElapsedMilliseconds < maxWait.TotalMilliseconds)
{
try
{
CloudBlockBlob cloudBlob = _blobContainer.GetBlockBlobReference(blob);
System.Threading.Tasks.Task<string> task = cloudBlob.AcquireLeaseAsync(TimeSpan.FromMinutes(1), null);
task.Wait();
string leaseID = task.Result;
// Create a cancelabble task that will auto-renew the lease until the lease is released
_cancellationTokenSource = new CancellationTokenSource();
_leaseRenewalTask = Task.Run(() =>
{ AutoRenewLease(this, blob, leaseID); },
_cancellationTokenSource.Token);
return leaseID;
}
catch (Exception e)
{
Console.WriteLine($"Retrying lease acquisition on {blob}, {e.Message}");
Thread.Sleep(delay);
}
}
ResetLeaseRenewalTaskState();
throw new Exception($"Unable to acquire lease on {blob}");
}
private void ResetLeaseRenewalTaskState()
{
// Cancel the lease renewal task if it was created
if (_leaseRenewalTask != null)
{
_cancellationTokenSource.Cancel();
// Block until the task ends. It can throw if we cancelled it before it completed.
try
{
_leaseRenewalTask.Wait();
}
catch(Exception)
{
// Ignore the caught exception as it will be expected.
}
_leaseRenewalTask = null;
}
}
private static void AutoRenewLease(AzurePublisher instance, string blob, string leaseId)
{
// We will renew the lease every 45 seconds
TimeSpan maxWait = TimeSpan.FromSeconds(45);
TimeSpan delay = TimeSpan.FromMilliseconds(500);
TimeSpan waitFor = maxWait;
CancellationToken token = instance._cancellationTokenSource.Token;
while (true)
{
// If the task has been requested to be cancelled, then do so.
token.ThrowIfCancellationRequested();
try
{
CloudBlockBlob cloudBlob = instance._blobContainer.GetBlockBlobReference(blob);
AccessCondition ac = new AccessCondition() { LeaseId = leaseId };
cloudBlob.RenewLeaseAsync(ac).Wait();
waitFor = maxWait;
}
catch (Exception e)
{
Console.WriteLine($"Retrying lease renewal on {blob}, {e.Message}");
waitFor = delay;
}
// If the task has been requested to be cancelled, then do so.
token.ThrowIfCancellationRequested();
Thread.Sleep(waitFor);
}
}
public void ReleaseLeaseOnBlob(string blob, string leaseId)
{
// Cancel the lease renewal task since we are about to release the lease.
ResetLeaseRenewalTaskState();
CloudBlockBlob cloudBlob = _blobContainer.GetBlockBlobReference(blob);
AccessCondition ac = new AccessCondition() { LeaseId = leaseId };
cloudBlob.ReleaseLeaseAsync(ac).Wait();
}
public bool IsLatestSpecifiedVersion(string version)
{
System.Threading.Tasks.Task<bool> task = _blobContainer.GetBlockBlobReference(version).ExistsAsync();
task.Wait();
return task.Result;
}
public void DropLatestSpecifiedVersion(string version)
{
CloudBlockBlob blob = _blobContainer.GetBlockBlobReference(version);
using (MemoryStream ms = new MemoryStream())
{
blob.UploadFromStreamAsync(ms).Wait();
}
}
public void CreateBlobIfNotExists(string path)
{
System.Threading.Tasks.Task<bool> task = _blobContainer.GetBlockBlobReference(path).ExistsAsync();
task.Wait();
if (!task.Result)
{
CloudBlockBlob blob = _blobContainer.GetBlockBlobReference(path);
using (MemoryStream ms = new MemoryStream())
{
blob.UploadFromStreamAsync(ms).Wait();
}
}
}
public bool TryDeleteBlob(string path)
{
try
{
DeleteBlob(path);
return true;
}
catch (Exception e)
{
Console.WriteLine($"Deleting blob {path} failed with \r\n{e.Message}");
return false;
}
}
public void DeleteBlob(string path)
{
_blobContainer.GetBlockBlobReference(path).DeleteAsync().Wait();
}
public string CalculateInstallerUploadUrl(string installerFile, string channel, string version)
{
return $"{s_dotnetBlobRootUrl}{CalculateInstallerBlob(installerFile, channel, version)}";
}
public static string CalculateInstallerBlob(string installerFile, string channel, string version)
{
return $"{channel}/Installers/{version}/{Path.GetFileName(installerFile)}";
}
public static string CalculateArchiveBlob(string archiveFile, string channel, string version)
{
return $"{channel}/Binaries/{version}/{Path.GetFileName(archiveFile)}";
}
public static async Task DownloadFile(string blobFilePath, string localDownloadPath)
{
var blobUrl = $"{s_dotnetBlobRootUrl}{blobFilePath}";
using (var client = new HttpClient())
{
var request = new HttpRequestMessage(HttpMethod.Get, blobUrl);
var sendTask = client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead);
var response = sendTask.Result.EnsureSuccessStatusCode();
var httpStream = await response.Content.ReadAsStreamAsync();
using (var fileStream = File.Create(localDownloadPath))
using (var reader = new StreamReader(httpStream))
{
httpStream.CopyTo(fileStream);
fileStream.Flush();
}
}
}
public void DownloadFilesWithExtension(string blobVirtualDirectory, string fileExtension, string localDownloadPath)
{
CloudBlobDirectory blobDir = _blobContainer.GetDirectoryReference(blobVirtualDirectory);
BlobContinuationToken continuationToken = new BlobContinuationToken();
var blobFiles = blobDir.ListBlobsSegmentedAsync(continuationToken).Result;
foreach (var blobFile in blobFiles.Results.OfType<CloudBlockBlob>())
{
if (Path.GetExtension(blobFile.Uri.AbsoluteUri) == fileExtension)
{
string localBlobFile = Path.Combine(localDownloadPath, Path.GetFileName(blobFile.Uri.AbsoluteUri));
Console.WriteLine($"Downloading {blobFile.Uri.AbsoluteUri} to {localBlobFile}...");
blobFile.DownloadToFileAsync(localBlobFile, FileMode.Create).Wait();
}
}
}
}
}

Просмотреть файл

@ -1,55 +0,0 @@
using System;
using System.IO;
using System.Net.Http;
using System.Text;
using Microsoft.DotNet.Cli.Build.Framework;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Blob;
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
namespace Microsoft.DotNet.Cli.Build
{
public class DebRepoPublisher
{
private const string _debianRevisionNumber = "1";
private string _repoID;
private string _uploadJsonDirectory;
public DebRepoPublisher(string uploadJsonDirectory)
{
_uploadJsonDirectory = uploadJsonDirectory;
_repoID = Environment.GetEnvironmentVariable("REPO_ID");
}
public void PublishDebFileToDebianRepo(string packageName, string packageVersion, string uploadUrl)
{
var uploadJson = GenerateUploadJsonFile(packageName, packageVersion, uploadUrl);
Cmd(Path.Combine(Dirs.RepoRoot, "scripts", "publish", "repoapi_client.sh"), "-addpkg", uploadJson)
.Execute()
.EnsureSuccessful();
}
private string GenerateUploadJsonFile(string packageName, string packageVersion, string uploadUrl)
{
var uploadJson = Path.Combine(_uploadJsonDirectory, "package_upload.json");
File.Delete(uploadJson);
using (var fileStream = File.Create(uploadJson))
{
using (StreamWriter sw = new StreamWriter(fileStream))
{
sw.WriteLine("{");
sw.WriteLine($" \"name\":\"{packageName}\",");
sw.WriteLine($" \"version\":\"{packageVersion}-{_debianRevisionNumber}\",");
sw.WriteLine($" \"repositoryId\":\"{_repoID}\",");
sw.WriteLine($" \"sourceUrl\":\"{uploadUrl}\"");
sw.WriteLine("}");
}
}
return uploadJson;
}
}
}

Просмотреть файл

@ -1,24 +0,0 @@
using System;
using System.IO;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.DotNet.Cli.Build.Framework;
namespace Microsoft.DotNet.Cli.Build
{
public class AptDependencyUtility
{
public static bool PackageIsInstalled(string packageName)
{
var result = Command.Create("dpkg", "-s", packageName)
.CaptureStdOut()
.CaptureStdErr()
.QuietBuildReporter()
.Execute();
return result.ExitCode == 0;
}
}
}

Просмотреть файл

@ -1,47 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Text;
using Microsoft.DotNet.Cli.Build.Framework;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Blob;
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
namespace Microsoft.DotNet.Cli.Build
{
public class BranchInfo
{
private static readonly string s_branchInfoFileName = "branchinfo.txt";
private string _repoRoot;
private string _branchInfoFile;
public IDictionary<string, string> Entries { get; set; }
public BranchInfo(string repoRoot)
{
_repoRoot = repoRoot;
_branchInfoFile = Path.Combine(_repoRoot, s_branchInfoFileName);
Entries = ReadBranchInfo(_branchInfoFile);
}
private IDictionary<string, string> ReadBranchInfo(string path)
{
var lines = File.ReadAllLines(path);
var dict = new Dictionary<string, string>();
foreach (var line in lines)
{
if (!line.Trim().StartsWith("#") && !string.IsNullOrWhiteSpace(line))
{
var splat = line.Split(new[] { '=' }, 2);
dict[splat[0]] = splat[1];
}
}
return dict;
}
}
}

Просмотреть файл

@ -1,13 +0,0 @@
using System.Collections.Generic;
namespace Microsoft.DotNet.Cli.Build
{
public class BuildVersion : Version
{
public string SimpleVersion => $"{Major}.{Minor}.{Patch}.{CommitCountString}";
public string VersionSuffix => $"{ReleaseSuffix}-{CommitCountString}";
public string NuGetVersion => $"{Major}.{Minor}.{Patch}-{VersionSuffix}";
public string NetCoreAppVersion => $"{Major}.{Minor}.{Patch}-{VersionSuffix}-00";
public string ProductionVersion => $"{Major}.{Minor}.{Patch}";
}
}

Просмотреть файл

@ -1,241 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Microsoft.DotNet.Cli.Build.Framework;
using Microsoft.DotNet.InternalAbstractions;
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
namespace Microsoft.DotNet.Cli.Build
{
public class Crossgen
{
private string _coreClrVersion;
private string _jitVersion;
private string _crossGenPath;
private string _targetRID;
private static readonly string[] s_excludedLibraries =
{
"mscorlib.dll",
"mscorlib.ni.dll",
"System.Private.CoreLib.dll",
"System.Private.CoreLib.ni.dll"
};
// This is not always correct. The version of crossgen we need to pick up is whatever one was restored as part
// of the Microsoft.NETCore.Runtime.CoreCLR package that is part of the shared library. For now, the version hardcoded
// in CompileTargets and the one in the shared library project.json match and are updated in lock step, but long term
// we need to be able to look at the project.lock.json file and figure out what version of Microsoft.NETCore.Runtime.CoreCLR
// was used, and then select that version.
public Crossgen(string coreClrVersion, string jitVersion, string targetRID = null)
{
_coreClrVersion = coreClrVersion;
_jitVersion = jitVersion;
_targetRID = targetRID;
_crossGenPath = GetCrossgenPathForVersion();
}
private string GetCrossgenPathForVersion()
{
var crossgenPackagePath = GetCrossGenPackagePathForVersion();
string ridCrossgen = null;
if (crossgenPackagePath == null)
{
return ridCrossgen;
}
// TODO-ARM-Crossgen: Add ubuntu.14.04-arm and ubuntu.16.04-arm
if (_targetRID == "win8-arm")
{
// workaround https://github.com/dotnet/coreclr/issues/9884
// ridCrossgen = Path.Combine(crossgenPackagePath, "tools", "x86_arm", $"crossgen{Constants.ExeSuffix}");
ridCrossgen = Path.Combine(crossgenPackagePath, "tools", "x86_AnyCPU", $"crossgen{Constants.ExeSuffix}");
}
else if (_targetRID == "win10-arm64")
{
// workaround https://github.com/dotnet/coreclr/issues/9884
// ridCrossgen = Path.Combine(crossgenPackagePath, "tools", "x64_arm", $"crossgen{Constants.ExeSuffix}");
ridCrossgen = Path.Combine(crossgenPackagePath, "tools", "x64_AnyCPU", $"crossgen{Constants.ExeSuffix}");
}
else
{
ridCrossgen = Path.Combine(crossgenPackagePath, "tools", $"crossgen{Constants.ExeSuffix}");
}
return ridCrossgen;
}
private string GetLibCLRJitPathForVersion()
{
var jitRid = _targetRID ?? GetCoreCLRRid();
var jitPackagePath = GetJitPackagePathForVersion();
if (jitPackagePath == null)
{
return null;
}
string jitPath = Path.Combine(jitPackagePath, "runtimes", jitRid, "native", $"{Constants.DynamicLibPrefix}clrjit{Constants.DynamicLibSuffix}");
// TODO-ARM-Crossgen: Add ubuntu.14.04-arm and ubuntu.16.04-arm
if (_targetRID == "win8-arm")
{
// workaround https://github.com/dotnet/coreclr/issues/9884
// jitPath = Path.Combine(jitPackagePath, "runtimes", "x86_arm", "native", $"{Constants.DynamicLibPrefix}clrjit{Constants.DynamicLibSuffix}");
jitPath = Path.Combine(jitPackagePath, "runtimes", "x86_AnyCPU", "native", $"{Constants.DynamicLibPrefix}clrjit{Constants.DynamicLibSuffix}");
}
else if (_targetRID == "win10-arm64")
{
// workaround https://github.com/dotnet/coreclr/issues/9884
// jitPath = Path.Combine(jitPackagePath, "runtimes", "x64_arm64", "native", $"{Constants.DynamicLibPrefix}clrjit{Constants.DynamicLibSuffix}");
jitPath = Path.Combine(jitPackagePath, "runtimes", "x64_AnyCPU", "native", $"{Constants.DynamicLibPrefix}clrjit{Constants.DynamicLibSuffix}");
}
return jitPath;
}
private string GetJitPackagePathForVersion()
{
string jitRid = _targetRID ?? GetCoreCLRRid();
if (jitRid == null)
{
return null;
}
string packageId = $"runtime.{jitRid}.Microsoft.NETCore.Jit";
return Path.Combine(
Dirs.PkgNuGetPackages,
packageId,
_jitVersion);
}
private string GetCoreLibsDirForVersion()
{
string coreclrRid = _targetRID ?? GetCoreCLRRid();
if (coreclrRid == null)
{
return null;
}
string packageId = $"runtime.{coreclrRid}.Microsoft.NETCore.Runtime.CoreCLR";
return Path.Combine(
Dirs.PkgNuGetPackages,
packageId,
_coreClrVersion,
"runtimes",
coreclrRid,
"lib",
"netstandard1.0");
}
private string GetCrossGenPackagePathForVersion()
{
string coreclrRid = _targetRID ?? GetCoreCLRRid();
if (coreclrRid == null)
{
return null;
}
string packageId = $"runtime.{coreclrRid}.Microsoft.NETCore.Runtime.CoreCLR";
return Path.Combine(
Dirs.PkgNuGetPackages,
packageId,
_coreClrVersion);
}
private string GetCoreCLRRid()
{
string rid = null;
if (CurrentPlatform.IsWindows)
{
var arch = RuntimeEnvironment.RuntimeArchitecture;
rid = $"win7-{arch}";
}
else if (CurrentPlatform.IsOSX)
{
rid = "osx.10.10-x64";
}
else if (CurrentPlatform.IsCentOS || CurrentPlatform.IsRHEL)
{
// CentOS runtime is in the runtime.rhel.7-x64... package as are all
// versions of RHEL
rid = "rhel.7-x64";
}
else if (CurrentPlatform.IsLinux)
{
rid = RuntimeEnvironment.GetRuntimeIdentifier();
}
return rid;
}
public void CrossgenDirectory(string sharedFxPath, string pathToAssemblies)
{
// Check if we need to skip crossgen
if (string.Equals(Environment.GetEnvironmentVariable("DISABLE_CROSSGEN"), "1"))
{
var originalColor = Console.ForegroundColor;
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine("Skipping crossgen for because DISABLE_CROSSGEN is set to 1");
Console.ForegroundColor = originalColor;
return;
}
// HACK
// The input directory can be a portable FAT app (example the CLI itself).
// In that case there can be RID specific managed dependencies which are not right next to the app binary (example System.Diagnostics.TraceSource).
// We need those dependencies during crossgen. For now we just pass all subdirectories of the input directory as input to crossgen.
// The right fix -
// If the assembly has deps.json then parse the json file to get all the dependencies, pass these dependencies as input to crossgen.
// else pass the current directory of assembly as input to crossgen.
var coreLibsDir = GetCoreLibsDirForVersion();
var addtionalPaths = Directory.GetDirectories(pathToAssemblies, "*", SearchOption.AllDirectories).ToList();
var paths = new List<string>() { coreLibsDir, sharedFxPath, pathToAssemblies };
paths.AddRange(addtionalPaths);
var platformAssembliesPaths = string.Join(Path.PathSeparator.ToString(), paths.Distinct());
var jitPath = GetLibCLRJitPathForVersion();
var env = new Dictionary<string, string>()
{
// disable partial ngen
{ "COMPlus_PartialNGen", "0" }
};
// Form the dynamic path that would not collide if another instance of this is running.
string basePath = Path.Combine(Dirs.Intermediate, Guid.NewGuid().ToString());
Directory.CreateDirectory(basePath);
foreach (var file in Directory.GetFiles(pathToAssemblies))
{
string fileName = Path.GetFileName(file);
if (s_excludedLibraries.Any(lib => String.Equals(lib, fileName, StringComparison.OrdinalIgnoreCase))
|| !PEUtils.HasMetadata(file))
{
continue;
}
string tempPathName = Path.Combine(basePath, Path.ChangeExtension(fileName, "readytorun"));
IList<string> crossgenArgs = new List<string> {
"-readytorun", "-in", file, "-out", tempPathName,
"-platform_assemblies_paths", platformAssembliesPaths
};
crossgenArgs.Add("-JITPath");
crossgenArgs.Add(jitPath);
ExecSilent(_crossGenPath, crossgenArgs, env);
File.Copy(tempPathName, file, overwrite: true);
}
}
}
}

Просмотреть файл

@ -1,194 +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.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.DotNet.Cli.Build.Framework;
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
namespace Microsoft.DotNet.Cli.Build
{
public class DebPackageCreator
{
private static readonly string s_dotnetDebToolPackageId = "dotnet-deb-tool";
private static readonly string s_toolConsumerProjectName = "dotnet-deb-tool-consumer";
private static readonly string s_debianConfigJsonFileName = "debian_config.json";
private DotNetCli _dotnet;
private string _intermediateDirectory;
private string _dotnetDebToolVersion;
private string _dotnetDebToolPackageSource;
private string _consumingProjectDirectory;
public DebPackageCreator(
DotNetCli dotnet,
string intermediateDirectory,
string dotnetDebToolVersion = "1.0.1-*",
string dotnetDebToolPackageSource = null)
{
_dotnet = dotnet;
_intermediateDirectory = intermediateDirectory;
_dotnetDebToolVersion = dotnetDebToolVersion;
_dotnetDebToolPackageSource = dotnetDebToolPackageSource;
_consumingProjectDirectory = Path.Combine(_intermediateDirectory, s_toolConsumerProjectName);
InitializeDotnetDebTool();
}
public void CreateDeb(
string debianConfigJsonFile,
string packageName,
string packageVersion,
string inputBinariesDirectory,
Dictionary<string, string> debianConfigVariables,
string outputFile,
string manpagesDirectory = null)
{
string debIntermediatesDirectory = Path.Combine(_intermediateDirectory, packageName, packageVersion);
if (Directory.Exists(debIntermediatesDirectory))
{
FS.Rmdir(debIntermediatesDirectory);
}
FS.Mkdirp(debIntermediatesDirectory);
string layoutDirectory = Path.Combine(debIntermediatesDirectory, "debianLayoutDirectory");
var debianLayoutDirectories = new DebianLayoutDirectories(layoutDirectory);
CreateEmptyDebianLayout(debianLayoutDirectories);
CopyFilesToDebianLayout(
debianLayoutDirectories,
debianConfigJsonFile,
inputBinariesDirectory,
manpagesDirectory);
ReplaceDebianConfigJsonVariables(debianLayoutDirectories, debianConfigVariables);
CreateDebianPackage(debianLayoutDirectories, debIntermediatesDirectory, outputFile, packageName, packageVersion);
}
private void CreateEmptyDebianLayout(DebianLayoutDirectories layoutDirectories)
{
if (Directory.Exists(layoutDirectories.LayoutDirectory))
{
FS.Rmdir(layoutDirectories.LayoutDirectory);
}
Directory.CreateDirectory(layoutDirectories.LayoutDirectory);
Directory.CreateDirectory(layoutDirectories.AbsolutePlacement);
Directory.CreateDirectory(layoutDirectories.PackageRoot);
Directory.CreateDirectory(layoutDirectories.Samples);
Directory.CreateDirectory(layoutDirectories.Docs);
}
private void CopyFilesToDebianLayout(
DebianLayoutDirectories layoutDirectories,
string debianConfigFile,
string inputBinariesDirectory,
string manpagesDirectory)
{
FS.CopyRecursive(inputBinariesDirectory, layoutDirectories.PackageRoot);
if (manpagesDirectory != null)
{
FS.CopyRecursive(manpagesDirectory, layoutDirectories.Docs);
}
File.Copy(debianConfigFile,
Path.Combine(layoutDirectories.LayoutDirectory, s_debianConfigJsonFileName));
}
private void ReplaceDebianConfigJsonVariables(
DebianLayoutDirectories debianLayoutDirectories,
Dictionary<string, string> debianConfigVariables)
{
var debianConfigFile = Path.Combine(debianLayoutDirectories.LayoutDirectory, s_debianConfigJsonFileName);
var debianConfigFileContents = File.ReadAllText(debianConfigFile);
foreach (var variable in debianConfigVariables)
{
var variableToken = $"%{variable.Key}%";
debianConfigFileContents = debianConfigFileContents.Replace(variableToken, variable.Value);
}
File.WriteAllText(debianConfigFile, debianConfigFileContents);
}
private void CreateDebianPackage(
DebianLayoutDirectories debianLayoutDirectories,
string intermediatesOutputDirectory,
string outputFile,
string packageName,
string packageVersion)
{
_dotnet.Exec("deb-tool",
"-i", debianLayoutDirectories.LayoutDirectory,
"-o", intermediatesOutputDirectory,
"-n", packageName,
"-v", packageVersion)
.WorkingDirectory(_consumingProjectDirectory)
.Execute()
.EnsureSuccessful();
var debianFile = Directory.EnumerateFiles(intermediatesOutputDirectory, "*.deb").First();
File.Copy(debianFile, outputFile, true);
}
private void InitializeDotnetDebTool()
{
CreateAndRestoreToolConsumingProject();
}
private void CreateAndRestoreToolConsumingProject()
{
if (Directory.Exists(_consumingProjectDirectory))
{
FS.Rmdir(_consumingProjectDirectory);
}
FS.Mkdirp(_consumingProjectDirectory);
var projectJsonFile = Path.Combine(_consumingProjectDirectory, "project.json");
File.WriteAllText(projectJsonFile, GetDotnetDebProjectJsonContents());
Command restore = _dotnetDebToolPackageSource == null
? _dotnet.Restore("--disable-parallel")
: _dotnet.Restore("-f", $"{_dotnetDebToolPackageSource}", "--disable-parallel");
restore
.WorkingDirectory(Path.GetDirectoryName(projectJsonFile))
.Execute()
.EnsureSuccessful();
}
private string GetDotnetDebProjectJsonContents()
{
var projectJson = new StringBuilder();
projectJson.Append("{");
projectJson.Append($" \"version\": \"1.0.0-*\",");
projectJson.Append($" \"name\": \"{s_toolConsumerProjectName}\",");
projectJson.Append(" \"frameworks\": { \"netcoreapp1.0\": { } },");
projectJson.Append($" \"tools\": {{ \"{s_dotnetDebToolPackageId}\": \"{_dotnetDebToolVersion}\" }},");
projectJson.Append("}");
return projectJson.ToString();
}
private class DebianLayoutDirectories
{
private string _layoutDirectory;
public DebianLayoutDirectories(string layoutDirectory)
{
_layoutDirectory = layoutDirectory;
}
public string LayoutDirectory => _layoutDirectory;
public string PackageRoot => Path.Combine(_layoutDirectory, "package_root");
public string AbsolutePlacement => Path.Combine(_layoutDirectory, "$");
public string Samples => Path.Combine(_layoutDirectory, "samples");
public string Docs => Path.Combine(_layoutDirectory, "docs");
}
}
}

Просмотреть файл

@ -1,55 +0,0 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
using Microsoft.DotNet.InternalAbstractions;
namespace Microsoft.DotNet.Cli.Build
{
public static class Dirs
{
public static readonly string RepoRoot = Directory.GetCurrentDirectory();
public static readonly string DebPackagingConfig = Path.Combine(Dirs.RepoRoot, "packaging", "deb");
public static readonly string Output = Path.Combine(
RepoRoot,
"artifacts",
Environment.GetEnvironmentVariable("TARGETRID") ?? RuntimeEnvironment.GetRuntimeIdentifier());
public static readonly string Intermediate = Path.Combine(Output, "intermediate");
public static readonly string PackagesIntermediate = Path.Combine(Output, "packages/intermediate");
public static readonly string PackagesNoRID = Path.Combine(RepoRoot, "artifacts", "packages");
public static readonly string Packages = Path.Combine(Output, "packages");
public static readonly string Stage1 = Path.Combine(Output, "stage1");
public static readonly string Stage1Compilation = Path.Combine(Output, "stage1compilation");
public static readonly string Stage1Symbols = Path.Combine(Output, "stage1symbols");
public static readonly string Stage2 = Path.Combine(Output, "stage2");
public static readonly string Stage2Compilation = Path.Combine(Output, "stage2compilation");
public static readonly string Stage2Symbols = Path.Combine(Output, "stage2symbols");
public static readonly string CorehostLatest = Path.Combine(Output, "corehost"); // Not using Path.Combine(Output, "corehost", "latest") to keep signing working.
public static readonly string CorehostLocked = Path.Combine(Output, "corehost", "locked");
public static readonly string CorehostLocalPackages = Path.Combine(Output, "corehost");
public static readonly string CorehostDummyPackages = Path.Combine(Output, "corehostdummypackages");
public static readonly string SharedFrameworkPublish = Path.Combine(Intermediate, "sharedFrameworkPublish");
public static readonly string TestOutput = Path.Combine(Output, "tests");
public static readonly string TestArtifacts = Path.Combine(TestOutput, "artifacts");
public static readonly string TestPackages = Path.Combine(TestOutput, "packages");
public static readonly string TestPackagesBuild = Path.Combine(TestOutput, "packagesBuild");
public static readonly string OSXReferenceAssembliesPath = "/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/xbuild-frameworks";
public static readonly string UsrLocalReferenceAssembliesPath = "/usr/local/lib/mono/xbuild-frameworks";
public static readonly string UsrReferenceAssembliesPath = "/usr/lib/mono/xbuild-frameworks";
public static string NuGetPackages = Environment.GetEnvironmentVariable("NUGET_PACKAGES") ?? GetNuGetPackagesDir();
public static string PkgNuGetPackages = Path.Combine(Dirs.RepoRoot, "pkg", "packages");
private static string GetNuGetPackagesDir()
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
return Path.Combine(Dirs.RepoRoot, ".nuget", "packages");
}
return Path.Combine(Dirs.RepoRoot, ".nuget", "packages");
}
}
}

Просмотреть файл

@ -1,15 +0,0 @@
using System;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using Microsoft.DotNet.Cli.Build.Framework;
using Microsoft.DotNet.InternalAbstractions;
namespace Microsoft.DotNet.Cli.Build
{
public partial class DotNetCli
{
public static readonly DotNetCli Stage1 = new DotNetCli(Dirs.Stage1);
public static readonly DotNetCli Stage2 = new DotNetCli(Dirs.Stage2);
}
}

Просмотреть файл

@ -1,123 +0,0 @@
using System.IO;
using System.Runtime.InteropServices;
using System;
using Microsoft.DotNet.Cli.Build.Framework;
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
namespace Microsoft.DotNet.Cli.Build
{
public static class FS
{
public static void Mkdirp(string dir)
{
if (!Directory.Exists(dir))
{
Directory.CreateDirectory(dir);
}
}
public static void Rm(string file)
{
if(File.Exists(file))
{
File.Delete(file);
}
}
public static void Rmdir(string dir)
{
if(Directory.Exists(dir))
{
Directory.Delete(dir, recursive: true);
}
}
public static void RmFilesInDirRecursive(string dir, string filePattern)
{
var files = Directory.EnumerateFiles(dir, filePattern, SearchOption.AllDirectories);
foreach (var file in files)
{
FS.Rm(file);
}
}
public static void Chmod(string file, string mode, bool recursive = false)
{
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
if (recursive)
{
Command.Create("chmod", "-R", mode, file).Execute().EnsureSuccessful();
}
else
{
Command.Create("chmod", mode, file).Execute().EnsureSuccessful();
}
}
}
public static void ChmodAll(string searchDir, string pattern, string mode)
{
Exec("find", searchDir, "-type", "f", "-name", pattern, "-exec", "chmod", mode, "{}", ";");
}
public static void FixModeFlags(string dir)
{
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
// Managed code doesn't need 'x'
ChmodAll(dir, "*.dll", "644");
ChmodAll(dir, "*.exe", "644");
// Generally, dylibs and sos have 'x' (no idea if it's required ;))
// (No need to condition this on OS since there shouldn't be any dylibs on Linux,
// but even if they are we may as well set their mode flags :))
ChmodAll(dir, "*.dylib", "755");
ChmodAll(dir, "*.so", "755");
// Executables (those without dots) are executable :)
Exec("find", dir, "-type", "f", "!", "-name", "*.*", "-exec", "chmod", "755", "{}", ";");
}
}
public static void CopyRecursive(string sourceDirectory, string destinationDirectory, bool overwrite = false)
{
Mkdirp(destinationDirectory);
foreach(var dir in Directory.EnumerateDirectories(sourceDirectory))
{
CopyRecursive(dir, Path.Combine(destinationDirectory, Path.GetFileName(dir)), overwrite);
}
foreach(var file in Directory.EnumerateFiles(sourceDirectory))
{
var dest = Path.Combine(destinationDirectory, Path.GetFileName(file));
if (!File.Exists(dest) || overwrite)
{
// We say overwrite true, because we only get here if the file didn't exist (thus it doesn't matter) or we
// wanted to overwrite :)
File.Copy(file, dest, overwrite: true);
}
}
}
public static void CleanBinObj(BuildTargetContext c, string dir)
{
dir = dir ?? c.BuildContext.BuildDirectory;
foreach(var candidate in Directory.EnumerateDirectories(dir))
{
if (string.Equals(Path.GetFileName(candidate), "bin") ||
string.Equals(Path.GetFileName(candidate), "obj"))
{
Utils.DeleteDirectory(candidate);
}
else
{
CleanBinObj(c, candidate);
}
}
}
}
}

Просмотреть файл

@ -1,27 +0,0 @@
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
namespace Microsoft.DotNet.Cli.Build
{
public static class GitUtils
{
public static int GetCommitCount()
{
return int.Parse(ExecuteGitCommand("rev-list", "--count", "HEAD"));
}
public static string GetCommitHash()
{
return ExecuteGitCommand("rev-parse", "HEAD");
}
private static string ExecuteGitCommand(params string[] args)
{
var gitResult = Cmd("git", args)
.CaptureStdOut()
.Execute();
gitResult.EnsureSuccessful();
return gitResult.StdOut.Trim();
}
}
}

Просмотреть файл

@ -1,101 +0,0 @@
using System;
using System.Collections.Generic;
namespace Microsoft.DotNet.Cli.Build
{
public class HostVersion : Version
{
// ------------------------------------------HOST-VERSIONING-------------------------------------------
//
// Host versions are independent of CLI versions. Moreover, these version numbers
// are baked into the binary and is used to look up a serviced binary replacement.
//
public struct VerInfo
{
public int Major;
public int Minor;
public int Patch;
public string Release;
public string BuildMajor;
public string BuildMinor;
public string CommitCountString;
public VerInfo(int major, int minor, int patch, string release, string buildMajor, string buildMinor, string commitCountString)
{
Major = major;
Minor = minor;
Patch = patch;
Release = release;
BuildMajor = buildMajor;
BuildMinor = buildMinor;
CommitCountString = commitCountString;
}
public string GenerateMsiVersion()
{
return Version.GenerateMsiVersion(Major, Minor, Patch, Int32.Parse(VerRsrcBuildMajor));
}
public string WithoutSuffix => $"{Major}.{Minor}.{Patch}";
// The version numbers to be included in the embedded version resource (.rc) files.
public string VerRsrcBuildMajor => !string.IsNullOrEmpty(BuildMajor) ? BuildMajor : CommitCountString;
public string VerRsrcBuildMinor => !string.IsNullOrEmpty(BuildMinor) ? BuildMinor : "00";
public override string ToString()
{
string suffix = "";
foreach (var verPad in new string[] { Release, BuildMajor, BuildMinor })
{
if (!string.IsNullOrEmpty(verPad))
{
suffix += $"-{verPad}";
}
}
return $"{Major}.{Minor}.{Patch}{suffix}";
}
}
//
// Latest hosts for production of nupkgs.
//
// Full versions and package information.
public string LatestHostBuildMajor => CommitCountString;
public string LatestHostBuildMinor => "00";
public bool EnsureStableVersion { get; set; }
public VerInfo LatestHostVersion => new VerInfo(Major, Minor, Patch, ReleaseSuffix, LatestHostBuildMajor, LatestHostBuildMinor, CommitCountString);
public VerInfo LatestAppHostVersion => new VerInfo(Major, Minor, Patch, ReleaseSuffix, LatestHostBuildMajor, LatestHostBuildMinor, CommitCountString);
public VerInfo LatestHostFxrVersion => new VerInfo(Major, Minor, Patch, ReleaseSuffix, LatestHostBuildMajor, LatestHostBuildMinor, CommitCountString);
public VerInfo LatestHostPolicyVersion => new VerInfo(Major, Minor, Patch, ReleaseSuffix, LatestHostBuildMajor, LatestHostBuildMinor, CommitCountString);
public Dictionary<string, VerInfo> LatestHostPackages => new Dictionary<string, VerInfo>()
{
{ "Microsoft.NETCore.DotNetHost", LatestHostVersion },
{ "Microsoft.NETCore.DotNetAppHost", LatestAppHostVersion },
{ "Microsoft.NETCore.DotNetHostResolver", LatestHostFxrVersion },
{ "Microsoft.NETCore.DotNetHostPolicy", LatestHostPolicyVersion }
};
public Dictionary<string, VerInfo> LatestHostPackagesToValidate => new Dictionary<string, VerInfo>()
{
{ "Microsoft.NETCore.DotNetHost", LatestHostVersion },
{ "Microsoft.NETCore.DotNetAppHost", LatestAppHostVersion },
{ "Microsoft.NETCore.DotNetHostResolver", LatestHostFxrVersion },
{ "Microsoft.NETCore.DotNetHostPolicy", LatestHostPolicyVersion }
};
public Dictionary<string, VerInfo> LatestHostBinaries => new Dictionary<string, VerInfo>()
{
{ "dotnet", LatestHostVersion },
{ "apphost", LatestAppHostVersion },
{ "hostfxr", LatestHostFxrVersion },
{ "hostpolicy", LatestHostPolicyVersion }
};
//
// Locked muxer for consumption in CLI.
//
// Set this variable to toggle muxer locking.
public bool IsLocked { get; set; }
public VerInfo LockedHostFxrVersion => IsLocked ? new VerInfo(Major, Minor, Patch, "", "", "", CommitCountString) : LatestHostFxrVersion;
public VerInfo LockedHostVersion => IsLocked ? new VerInfo(Major, Minor, Patch, "", "", "", CommitCountString) : LatestHostVersion;
}
}

Просмотреть файл

@ -1,28 +0,0 @@
using System;
using System.IO;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace Microsoft.DotNet.Cli.Build
{
public static class JsonUtils
{
public static JObject ReadProject(string projectJsonPath)
{
using (TextReader projectFileReader = File.OpenText(projectJsonPath))
{
var projectJsonReader = new JsonTextReader(projectFileReader);
var serializer = new JsonSerializer();
return serializer.Deserialize<JObject>(projectJsonReader);
}
}
public static void WriteProject(JObject projectRoot, string projectJsonPath)
{
string projectJson = JsonConvert.SerializeObject(projectRoot, Formatting.Indented);
File.WriteAllText(projectJsonPath, projectJson + Environment.NewLine);
}
}
}

Просмотреть файл

@ -1,115 +0,0 @@
using Microsoft.DotNet.Cli.Build.Framework;
using Microsoft.DotNet.InternalAbstractions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Microsoft.DotNet.Cli.Build
{
public class Monikers
{
public const string SharedFrameworkName = "Microsoft.NETCore.App";
public const string CLISdkBrandName = "Microsoft .NET Core 1.0.0 - SDK Preview 2";
private static string GetBrandName(BuildTargetContext c, string suffix)
{
var buildVersion = c.BuildContext.Get<BuildVersion>("BuildVersion");
return String.Format("Microsoft .NET Core {0}.{1}.{2} - {3}", buildVersion.Major,
buildVersion.Minor, buildVersion.Patch, suffix);
}
public static string GetSharedFxBrandName(BuildTargetContext c)
{
return GetBrandName(c, "Runtime");
}
public static string GetSharedHostBrandName(BuildTargetContext c)
{
return GetBrandName(c, "Host");
}
public static string GetHostFxrBrandName(BuildTargetContext c)
{
return GetBrandName(c, "Host FX Resolver");
}
public static string GetProductMoniker(BuildTargetContext c, string artifactPrefix, string version)
{
string rid = Environment.GetEnvironmentVariable("TARGETRID") ?? RuntimeEnvironment.GetRuntimeIdentifier();
// Look for expected RIDs, including Portable one, for Linux
if (rid.StartsWith("linux-") || rid == "ubuntu.16.04-x64" || rid == "ubuntu.16.04-arm" || rid == "ubuntu.16.10-x64" || rid == "fedora.23-x64" || rid == "fedora.24-x64" || rid == "opensuse.42.1-x64" || rid == "debian.8-armel" || rid == "tizen.4.0.0-armel")
{
return $"{artifactPrefix}-{rid}.{version}";
}
else
{
string osname = GetOSShortName();
string arch = Environment.GetEnvironmentVariable("TARGETPLATFORM") ?? CurrentArchitecture.Current.ToString();
return $"{artifactPrefix}-{osname}-{arch}.{version}";
}
}
public static string GetBadgeMoniker(BuildTargetContext c)
{
string rid = c.BuildContext.Get<string>("TargetRID");
if (rid.StartsWith("linux-"))
{
return $"Linux_{c.BuildContext.Get<string>("Platform")}";
}
switch (rid)
{
case "ubuntu.16.04-x64":
return "Ubuntu_16_04_x64";
case "ubuntu.16.04-arm":
return "Ubuntu_16_04_arm";
case "ubuntu.16.10-x64":
return "Ubuntu_16_10_x64";
case "fedora.23-x64":
return "Fedora_23_x64";
case "fedora.24-x64":
return "Fedora_24_x64";
case "opensuse.42.1-x64":
return "openSUSE_42_1_x64";
case "debian.8-armel":
return "Debian_8_armel";
case "tizen.4.0.0-armel":
return "Tizen_4_0_0_armel";
}
return $"{CurrentPlatform.Current}_{c.BuildContext.Get<string>("Platform")}";
}
public static string GetDebianHostFxrPackageName(string hostfxrNugetVersion)
{
return $"dotnet-hostfxr-{hostfxrNugetVersion}".ToLower();
}
public static string GetDebianSharedFrameworkPackageName(string sharedFrameworkNugetVersion)
{
return $"dotnet-sharedframework-{SharedFrameworkName}-{sharedFrameworkNugetVersion}".ToLower();
}
public static string GetDebianSharedHostPackageName(BuildTargetContext c)
{
return $"dotnet-host".ToLower();
}
public static string GetOSShortName()
{
string osname = "";
switch (CurrentPlatform.Current)
{
case BuildPlatform.Windows:
osname = "win";
break;
default:
osname = CurrentPlatform.Current.ToString().ToLower();
break;
}
return osname;
}
}
}

Просмотреть файл

@ -1,27 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection.PortableExecutable;
namespace Microsoft.DotNet.Cli.Build
{
public static class PEUtils
{
public static bool HasMetadata(string pathToFile)
{
try
{
using (var inStream = File.OpenRead(pathToFile))
{
using (var peReader = new PEReader(inStream))
{
return peReader.HasMetadata;
}
}
}
catch (BadImageFormatException) { }
return false;
}
}
}

Просмотреть файл

@ -1,87 +0,0 @@
using Microsoft.DotNet.Cli.Build.Framework;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
namespace Microsoft.DotNet.Cli.Build
{
public class PublishMutationUtilties
{
public static void CleanPublishOutput(
string path,
string name,
bool deleteRuntimeConfigJson=false,
bool deleteDepsJson=false,
bool deleteAppHost=false)
{
File.Delete(Path.Combine(path, $"{name}{Constants.ExeSuffix}"));
File.Delete(Path.Combine(path, $"{name}.dll"));
File.Delete(Path.Combine(path, $"{name}.pdb"));
if (deleteRuntimeConfigJson)
{
File.Delete(Path.Combine(path, $"{name}.runtimeconfig.json"));
}
if (deleteDepsJson)
{
File.Delete(Path.Combine(path, $"{name}.deps.json"));
}
if (deleteAppHost)
{
File.Delete(Path.Combine(path, $"apphost{Constants.ExeSuffix}"));
}
}
public static void ChangeEntryPointLibraryName(string depsFile, string newName)
{
JToken deps;
using (var file = File.OpenText(depsFile))
using (JsonTextReader reader = new JsonTextReader(file))
{
deps = JObject.ReadFrom(reader);
}
string version = null;
foreach (JProperty target in deps["targets"])
{
var targetLibrary = target.Value.Children<JProperty>().FirstOrDefault();
if (targetLibrary == null)
{
continue;
}
version = targetLibrary.Name.Substring(targetLibrary.Name.IndexOf('/') + 1);
if (newName == null)
{
targetLibrary.Remove();
}
else
{
targetLibrary.Replace(new JProperty(newName + '/' + version, targetLibrary.Value));
}
}
if (version != null)
{
var library = deps["libraries"].Children<JProperty>().First();
if (newName == null)
{
library.Remove();
}
else
{
library.Replace(new JProperty(newName + '/' + version, library.Value));
}
using (var file = File.CreateText(depsFile))
using (var writer = new JsonTextWriter(file) { Formatting = Formatting.Indented })
{
deps.WriteTo(writer);
}
}
}
}
}

Просмотреть файл

@ -1,230 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
using Microsoft.DotNet.InternalAbstractions;
using Microsoft.DotNet.Cli.Build.Framework;
using Newtonsoft.Json;
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
using static Microsoft.DotNet.Cli.Build.FS;
namespace Microsoft.DotNet.Cli.Build
{
public class SharedFrameworkPublisher
{
public static string s_sharedFrameworkName = "Microsoft.NETCore.App";
private string _sharedFrameworkTemplateSourceRoot;
private string _sharedFrameworkNugetVersion;
private string _sharedFrameworkRid;
private string _sharedFrameworkTarget;
private string _sharedFrameworkSourceRoot;
private string _repoRoot;
private string _corehostLockedDirectory;
private string _corehostLatestDirectory;
private Crossgen _crossgenUtil;
private string _corehostPackageSource;
public SharedFrameworkPublisher(
string repoRoot,
string corehostLockedDirectory,
string corehostLatestDirectory,
string corehostPackageSource,
string sharedFrameworkNugetVersion,
string sharedFrameworkRid,
string sharedFrameworkTarget)
{
_repoRoot = repoRoot;
_corehostLockedDirectory = corehostLockedDirectory;
_corehostLatestDirectory = corehostLatestDirectory;
_corehostPackageSource = corehostPackageSource;
string crossgenRID = null;
// If we are dealing with cross-targeting compilation, then specify the
// correct RID for crossgen to use when compiling SharedFramework.
// TODO-ARM-Crossgen: Add ubuntu.14.04-arm and ubuntu.16.04-arm
if ((sharedFrameworkRid == "win8-arm") || (sharedFrameworkRid == "win10-arm64") || (sharedFrameworkRid.StartsWith("linux-")))
{
crossgenRID = sharedFrameworkRid;
}
_crossgenUtil = new Crossgen(DependencyVersions.CoreCLRVersion, DependencyVersions.JitVersion, crossgenRID);
_sharedFrameworkTemplateSourceRoot = Path.Combine(repoRoot, "src", "sharedframework", "framework");
_sharedFrameworkNugetVersion = sharedFrameworkNugetVersion;
_sharedFrameworkRid = sharedFrameworkRid;
_sharedFrameworkTarget = sharedFrameworkTarget;
_sharedFrameworkSourceRoot = GenerateSharedFrameworkProject(
_sharedFrameworkNugetVersion,
_sharedFrameworkTemplateSourceRoot,
_sharedFrameworkRid,
_sharedFrameworkTarget);
}
public static string GetSharedFrameworkPublishPath(string outputRootDirectory, string sharedFrameworkNugetVersion)
{
return Path.Combine(
outputRootDirectory,
"shared",
s_sharedFrameworkName,
sharedFrameworkNugetVersion);
}
public void CopyMuxer(string sharedFrameworkPublishRoot)
{
File.Copy(
Path.Combine(_corehostLockedDirectory, HostArtifactNames.DotnetHostBaseName),
Path.Combine(sharedFrameworkPublishRoot, HostArtifactNames.DotnetHostBaseName), true);
}
public void CopyHostFxrToVersionedDirectory(string rootDirectory, string hostFxrVersion)
{
var hostFxrVersionedDirectory = Path.Combine(rootDirectory, "host", "fxr", hostFxrVersion);
FS.Mkdirp(hostFxrVersionedDirectory);
File.Copy(
Path.Combine(_corehostLockedDirectory, HostArtifactNames.DotnetHostFxrBaseName),
Path.Combine(hostFxrVersionedDirectory, HostArtifactNames.DotnetHostFxrBaseName), true);
}
public void PublishSharedFramework(string outputRootDirectory, string commitHash, DotNetCli dotnetCli, string hostFxrVersion)
{
dotnetCli.Restore(
"--verbosity", "verbose",
"--disable-parallel",
"--infer-runtimes",
"--fallbacksource", _corehostPackageSource)
.WorkingDirectory(_sharedFrameworkSourceRoot)
.Execute()
.EnsureSuccessful();
// We publish to a sub folder of the PublishRoot so tools like heat and zip can generate folder structures easier.
string sharedFrameworkNameAndVersionRoot = GetSharedFrameworkPublishPath(outputRootDirectory, _sharedFrameworkNugetVersion);
if (Directory.Exists(sharedFrameworkNameAndVersionRoot))
{
Utils.DeleteDirectory(sharedFrameworkNameAndVersionRoot);
}
dotnetCli.Publish(
"--output", sharedFrameworkNameAndVersionRoot,
"-r", _sharedFrameworkRid,
_sharedFrameworkSourceRoot)
.Execute()
.EnsureSuccessful();
// Clean up artifacts that dotnet-publish generates which we don't need
PublishMutationUtilties.CleanPublishOutput(
sharedFrameworkNameAndVersionRoot,
"framework",
deleteRuntimeConfigJson: true,
deleteDepsJson: false,
deleteAppHost: true);
// Rename the .deps file
var destinationDeps = Path.Combine(sharedFrameworkNameAndVersionRoot, $"{s_sharedFrameworkName}.deps.json");
File.Move(Path.Combine(sharedFrameworkNameAndVersionRoot, "framework.deps.json"), destinationDeps);
PublishMutationUtilties.ChangeEntryPointLibraryName(destinationDeps, null);
// Generate RID fallback graph
GenerateRuntimeGraph(dotnetCli, destinationDeps);
CopyHostArtifactsToSharedFramework(sharedFrameworkNameAndVersionRoot, hostFxrVersion);
_crossgenUtil.CrossgenDirectory(sharedFrameworkNameAndVersionRoot, sharedFrameworkNameAndVersionRoot);
// Generate .version file for sharedfx
var version = _sharedFrameworkNugetVersion;
var content = $@"{commitHash}{Environment.NewLine}{version}{Environment.NewLine}";
File.WriteAllText(Path.Combine(sharedFrameworkNameAndVersionRoot, ".version"), content);
return;
}
private void GenerateRuntimeGraph(DotNetCli dotnetCli, string destinationDeps)
{
string runtimeGraphGeneratorRuntime = null;
switch (RuntimeEnvironment.OperatingSystemPlatform)
{
case Platform.Windows:
runtimeGraphGeneratorRuntime = "win";
break;
case Platform.Linux:
runtimeGraphGeneratorRuntime = "linux";
break;
case Platform.Darwin:
runtimeGraphGeneratorRuntime = "osx";
break;
}
if (!string.IsNullOrEmpty(runtimeGraphGeneratorRuntime))
{
var runtimeGraphGeneratorName = "RuntimeGraphGenerator";
var runtimeGraphGeneratorProject = Path.Combine(Dirs.RepoRoot, "setuptools", "independent", runtimeGraphGeneratorName);
var runtimeGraphGeneratorOutput = Path.Combine(Dirs.Output, "setuptools", "independent", runtimeGraphGeneratorName);
dotnetCli.Publish(
"--output", runtimeGraphGeneratorOutput,
runtimeGraphGeneratorProject).Execute().EnsureSuccessful();
var runtimeGraphGeneratorExe = Path.Combine(runtimeGraphGeneratorOutput, $"{runtimeGraphGeneratorName}{Constants.ExeSuffix}");
Cmd(runtimeGraphGeneratorExe, "--project", _sharedFrameworkSourceRoot, "--deps", destinationDeps, runtimeGraphGeneratorRuntime)
.Execute()
.EnsureSuccessful();
}
else
{
throw new Exception($"Could not determine rid graph generation runtime for platform {RuntimeEnvironment.OperatingSystemPlatform}");
}
}
private void CopyHostArtifactsToSharedFramework(string sharedFrameworkNameAndVersionRoot, string hostFxrVersion)
{
File.Copy(
Path.Combine(_corehostLockedDirectory, HostArtifactNames.DotnetHostBaseName),
Path.Combine(sharedFrameworkNameAndVersionRoot, HostArtifactNames.DotnetHostBaseName), true);
File.Copy(
Path.Combine(_corehostLockedDirectory, HostArtifactNames.DotnetHostFxrBaseName),
Path.Combine(sharedFrameworkNameAndVersionRoot, HostArtifactNames.DotnetHostFxrBaseName), true);
// Hostpolicy should be the latest and not the locked version as it is supposed to evolve for
// the framework and has a tight coupling with coreclr's API in the framework.
File.Copy(
Path.Combine(_corehostLatestDirectory, HostArtifactNames.HostPolicyBaseName),
Path.Combine(sharedFrameworkNameAndVersionRoot, HostArtifactNames.HostPolicyBaseName), true);
}
private string GenerateSharedFrameworkProject(
string sharedFrameworkNugetVersion,
string sharedFrameworkTemplatePath,
string rid,
string targetFramework)
{
string sharedFrameworkProjectPath = Path.Combine(Dirs.Intermediate, "sharedFramework", "framework");
Utils.DeleteDirectory(sharedFrameworkProjectPath);
CopyRecursive(sharedFrameworkTemplatePath, sharedFrameworkProjectPath, true);
string templateFile = Path.Combine(sharedFrameworkProjectPath, "project.json.template");
JObject sharedFrameworkProject = JsonUtils.ReadProject(templateFile);
sharedFrameworkProject["dependencies"]["Microsoft.NETCore.App"] = sharedFrameworkNugetVersion;
((JObject)sharedFrameworkProject["runtimes"]).RemoveAll();
sharedFrameworkProject["runtimes"][rid] = new JObject();
((JObject)sharedFrameworkProject["frameworks"]).RemoveAll();
sharedFrameworkProject["frameworks"][targetFramework] = new JObject();
string projectJsonPath = Path.Combine(sharedFrameworkProjectPath, "project.json");
JsonUtils.WriteProject(sharedFrameworkProject, projectJsonPath);
Rm(templateFile);
return sharedFrameworkProjectPath;
}
}
}

Просмотреть файл

@ -1,150 +0,0 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
using Microsoft.DotNet.Cli.Build.Framework;
namespace Microsoft.DotNet.Cli.Build
{
public static class Utils
{
public static void CleanNuGetTempCache()
{
// Clean NuGet Temp Cache on Linux (seeing some issues on Linux)
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && Directory.Exists("/tmp/NuGet"))
{
Directory.Delete("/tmp/NuGet", recursive: true);
}
}
public static string GetOSName()
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
return "win";
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
return "osx";
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
throw new NotImplementedException();
}
else
{
throw new PlatformNotSupportedException();
}
}
// Generate a Version 5 (SHA1 Name Based) Guid from a name.
public static Guid GenerateGuidFromName(string name)
{
// Any fixed GUID will do for a namespace.
Guid namespaceId = new Guid("28F1468D-672B-489A-8E0C-7C5B3030630C");
using (SHA1 hasher = SHA1.Create())
{
var nameBytes = System.Text.Encoding.UTF8.GetBytes(name ?? string.Empty);
var namespaceBytes = namespaceId.ToByteArray();
SwapGuidByteOrder(namespaceBytes);
var streamToHash = new byte[namespaceBytes.Length + nameBytes.Length];
Array.Copy(namespaceBytes, streamToHash, namespaceBytes.Length);
Array.Copy(nameBytes, 0, streamToHash, namespaceBytes.Length, nameBytes.Length);
var hashResult = hasher.ComputeHash(streamToHash);
var res = new byte[16];
Array.Copy(hashResult, res, res.Length);
unchecked { res[6] = (byte)(0x50 | (res[6] & 0x0F)); }
unchecked { res[8] = (byte)(0x40 | (res[8] & 0x3F)); }
SwapGuidByteOrder(res);
return new Guid(res);
}
}
// Do a byte order swap, .NET GUIDs store multi byte components in little
// endian.
private static void SwapGuidByteOrder(byte[] b)
{
Swap(b, 0, 3);
Swap(b, 1, 2);
Swap(b, 5, 6);
Swap(b, 7, 8);
}
private static void Swap(byte[] b, int x, int y)
{
byte t = b[x];
b[x] = b[y];
b[y] = t;
}
public static void DeleteDirectory(string path)
{
if (Directory.Exists(path))
{
string[] files = Directory.GetFiles(path, "*", SearchOption.AllDirectories);
foreach (string file in files)
{
File.SetAttributes(file, FileAttributes.Normal);
File.Delete(file);
}
var retry = 5;
while (retry >= 0)
{
try
{
Directory.Delete(path, true);
return;
}
catch (IOException)
{
if (retry == 0)
{
throw;
}
System.Threading.Thread.Sleep(200);
retry--;
}
}
}
}
public static void CopyDirectoryRecursively(string path, string destination, bool keepParentDir = false)
{
if (keepParentDir)
{
path = path.TrimEnd(Path.DirectorySeparatorChar);
destination = Path.Combine(destination, Path.GetFileName(path));
Directory.CreateDirectory(destination);
}
foreach (var file in Directory.GetFiles(path, "*", SearchOption.AllDirectories))
{
string destFile = file.Replace(path, destination);
Directory.CreateDirectory(Path.GetDirectoryName(destFile));
File.Copy(file, destFile, true);
}
}
public static string GetVersionFileContent(string commitHash, string version)
{
return $@"{commitHash}{Environment.NewLine}{version}{Environment.NewLine}";
}
public static string GetSharedFrameworkVersionFileContent(BuildTargetContext c)
{
string SharedFrameworkNugetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
return $@"{c.BuildContext["CommitHash"]}{Environment.NewLine}{SharedFrameworkNugetVersion}{Environment.NewLine}";
}
}
}

Просмотреть файл

@ -1,44 +0,0 @@
using System.Collections.Generic;
namespace Microsoft.DotNet.Cli.Build
{
public abstract class Version
{
public virtual int Major { get; set; }
public virtual int Minor { get; set; }
public virtual int Patch { get; set; }
public virtual int CommitCount { get; set; }
public virtual string CommitCountString => CommitCount.ToString("000000");
public virtual string ReleaseSuffix { get; set; }
public string GenerateMsiVersion()
{
return GenerateMsiVersion(Major, Minor, Patch, CommitCount);
}
public static string GenerateMsiVersion(int Major, int Minor, int Patch, int CommitCount)
{
// MSI versioning
// Encode the CLI version to fit into the MSI versioning scheme - https://msdn.microsoft.com/en-us/library/windows/desktop/aa370859(v=vs.85).aspx
// MSI versions are 3 part
// major.minor.build
// Size(bits) of each part 8 8 16
// So we have 32 bits to encode the CLI version
// Starting with most significant bit this how the CLI version is going to be encoded as MSI Version
// CLI major -> 6 bits
// CLI minor -> 6 bits
// CLI patch -> 6 bits
// CLI commitcount -> 14 bits
var major = Major << 26;
var minor = Minor << 20;
var patch = Patch << 14;
var msiVersionNumber = major | minor | patch | CommitCount;
var msiMajor = (msiVersionNumber >> 24) & 0xFF;
var msiMinor = (msiVersionNumber >> 16) & 0xFF;
var msiBuild = msiVersionNumber & 0xFFFF;
return $"{msiMajor}.{msiMinor}.{msiBuild}";
}
}
}

Просмотреть файл

@ -1,22 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.DotNet.Cli.Build.Framework;
namespace Microsoft.DotNet.Cli.Build
{
public class YumDependencyUtility
{
public static bool PackageIsInstalled(string packageName)
{
var result = Command.Create("yum", "list", "installed", packageName)
.CaptureStdOut()
.CaptureStdErr()
.QuietBuildReporter()
.Execute();
return result.ExitCode == 0;
}
}
}

Просмотреть файл

@ -1,139 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
namespace Microsoft.DotNet.Cli.Build
{
public class VersionRepoUpdater
{
private static Regex s_nugetFileRegex = new Regex("^(?<id>.*?)\\.(?<version>([0-9]+\\.)?[0-9]+\\.[0-9]+(-(?<prerelease>[A-z0-9-]+))?)(?<symbols>\\.symbols)?\\.nupkg$");
private string _gitHubAuthToken;
private string _gitHubUser;
private string _gitHubEmail;
private string _versionsRepoOwner;
private string _versionsRepo;
public VersionRepoUpdater(
string gitHubAuthToken,
string gitHubUser = null,
string gitHubEmail = null,
string versionRepoOwner = null,
string versionsRepo = null)
{
if (string.IsNullOrEmpty(gitHubAuthToken))
{
throw new ArgumentNullException(nameof(gitHubAuthToken));
}
_gitHubAuthToken = gitHubAuthToken;
_gitHubUser = gitHubUser ?? "dotnet-bot";
_gitHubEmail = gitHubEmail ?? "dotnet-bot@microsoft.com";
_versionsRepoOwner = versionRepoOwner ?? "dotnet";
_versionsRepo = versionsRepo ?? "versions";
}
public async Task UpdatePublishedVersions(string nupkgFilePath, string versionsRepoPath)
{
List<NuGetPackageInfo> publishedPackages = GetPackageInfo(nupkgFilePath);
string packageInfoFileContent = string.Join(
Environment.NewLine,
publishedPackages
.OrderBy(t => t.Id)
.Select(t => $"{t.Id} {t.Version}"));
string prereleaseVersion = publishedPackages
.Where(t => !string.IsNullOrEmpty(t.Prerelease))
.Select(t => t.Prerelease)
.FirstOrDefault();
string packageInfoFilePath = $"{versionsRepoPath}_Packages.txt";
string message = $"Adding package info to {packageInfoFilePath} for {prereleaseVersion}";
await UpdateGitHubFile(packageInfoFilePath, packageInfoFileContent, message);
}
private static List<NuGetPackageInfo> GetPackageInfo(string nupkgFilePath)
{
List<NuGetPackageInfo> packages = new List<NuGetPackageInfo>();
foreach (string filePath in Directory.GetFiles(nupkgFilePath, "*.nupkg"))
{
Match match = s_nugetFileRegex.Match(Path.GetFileName(filePath));
// only look for non-symbols packages
if (string.IsNullOrEmpty(match.Groups["symbols"].Value))
{
packages.Add(new NuGetPackageInfo()
{
Id = match.Groups["id"].Value,
Version = match.Groups["version"].Value,
Prerelease = match.Groups["prerelease"].Value,
});
}
}
return packages;
}
private async Task UpdateGitHubFile(string path, string newFileContent, string commitMessage)
{
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Accept", "application/vnd.github.v3+json");
client.DefaultRequestHeaders.Add("Authorization", $"token {_gitHubAuthToken}");
client.DefaultRequestHeaders.Add("User-Agent", _gitHubUser);
string fileUrl = $"https://api.github.com/repos/{_versionsRepoOwner}/{_versionsRepo}/contents/{path}";
Console.WriteLine($"Getting the 'sha' of the current contents of file '{_versionsRepoOwner}/{_versionsRepo}/{path}'");
string currentFile = await client.GetStringAsync(fileUrl);
string currentSha = JObject.Parse(currentFile)["sha"].ToString();
Console.WriteLine($"Got 'sha' value of '{currentSha}'");
Console.WriteLine($"Request to update file '{_versionsRepoOwner}/{_versionsRepo}/{path}' contents to:");
Console.WriteLine(newFileContent);
string updateFileBody = $@"{{
""message"": ""{commitMessage}"",
""committer"": {{
""name"": ""{_gitHubUser}"",
""email"": ""{_gitHubEmail}""
}},
""content"": ""{ToBase64(newFileContent)}"",
""sha"": ""{currentSha}""
}}";
Console.WriteLine("Sending request...");
StringContent content = new StringContent(updateFileBody);
using (HttpResponseMessage response = await client.PutAsync(fileUrl, content))
{
response.EnsureSuccessStatusCode();
Console.WriteLine("Updated the file successfully...");
}
}
}
private static string ToBase64(string value)
{
return Convert.ToBase64String(Encoding.UTF8.GetBytes(value));
}
private class NuGetPackageInfo
{
public string Id { get; set; }
public string Version { get; set; }
public string Prerelease { get; set; }
}
}
}

Просмотреть файл

@ -1,24 +0,0 @@
{
"version": "1.0.0-*",
"description": "Build scripts for dotnet-cli",
"dependencies": {
"NETStandard.Library": "1.6.1-beta-24506-02",
"Microsoft.CSharp": "4.0.1",
"System.Dynamic.Runtime": "4.0.11",
"System.Reflection.Metadata": "1.3.0",
"System.Runtime.Serialization.Primitives": "4.1.1",
"System.Xml.XmlSerializer": "4.0.11",
"WindowsAzure.Storage": "6.2.2-preview",
"Microsoft.DotNet.Cli.Build.Framework": {
"target": "project"
}
},
"frameworks": {
"netstandard1.6": {
"imports": [
"dnxcore50",
"portable-net45+win8"
]
}
}
}

Просмотреть файл

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0.25123" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0.25123</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>b768bd29-12bf-4c7c-b093-03193fe244d1</ProjectGuid>
<RootNamespace>Microsoft.DotNet.Cli.Build</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin</OutputPath>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>

Просмотреть файл

@ -1,30 +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.Collections.Generic;
using Microsoft.DotNet.Cli.Build.Framework;
namespace Microsoft.DotNet.Scripts
{
public static class BuildContextProperties
{
public static List<DependencyInfo> GetDependencyInfos(this BuildTargetContext c)
{
const string propertyName = "DependencyInfos";
List<DependencyInfo> dependencyInfos;
object dependencyInfosObj;
if (c.BuildContext.Properties.TryGetValue(propertyName, out dependencyInfosObj))
{
dependencyInfos = (List<DependencyInfo>)dependencyInfosObj;
}
else
{
dependencyInfos = new List<DependencyInfo>();
c.BuildContext[propertyName] = dependencyInfos;
}
return dependencyInfos;
}
}
}

Просмотреть файл

@ -1,88 +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 Microsoft.DotNet.Cli.Build;
using Microsoft.DotNet.Cli.Build.Framework;
namespace Microsoft.DotNet.Scripts
{
/// <summary>
/// Holds the configuration information for the update-dependencies script.
/// </summary>
/// <remarks>
/// The following Environment Variables are required by this script:
///
/// GITHUB_USER - The user to commit the changes as.
/// GITHUB_EMAIL - The user's email to commit the changes as.
/// GITHUB_PASSWORD - The password/personal access token of the GitHub user.
///
/// The following Environment Variables can optionally be specified:
///
/// COREFX_VERSION_URL - The Url to get the current CoreFx version. (ex. "https://raw.githubusercontent.com/dotnet/versions/master/build-info/dotnet/corefx/master/Latest_Packages.txt")
/// CORECLR_VERSION_URL - The Url to get the current CoreCLR version. (ex. "https://raw.githubusercontent.com/dotnet/versions/master/build-info/dotnet/coreclr/master/Latest_Packages.txt")
/// ROSLYN_VERSION_URL - The Url to get the current Roslyn version. (ex. "https://raw.githubusercontent.com/dotnet/versions/master/build-info/dotnet/roslyn/netcore1.0/Latest_Packages.txt")
/// GITHUB_ORIGIN_OWNER - The owner of the GitHub fork to push the commit and create the PR from. (ex. "dotnet-bot")
/// GITHUB_UPSTREAM_OWNER - The owner of the GitHub base repo to create the PR to. (ex. "dotnet")
/// GITHUB_PROJECT - The repo name under the ORIGIN and UPSTREAM owners. (ex. "cli")
/// GITHUB_UPSTREAM_BRANCH - The branch in the GitHub base repo to create the PR to. (ex. "rel/1.0.0")
/// GITHUB_PULL_REQUEST_NOTIFICATIONS - A semi-colon ';' separated list of GitHub users to notify on the PR.
/// </remarks>
public class Config
{
public static Config Instance { get; } = new Config();
private static BranchInfo s_branchInfo = new BranchInfo(Dirs.RepoRoot);
private Lazy<string> _userName = new Lazy<string>(() => GetEnvironmentVariable("GITHUB_USER"));
private Lazy<string> _email = new Lazy<string>(() => GetEnvironmentVariable("GITHUB_EMAIL"));
private Lazy<string> _password = new Lazy<string>(() => GetEnvironmentVariable("GITHUB_PASSWORD"));
private Lazy<string> _coreFxVersionUrl = new Lazy<string>(() => GetEnvironmentVariable("COREFX_VERSION_URL", "https://raw.githubusercontent.com/dotnet/versions/master/build-info/dotnet/corefx/master/Latest_Packages.txt"));
private Lazy<string> _coreClrVersionUrl = new Lazy<string>(() => GetEnvironmentVariable("CORECLR_VERSION_URL", "https://raw.githubusercontent.com/dotnet/versions/master/build-info/dotnet/coreclr/master/Latest_Packages.txt"));
private Lazy<string> _roslynVersionUrl = new Lazy<string>(() => GetEnvironmentVariable("ROSLYN_VERSION_URL", "https://raw.githubusercontent.com/dotnet/versions/master/build-info/dotnet/roslyn/netcore1.0/Latest_Packages.txt"));
private Lazy<string> _standardVersionUrl = new Lazy<string>(() => GetEnvironmentVariable("STANDARD_VERSION_URL", "https://raw.githubusercontent.com/dotnet/versions/master/build-info/dotnet/standard/master/Latest_Packages.txt"));
private Lazy<string> _libuvVersionUrl = new Lazy<string>(() => GetEnvironmentVariable("LIBUV_VERSION_URL", string.Empty));
private Lazy<string> _gitHubOriginOwner;
private Lazy<string> _gitHubUpstreamOwner = new Lazy<string>(() => GetEnvironmentVariable("GITHUB_UPSTREAM_OWNER", "dotnet"));
private Lazy<string> _gitHubProject = new Lazy<string>(() => GetEnvironmentVariable("GITHUB_PROJECT", "core-setup"));
private Lazy<string> _gitHubUpstreamBranch = new Lazy<string>(() => GetEnvironmentVariable("GITHUB_UPSTREAM_BRANCH", s_branchInfo.Entries["BRANCH_NAME"]));
private Lazy<string[]> _gitHubPullRequestNotifications = new Lazy<string[]>(() =>
GetEnvironmentVariable("GITHUB_PULL_REQUEST_NOTIFICATIONS", "")
.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries));
private Config()
{
_gitHubOriginOwner = new Lazy<string>(() => GetEnvironmentVariable("GITHUB_ORIGIN_OWNER", UserName));
}
public string UserName => _userName.Value;
public string Email => _email.Value;
public string Password => _password.Value;
public string CoreFxVersionUrl => _coreFxVersionUrl.Value;
public string CoreClrVersionUrl => _coreClrVersionUrl.Value;
public string RoslynVersionUrl => _roslynVersionUrl.Value;
public string StandardVersionUrl => _standardVersionUrl.Value;
public string LibuvVersionUrl => _libuvVersionUrl.Value;
public string GitHubOriginOwner => _gitHubOriginOwner.Value;
public string GitHubUpstreamOwner => _gitHubUpstreamOwner.Value;
public string GitHubProject => _gitHubProject.Value;
public string GitHubUpstreamBranch => _gitHubUpstreamBranch.Value;
public string[] GitHubPullRequestNotifications => _gitHubPullRequestNotifications.Value;
private static string GetEnvironmentVariable(string name, string defaultValue = null)
{
string value = Environment.GetEnvironmentVariable(name);
if (value == null)
{
value = defaultValue;
}
if (value == null)
{
throw new BuildFailureException($"Can't find environment variable '{name}'.");
}
return value;
}
}
}

Просмотреть файл

@ -1,23 +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.Collections.Generic;
using NuGet.Versioning;
namespace Microsoft.DotNet.Scripts
{
public class DependencyInfo
{
public string Name { get; set; }
public List<PackageInfo> NewVersions { get; set; }
public string NewReleaseVersion { get; set; }
public bool IsUpdated { get; set; }
}
public class PackageInfo
{
public string Id { get; set; }
public NuGetVersion Version { get; set; }
}
}

Просмотреть файл

@ -1,15 +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.IO;
namespace Microsoft.DotNet.Scripts
{
public static class Dirs
{
public static readonly string RepoRoot = Directory.GetCurrentDirectory();
public static readonly string Pkg = Path.Combine(RepoRoot, "pkg");
public static readonly string PkgProjects = Path.Combine(Pkg, "projects");
public static readonly string PkgDeps = Path.Combine(Pkg, "deps");
}
}

Просмотреть файл

@ -1,25 +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 Microsoft.DotNet.Cli.Build.Framework;
namespace Microsoft.DotNet.Scripts
{
public class Program
{
public static int Main(string[] args)
{
DebugHelper.HandleDebugSwitch(ref args);
return BuildSetup.Create(".NET core-setup Dependency Updater")
.UseTargets(new[]
{
new BuildTarget("Default", "Dependency Updater Goals", new [] { "UpdateFiles", "PushPR" }),
new BuildTarget("UpdateFiles", "Dependency Updater Goals"),
new BuildTarget("PushPR", "Dependency Updater Goals"),
})
.UseAllTargetsFromAssembly<Program>()
.Run(args);
}
}
}

Просмотреть файл

@ -1,162 +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.Linq;
using Microsoft.DotNet.Cli.Build.Framework;
using Octokit;
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
namespace Microsoft.DotNet.Scripts
{
/// <summary>
/// Creates a GitHub Pull Request for the current changes in the repo.
/// </summary>
public static class PushPRTargets
{
private static readonly Config s_config = Config.Instance;
[Target(nameof(CommitChanges), nameof(CreatePR))]
public static BuildTargetResult PushPR(BuildTargetContext c) => c.Success();
/// <summary>
/// Commits all the current changes in the repo and pushes the commit to a remote
/// so a PR can be created for it.
/// </summary>
[Target]
public static BuildTargetResult CommitChanges(BuildTargetContext c)
{
CommandResult statusResult = Cmd("git", "status", "--porcelain")
.CaptureStdOut()
.Execute();
statusResult.EnsureSuccessful();
bool hasModifiedFiles = !string.IsNullOrWhiteSpace(statusResult.StdOut);
bool hasUpdatedDependencies = c.GetDependencyInfos().Where(d => d.IsUpdated).Any();
if (hasModifiedFiles != hasUpdatedDependencies)
{
return c.Failed($"'git status' does not match DependencyInfo information. Git has modified files: {hasModifiedFiles}. DependencyInfo is updated: {hasUpdatedDependencies}.");
}
if (!hasUpdatedDependencies)
{
c.Warn("Dependencies are currently up to date");
return c.Success();
}
string userName = s_config.UserName;
string email = s_config.Email;
string commitMessage = GetCommitMessage(c);
Cmd("git", "commit", "-a", "-m", commitMessage, "--author", $"{userName} <{email}>")
.EnvironmentVariable("GIT_COMMITTER_NAME", userName)
.EnvironmentVariable("GIT_COMMITTER_EMAIL", email)
.Execute()
.EnsureSuccessful();
string remoteUrl = $"github.com/{s_config.GitHubOriginOwner}/{s_config.GitHubProject}.git";
string remoteBranchName = $"UpdateDependencies{DateTime.UtcNow.ToString("yyyyMMddhhmmss")}";
string refSpec = $"HEAD:refs/heads/{remoteBranchName}";
string logMessage = $"git push https://{remoteUrl} {refSpec}";
BuildReporter.BeginSection("EXEC", logMessage);
CommandResult pushResult =
Cmd("git", "push", $"https://{userName}:{s_config.Password}@{remoteUrl}", refSpec)
.QuietBuildReporter() // we don't want secrets showing up in our logs
.CaptureStdErr() // git push will write to StdErr upon success, disable that
.CaptureStdOut()
.Execute();
var message = logMessage + $" exited with {pushResult.ExitCode}";
if (pushResult.ExitCode == 0)
{
BuildReporter.EndSection("EXEC", message.Green(), success: true);
}
else
{
BuildReporter.EndSection("EXEC", message.Red().Bold(), success: false);
}
pushResult.EnsureSuccessful(suppressOutput: true);
c.SetRemoteBranchName(remoteBranchName);
return c.Success();
}
/// <summary>
/// Creates a GitHub PR for the remote branch created above.
/// </summary>
[Target]
public static BuildTargetResult CreatePR(BuildTargetContext c)
{
string remoteBranchName = c.GetRemoteBranchName();
string commitMessage = c.GetCommitMessage();
NewPullRequest prInfo = new NewPullRequest(
$"[{s_config.GitHubUpstreamBranch}] {commitMessage}",
s_config.GitHubOriginOwner + ":" + remoteBranchName,
s_config.GitHubUpstreamBranch);
string[] prNotifications = s_config.GitHubPullRequestNotifications;
if (prNotifications.Length > 0)
{
prInfo.Body = $"/cc @{string.Join(" @", prNotifications)}";
}
GitHubClient gitHub = new GitHubClient(new ProductHeaderValue("dotnetDependencyUpdater"));
gitHub.Credentials = new Credentials(s_config.Password);
PullRequest createdPR = gitHub.PullRequest.Create(s_config.GitHubUpstreamOwner, s_config.GitHubProject, prInfo).Result;
c.Info($"Created Pull Request: {createdPR.HtmlUrl}");
return c.Success();
}
private static string GetRemoteBranchName(this BuildTargetContext c)
{
return (string)c.BuildContext["RemoteBranchName"];
}
private static void SetRemoteBranchName(this BuildTargetContext c, string value)
{
c.BuildContext["RemoteBranchName"] = value;
}
private static string GetCommitMessage(this BuildTargetContext c)
{
const string commitMessagePropertyName = "CommitMessage";
string message;
object messageObject;
if (c.BuildContext.Properties.TryGetValue(commitMessagePropertyName, out messageObject))
{
message = (string)messageObject;
}
else
{
DependencyInfo[] updatedDependencies = c.GetDependencyInfos()
.Where(d => d.IsUpdated)
.ToArray();
string updatedDependencyNames = string.Join(", ", updatedDependencies.Select(d => d.Name));
string updatedDependencyVersions = string.Join(", ", updatedDependencies.Select(d => d.NewReleaseVersion));
message = $"Updating {updatedDependencyNames} to {updatedDependencyVersions}";
if (updatedDependencies.Count() > 1)
{
message += " respectively";
}
c.BuildContext[commitMessagePropertyName] = message;
}
return message;
}
}
}

Просмотреть файл

@ -1,308 +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.IO;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Microsoft.DotNet.Cli.Build.Framework;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using NuGet.Versioning;
namespace Microsoft.DotNet.Scripts
{
public static class UpdateFilesTargets
{
private static HttpClient s_client = new HttpClient();
private static readonly string FileUrlScheme = "file://";
[Target(nameof(GetDependencies), nameof(ReplaceVersions))]
public static BuildTargetResult UpdateFiles(BuildTargetContext c) => c.Success();
/// <summary>
/// Gets all the dependency information and puts it in the build properties.
/// </summary>
[Target]
public static BuildTargetResult GetDependencies(BuildTargetContext c)
{
List<DependencyInfo> dependencyInfos = c.GetDependencyInfos();
dependencyInfos.Add(CreateDependencyInfo("CoreFx", Config.Instance.CoreFxVersionUrl).Result);
dependencyInfos.Add(CreateDependencyInfo("CoreClr", Config.Instance.CoreClrVersionUrl).Result);
dependencyInfos.Add(CreateDependencyInfo("Roslyn", Config.Instance.RoslynVersionUrl).Result);
if (Config.Instance.StandardVersionUrl != string.Empty)
{
dependencyInfos.Add(CreateDependencyInfo("Standard", Config.Instance.StandardVersionUrl).Result);
}
if (Config.Instance.LibuvVersionUrl != string.Empty)
{
dependencyInfos.Add(CreateDependencyInfo("Libuv", Config.Instance.LibuvVersionUrl).Result);
}
return c.Success();
}
private static async Task<DependencyInfo> CreateDependencyInfo(string name, string packageVersionsUrl)
{
List<PackageInfo> newPackageVersions = new List<PackageInfo>();
using (Stream versionsStream = packageVersionsUrl.StartsWith(FileUrlScheme, StringComparison.Ordinal) ? File.OpenRead(packageVersionsUrl.Substring(FileUrlScheme.Length)) : await s_client.GetStreamAsync(packageVersionsUrl))
using (StreamReader reader = new StreamReader(versionsStream))
{
string currentLine;
while ((currentLine = await reader.ReadLineAsync()) != null)
{
int spaceIndex = currentLine.IndexOf(' ');
newPackageVersions.Add(new PackageInfo()
{
Id = currentLine.Substring(0, spaceIndex),
Version = new NuGetVersion(currentLine.Substring(spaceIndex + 1))
});
}
}
string newReleaseVersion = newPackageVersions
.Where(p => p.Version.IsPrerelease)
.Select(p => p.Version.Release)
.FirstOrDefault()
??
// if there are no prerelease versions, just grab the first version
newPackageVersions
.Select(p => p.Version.ToNormalizedString())
.FirstOrDefault();
return new DependencyInfo()
{
Name = name,
NewVersions = newPackageVersions,
NewReleaseVersion = newReleaseVersion
};
}
[Target(nameof(ReplaceProjectJson), nameof(ReplaceDependencyVersions), nameof(ReplaceCoreHostPackaging))]
public static BuildTargetResult ReplaceVersions(BuildTargetContext c) => c.Success();
/// <summary>
/// Replaces all the dependency versions in the project.json files.
/// </summary>
[Target]
public static BuildTargetResult ReplaceProjectJson(BuildTargetContext c)
{
List<DependencyInfo> dependencyInfos = c.GetDependencyInfos();
var projectJsonFiles = new List<string>
{
Path.Combine(Dirs.PkgProjects, "Microsoft.NETCore.App", "project.json.template"),
Path.Combine(Dirs.PkgDeps, "project.json")
};
//projectJsonFiles.AddRange(Directory.GetFiles(Dirs.RepoRoot, "project.json", SearchOption.AllDirectories));
JObject projectRoot;
foreach (string projectJsonFile in projectJsonFiles)
{
try
{
projectRoot = ReadProject(projectJsonFile);
}
catch (Exception e)
{
c.Warn($"Non-fatal exception occurred reading '{projectJsonFile}'. Skipping file. Exception: {e}. ");
continue;
}
if (projectRoot == null)
{
c.Warn($"A non valid JSON file was encountered '{projectJsonFile}'. Skipping file.");
continue;
}
bool changedAnyPackage = FindAllDependencyProperties(projectRoot)
.Select(dependencyProperty => ReplaceDependencyVersion(dependencyProperty, dependencyInfos))
.ToArray()
.Any(shouldWrite => shouldWrite);
if (changedAnyPackage)
{
c.Info($"Writing changes to {projectJsonFile}");
WriteProject(projectRoot, projectJsonFile);
}
}
return c.Success();
}
/// <summary>
/// Replaces the single dependency with the updated version, if it matches any of the dependencies that need to be updated.
/// </summary>
private static bool ReplaceDependencyVersion(JProperty dependencyProperty, List<DependencyInfo> dependencyInfos)
{
string id = dependencyProperty.Name;
foreach (DependencyInfo dependencyInfo in dependencyInfos)
{
foreach (PackageInfo packageInfo in dependencyInfo.NewVersions)
{
if (id == packageInfo.Id)
{
string oldVersion;
if (dependencyProperty.Value is JObject)
{
oldVersion = (string)dependencyProperty.Value["version"];
}
else
{
oldVersion = (string)dependencyProperty.Value;
}
string newVersion = packageInfo.Version.ToNormalizedString();
if (oldVersion != newVersion)
{
if (dependencyProperty.Value is JObject)
{
dependencyProperty.Value["version"] = newVersion;
}
else
{
dependencyProperty.Value = newVersion;
}
// mark the DependencyInfo as updated so we can tell which dependencies were updated
dependencyInfo.IsUpdated = true;
return true;
}
}
}
}
return false;
}
private static JObject ReadProject(string projectJsonPath)
{
using (TextReader projectFileReader = File.OpenText(projectJsonPath))
{
var projectJsonReader = new JsonTextReader(projectFileReader);
var serializer = new JsonSerializer();
return serializer.Deserialize<JObject>(projectJsonReader);
}
}
private static void WriteProject(JObject projectRoot, string projectJsonPath)
{
string projectJson = JsonConvert.SerializeObject(projectRoot, Formatting.Indented);
File.WriteAllText(projectJsonPath, projectJson + Environment.NewLine);
}
private static IEnumerable<JProperty> FindAllDependencyProperties(JObject projectJsonRoot)
{
return projectJsonRoot
.Descendants()
.OfType<JProperty>()
.Where(property => property.Name == "dependencies")
.Select(property => property.Value)
.SelectMany(o => o.Children<JProperty>());
}
/// <summary>
/// Replaces version numbers hard-coded in DependencyVersions.cs.
/// </summary>
[Target]
public static BuildTargetResult ReplaceDependencyVersions(BuildTargetContext c)
{
ReplaceFileContents(Path.Combine("build_projects", "shared-build-targets-utils", "DependencyVersions.cs"), fileContents =>
{
fileContents = ReplaceDependencyVersion(c, fileContents, "CoreCLRVersion", "Microsoft.NETCore.Runtime.CoreCLR");
fileContents = ReplaceDependencyVersion(c, fileContents, "JitVersion", "Microsoft.NETCore.Jit");
return fileContents;
});
return c.Success();
}
private static string ReplaceDependencyVersion(BuildTargetContext c, string fileContents, string dependencyPropertyName, string packageId)
{
Regex regex = new Regex($@"{dependencyPropertyName} = ""(?<version>.*)"";");
string newVersion = c.GetNewVersion(packageId);
if (newVersion != null)
{
fileContents = regex.ReplaceGroupValue(fileContents, "version", newVersion);
}
return fileContents;
}
/// <summary>
/// Replaces version number that is hard-coded in the corehost packaging dir.props file.
/// </summary>
[Target]
public static BuildTargetResult ReplaceCoreHostPackaging(BuildTargetContext c)
{
ReplaceFileContents(Path.Combine("pkg", "dir.props"), contents =>
{
Regex regex = new Regex(@"Microsoft\.NETCore\.Platforms\\(?<version>.*)\\runtime\.json");
string newNetCorePlatformsVersion = c.GetNewVersion("Microsoft.NETCore.Platforms");
if (newNetCorePlatformsVersion != null)
{
contents = regex.ReplaceGroupValue(contents, "version", newNetCorePlatformsVersion);
}
return contents;
});
return c.Success();
}
private static string GetNewVersion(this BuildTargetContext c, string packageId)
{
string newVersion = c.GetDependencyInfos()
.SelectMany(d => d.NewVersions)
.FirstOrDefault(p => p.Id == packageId)
?.Version
.ToNormalizedString();
if (string.IsNullOrEmpty(newVersion))
{
c.Info($"Could not find package version information for '{packageId}'");
return null;
}
return newVersion;
}
private static void ReplaceFileContents(string repoRelativePath, Func<string, string> replacement)
{
string fullPath = Path.Combine(Dirs.RepoRoot, repoRelativePath);
string contents = File.ReadAllText(fullPath);
contents = replacement(contents);
File.WriteAllText(fullPath, contents, Encoding.UTF8);
}
private static string ReplaceGroupValue(this Regex regex, string input, string groupName, string newValue)
{
return regex.Replace(input, m =>
{
string replacedValue = m.Value;
Group group = m.Groups[groupName];
int startIndex = group.Index - m.Index;
replacedValue = replacedValue.Remove(startIndex, group.Length);
replacedValue = replacedValue.Insert(startIndex, newValue);
return replacedValue;
});
}
}
}

Просмотреть файл

@ -1,31 +0,0 @@
{
"version": "1.0.0-*",
"description": "Updates the repos dependencies",
"buildOptions": {
"emitEntryPoint": true
},
"dependencies": {
"NETStandard.Library": "1.6.1-beta-24506-02",
"Microsoft.CSharp": "4.0.1",
"Microsoft.NETCore.Runtime.CoreCLR": "1.1.0-beta-24507-05",
"System.Runtime.Serialization.Primitives": "4.1.1",
"Microsoft.DotNet.Cli.Build.Framework": {
"target": "project"
},
"shared-build-targets-utils": {
"target": "project"
},
"NuGet.Versioning": "3.5.0-rc-1285",
"Newtonsoft.Json": "7.0.1",
"Octokit": "0.18.0",
"Microsoft.Net.Http": "2.2.29"
},
"frameworks": {
"netcoreapp1.0": {
"imports": [
"dnxcore50",
"portable-net45+win"
]
}
}
}

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше