diff --git a/Microsoft.DotNet.Cli.sln b/Microsoft.DotNet.Cli.sln
index 3733528eb..271579431 100644
--- a/Microsoft.DotNet.Cli.sln
+++ b/Microsoft.DotNet.Cli.sln
@@ -147,8 +147,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.TestFramew
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "redist", "src\redist\redist.csproj", "{098D9321-1201-4974-A75E-F58EBCD98ACF}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tool_roslyn", "src\tool_roslyn\tool_roslyn.csproj", "{A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tool_msbuild", "src\tool_msbuild\tool_msbuild.csproj", "{D82A3246-9831-4024-A9B2-1932EEF3D56F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tool_nuget", "src\tool_nuget\tool_nuget.csproj", "{BE4C655A-DC54-4408-B739-743456D34111}"
@@ -705,30 +703,6 @@ Global
{098D9321-1201-4974-A75E-F58EBCD98ACF}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
{098D9321-1201-4974-A75E-F58EBCD98ACF}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
{098D9321-1201-4974-A75E-F58EBCD98ACF}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
- {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Debug|x64.ActiveCfg = Release|Any CPU
- {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Debug|x64.Build.0 = Release|Any CPU
- {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Debug|x86.ActiveCfg = Release|Any CPU
- {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Debug|x86.Build.0 = Release|Any CPU
- {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.MinSizeRel|Any CPU.ActiveCfg = Release|Any CPU
- {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.MinSizeRel|Any CPU.Build.0 = Release|Any CPU
- {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.MinSizeRel|x64.ActiveCfg = Release|Any CPU
- {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.MinSizeRel|x64.Build.0 = Release|Any CPU
- {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.MinSizeRel|x86.ActiveCfg = Release|Any CPU
- {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.MinSizeRel|x86.Build.0 = Release|Any CPU
- {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Release|Any CPU.Build.0 = Release|Any CPU
- {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Release|x64.ActiveCfg = Release|Any CPU
- {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Release|x64.Build.0 = Release|Any CPU
- {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Release|x86.ActiveCfg = Release|Any CPU
- {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Release|x86.Build.0 = Release|Any CPU
- {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
- {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
- {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
- {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
- {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
- {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
{D82A3246-9831-4024-A9B2-1932EEF3D56F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D82A3246-9831-4024-A9B2-1932EEF3D56F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D82A3246-9831-4024-A9B2-1932EEF3D56F}.Debug|x64.ActiveCfg = Release|Any CPU
@@ -1625,7 +1599,6 @@ Global
{570950AD-A080-4F32-980C-F50E312910DF} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
{6592A22C-2386-4E83-A4D3-FC08075C723A} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
{098D9321-1201-4974-A75E-F58EBCD98ACF} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
- {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
{D82A3246-9831-4024-A9B2-1932EEF3D56F} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
{BE4C655A-DC54-4408-B739-743456D34111} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
{2DFCC95F-75F7-46E1-8F56-256DB4CA98B2} = {0722D325-24C8-4E83-B5AF-0A083E7F0749}
diff --git a/README.md b/README.md
index 19775f4d4..b7981d26c 100644
--- a/README.md
+++ b/README.md
@@ -9,8 +9,8 @@ Looking for V1 of the .NET Core tooling?
If you are looking for the v1.0.1 release of the .NET Core tools (CLI, MSBuild and the new csproj), see https://dot.net/core.
-> **Note:** the release/2.0.0 branch of the CLI repo is based on the upcoming v2 of .NET Core and is considered pre-release. For production-level usage, use
-> v1 of the tools.
+> **Note:** the release/2.0.0 branch of the CLI repo is based on an upcoming update of the SDK and is considered pre-release. For production-level usage, please use the
+> released version of the tools available at https://dot.net/core
Found an issue?
---------------
@@ -88,11 +88,10 @@ Reference notes:
> **1**: *Our Debian 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 the [corresponding Host, Host FX Resolver, and Shared Framework packages](https://github.com/dotnet/core-setup#daily-builds) before installing the Sdk package.*
>
**2**: *A 'coherent' build is defined as a build where the Runtime version matches between the CLI and Asp.NET.*
-
-[version]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.0.0/latest.version
-[coherent-version]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.0.0/latest.coherent.version
[comment]: # (The latest versions are always the same across all platforms. Just need one to show, so picking win-x64's svg.)
+[version]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.0.0/latest.version
[version-badge]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.0.0/win_x64_Release_version_badge.svg
+[coherent-version]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.0.0/latest.coherent.version
[coherent-version-badge]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.0.0/win_x86_Release_coherent_badge.svg
[win-x64-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.0.0/dotnet-sdk-latest-win-x64.exe
diff --git a/TestAssets/TestProjects/MSBuildIntegration/build.proj b/TestAssets/TestProjects/MSBuildIntegration/build.proj
index 203f96df3..8b2a7851e 100644
--- a/TestAssets/TestProjects/MSBuildIntegration/build.proj
+++ b/TestAssets/TestProjects/MSBuildIntegration/build.proj
@@ -29,9 +29,6 @@
-
-
diff --git a/build/Branding.props b/build/Branding.props
index c4be46ed9..9a66fdc2d 100644
--- a/build/Branding.props
+++ b/build/Branding.props
@@ -1,6 +1,6 @@
- Microsoft .NET Core SDK - 2.0.1
+ Microsoft .NET Core SDK - 2.0.3.NET Standard Support for Visual Studio 2015Microsoft .NET Core Runtime - 2.0.1Microsoft .NET Core Host - 2.0.1
diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props
index 9424c7232..ab6b45f75 100644
--- a/build/DependencyVersions.props
+++ b/build/DependencyVersions.props
@@ -1,23 +1,23 @@
- 2.0.1-servicing-25623-05
- 15.3.409
- 2.3.2-beta1-61921-05
+ 2.0.0
+ 15.5.0-preview-000113-1032064
+ 2.6.0-beta1-62126-012.3.0-pre-20170727-11.6.0-beta2-25304
- 4.2.0-rc-170630-0
+ 4.2.0-rtm-170926-04.4.1-pre-20170727-1
- 2.0.0-preview3-20170804-1
+ 2.0.1-servicing-20170926-1$(CLI_NETSDK_Version)
- 4.3.0-rtm-4382
+ 4.4.0-preview3-44752.0.0-preview3-25514-04
- 2.0.0-rel-20170815-630
+ 2.0.0-rel-20170908-65315.3.0-preview-20170628-02$(CLI_SharedFrameworkVersion)$(CLI_SharedFrameworkVersion)
diff --git a/build/Publish.targets b/build/Publish.targets
index 2fb513838..bc9a387b6 100644
--- a/build/Publish.targets
+++ b/build/Publish.targets
@@ -34,7 +34,11 @@
+ Condition=" '$(PUBLISH_NUPKG_TO_AZURE_BLOB)' != '' AND '$(OS)' == 'Windows_NT' And '$(Architecture)' == 'x64' "/>
+
+
diff --git a/build/Signing.proj b/build/Signing.proj
index e3bef0122..d3eebb140 100644
--- a/build/Signing.proj
+++ b/build/Signing.proj
@@ -38,14 +38,23 @@
$(InternalCertificateId)
diff --git a/build/Version.props b/build/Version.props
index 156ece688..2f7ba1395 100644
--- a/build/Version.props
+++ b/build/Version.props
@@ -2,7 +2,7 @@
20
- 1
+ 3servicing$(VersionMajor).$(VersionMinor).$(VersionPatch)-$(ReleaseSuffix)
diff --git a/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage2.proj b/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage2.proj
index 1493128e7..cb833d480 100644
--- a/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage2.proj
+++ b/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage2.proj
@@ -7,8 +7,6 @@
falsetrue
- false
- truefalsetrue
diff --git a/build_projects/dotnet-cli-build/CheckIfAllBuildsHavePublished.cs b/build_projects/dotnet-cli-build/CheckIfAllBuildsHavePublished.cs
index 67b3ec6fe..1dfb0b3de 100644
--- a/build_projects/dotnet-cli-build/CheckIfAllBuildsHavePublished.cs
+++ b/build_projects/dotnet-cli-build/CheckIfAllBuildsHavePublished.cs
@@ -56,7 +56,6 @@ namespace Microsoft.DotNet.Cli.Build
{ "rhel_7_x64", false },
{ "ubuntu_14_04_x64", false },
{ "ubuntu_16_04_x64", false },
- { "ubuntu_16_10_x64", false },
{ "linux_x64", false }
};
diff --git a/netci.groovy b/netci.groovy
index f41a78758..ca09235d7 100644
--- a/netci.groovy
+++ b/netci.groovy
@@ -9,7 +9,7 @@ def project = GithubProject
def branch = GithubBranchName
def isPR = true
-def platformList = ['Linux:x64:Release', 'Debian8.2:x64:Debug', 'Ubuntu:x64:Release', 'Ubuntu16.04:x64:Debug', 'Ubuntu16.10:x64:Debug', 'OSX10.12:x64:Release', 'Windows_NT:x64:Release', 'Windows_NT:x86:Debug', 'RHEL7.2:x64:Release', 'CentOS7.1:x64:Debug', 'OpenSUSE42.1:x64:Debug']
+def platformList = ['Linux:x64:Release', 'Debian8.2:x64:Debug', 'Ubuntu:x64:Release', 'Ubuntu16.04:x64:Debug', 'OSX10.12:x64:Release', 'Windows_NT:x64:Release', 'Windows_NT:x86:Debug', 'RHEL7.2:x64:Release', 'CentOS7.1:x64:Debug']
def static getBuildJobName(def configuration, def os, def architecture) {
return configuration.toLowerCase() + '_' + os.toLowerCase() + '_' + architecture.toLowerCase()
diff --git a/scripts/obtain/dotnet-install.ps1 b/scripts/obtain/dotnet-install.ps1
index 427995b86..89e6e74d8 100644
--- a/scripts/obtain/dotnet-install.ps1
+++ b/scripts/obtain/dotnet-install.ps1
@@ -58,6 +58,9 @@
.PARAMETER ProxyUseDefaultCredentials
Default: false
Use default credentials, when using proxy address.
+.PARAMETER SkipNonVersionedFiles
+ Default: false
+ Skips installing non-versioned files if they already exist, such as dotnet.exe.
#>
[cmdletbinding()]
param(
@@ -71,7 +74,8 @@ param(
[string]$AzureFeed="https://dotnetcli.azureedge.net/dotnet",
[string]$UncachedFeed="https://dotnetcli.blob.core.windows.net/dotnet",
[string]$ProxyAddress,
- [switch]$ProxyUseDefaultCredentials
+ [switch]$ProxyUseDefaultCredentials,
+ [switch]$SkipNonVersionedFiles
)
Set-StrictMode -Version Latest
@@ -82,10 +86,10 @@ $BinFolderRelativePath=""
# example path with regex: shared/1.0.0-beta-12345/somepath
$VersionRegEx="/\d+\.\d+[^/]+/"
-$OverrideNonVersionedFiles=$true
+$OverrideNonVersionedFiles = !$SkipNonVersionedFiles
function Say($str) {
- Write-Output "dotnet-install: $str"
+ Write-Host "dotnet-install: $str"
}
function Say-Verbose($str) {
@@ -168,21 +172,27 @@ function GetHTTPResponse([Uri] $Uri)
# HttpClient is used vs Invoke-WebRequest in order to support Nano Server which doesn't support the Invoke-WebRequest cmdlet.
Load-Assembly -Assembly System.Net.Http
- if(-not $ProxyAddress)
- {
- # Despite no proxy being explicitly specified, we may still be behind a default proxy
- $DefaultProxy = [System.Net.WebRequest]::DefaultWebProxy;
- if($DefaultProxy -and (-not $DefaultProxy.IsBypassed($Uri))){
- $ProxyAddress = $DefaultProxy.GetProxy($Uri).OriginalString
- $ProxyUseDefaultCredentials = $true
+ if(-not $ProxyAddress) {
+ try {
+ # Despite no proxy being explicitly specified, we may still be behind a default proxy
+ $DefaultProxy = [System.Net.WebRequest]::DefaultWebProxy;
+ if($DefaultProxy -and (-not $DefaultProxy.IsBypassed($Uri))) {
+ $ProxyAddress = $DefaultProxy.GetProxy($Uri).OriginalString
+ $ProxyUseDefaultCredentials = $true
+ }
+ } catch {
+ # Eat the exception and move forward as the above code is an attempt
+ # at resolving the DefaultProxy that may not have been a problem.
+ $ProxyAddress = $null
+ Say-Verbose("Exception ignored: $_.Exception.Message - moving forward...")
}
}
- if($ProxyAddress){
+ if($ProxyAddress) {
$HttpClientHandler = New-Object System.Net.Http.HttpClientHandler
$HttpClientHandler.Proxy = New-Object System.Net.WebProxy -Property @{Address=$ProxyAddress;UseDefaultCredentials=$ProxyUseDefaultCredentials}
$HttpClient = New-Object System.Net.Http.HttpClient -ArgumentList $HttpClientHandler
- }
+ }
else {
$HttpClient = New-Object System.Net.Http.HttpClient
}
@@ -190,11 +200,9 @@ function GetHTTPResponse([Uri] $Uri)
# 10 minutes allows it to work over much slower connections.
$HttpClient.Timeout = New-TimeSpan -Minutes 10
$Response = $HttpClient.GetAsync($Uri).Result
- if (($Response -eq $null) -or (-not ($Response.IsSuccessStatusCode)))
- {
+ if (($Response -eq $null) -or (-not ($Response.IsSuccessStatusCode))) {
$ErrorMsg = "Failed to download $Uri."
- if ($Response -ne $null)
- {
+ if ($Response -ne $null) {
$ErrorMsg += " $Response"
}
@@ -208,7 +216,7 @@ function GetHTTPResponse([Uri] $Uri)
$HttpClient.Dispose()
}
}
- })
+ })
}
@@ -227,7 +235,7 @@ function Get-Latest-Version-Info([string]$AzureFeed, [string]$Channel, [bool]$Co
$VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.version"
}
}
-
+
$Response = GetHTTPResponse -Uri $VersionFileUrl
$StringContent = $Response.Content.ReadAsStringAsync().Result
@@ -260,9 +268,9 @@ function Get-Specific-Version-From-Version([string]$AzureFeed, [string]$Channel,
}
}
-function Get-Download-Link([string]$AzureFeed, [string]$Channel, [string]$SpecificVersion, [string]$CLIArchitecture) {
+function Get-Download-Link([string]$AzureFeed, [string]$SpecificVersion, [string]$CLIArchitecture) {
Say-Invocation $MyInvocation
-
+
if ($SharedRuntime) {
$PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/dotnet-runtime-$SpecificVersion-win-$CLIArchitecture.zip"
}
@@ -275,9 +283,9 @@ function Get-Download-Link([string]$AzureFeed, [string]$Channel, [string]$Specif
return $PayloadURL
}
-function Get-LegacyDownload-Link([string]$AzureFeed, [string]$Channel, [string]$SpecificVersion, [string]$CLIArchitecture) {
+function Get-LegacyDownload-Link([string]$AzureFeed, [string]$SpecificVersion, [string]$CLIArchitecture) {
Say-Invocation $MyInvocation
-
+
if ($SharedRuntime) {
$PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/dotnet-win-$CLIArchitecture.$SpecificVersion.zip"
}
@@ -314,7 +322,7 @@ function Get-Version-Info-From-Version-File([string]$InstallRoot, [string]$Relat
$VersionFile = Join-Path -Path $InstallRoot -ChildPath $RelativePathToVersionFile
Say-Verbose "Local version file: $VersionFile"
-
+
if (Test-Path $VersionFile) {
$VersionText = cat $VersionFile
Say-Verbose "Local version file text: $VersionText"
@@ -328,7 +336,7 @@ function Get-Version-Info-From-Version-File([string]$InstallRoot, [string]$Relat
function Is-Dotnet-Package-Installed([string]$InstallRoot, [string]$RelativePathToPackage, [string]$SpecificVersion) {
Say-Invocation $MyInvocation
-
+
$DotnetPackagePath = Join-Path -Path $InstallRoot -ChildPath $RelativePathToPackage | Join-Path -ChildPath $SpecificVersion
Say-Verbose "Is-Dotnet-Package-Installed: Path to a package: $DotnetPackagePath"
return Test-Path $DotnetPackagePath -PathType Container
@@ -346,13 +354,13 @@ function Get-Path-Prefix-With-Version($path) {
if ($match.Success) {
return $entry.FullName.Substring(0, $match.Index + $match.Length)
}
-
+
return $null
}
function Get-List-Of-Directories-And-Versions-To-Unpack-From-Dotnet-Package([System.IO.Compression.ZipArchive]$Zip, [string]$OutPath) {
Say-Invocation $MyInvocation
-
+
$ret = @()
foreach ($entry in $Zip.Entries) {
$dir = Get-Path-Prefix-With-Version $entry.FullName
@@ -363,12 +371,12 @@ function Get-List-Of-Directories-And-Versions-To-Unpack-From-Dotnet-Package([Sys
}
}
}
-
+
$ret = $ret | Sort-Object | Get-Unique
-
+
$values = ($ret | foreach { "$_" }) -join ";"
Say-Verbose "Directories to unpack: $values"
-
+
return $ret
}
@@ -392,9 +400,9 @@ function Extract-Dotnet-Package([string]$ZipPath, [string]$OutPath) {
Set-Variable -Name Zip
try {
$Zip = [System.IO.Compression.ZipFile]::OpenRead($ZipPath)
-
+
$DirectoriesToUnpack = Get-List-Of-Directories-And-Versions-To-Unpack-From-Dotnet-Package -Zip $Zip -OutPath $OutPath
-
+
foreach ($entry in $Zip.Entries) {
$PathWithVersion = Get-Path-Prefix-With-Version $entry.FullName
if (($PathWithVersion -eq $null) -Or ($DirectoriesToUnpack -contains $PathWithVersion)) {
@@ -445,14 +453,14 @@ function Prepend-Sdk-InstallRoot-To-Path([string]$InstallRoot, [string]$BinFolde
$CLIArchitecture = Get-CLIArchitecture-From-Architecture $Architecture
$SpecificVersion = Get-Specific-Version-From-Version -AzureFeed $AzureFeed -Channel $Channel -Version $Version
-$DownloadLink = Get-Download-Link -AzureFeed $AzureFeed -Channel $Channel -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture
-$LegacyDownloadLink = Get-LegacyDownload-Link -AzureFeed $AzureFeed -Channel $Channel -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture
+$DownloadLink = Get-Download-Link -AzureFeed $AzureFeed -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture
+$LegacyDownloadLink = Get-LegacyDownload-Link -AzureFeed $AzureFeed -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture
if ($DryRun) {
Say "Payload URLs:"
Say "Primary - $DownloadLink"
Say "Legacy - $LegacyDownloadLink"
- Say "Repeatable invocation: .\$($MyInvocation.MyCommand) -Version $SpecificVersion -Channel $Channel -Architecture $CLIArchitecture -InstallDir $InstallDir"
+ Say "Repeatable invocation: .\$($MyInvocation.Line)"
exit 0
}
@@ -470,14 +478,13 @@ if ($IsSdkInstalled) {
New-Item -ItemType Directory -Force -Path $InstallRoot | Out-Null
$installDrive = $((Get-Item $InstallRoot).PSDrive.Name);
-Write-Output "${installDrive}:";
$free = Get-CimInstance -Class win32_logicaldisk | where Deviceid -eq "${installDrive}:"
if ($free.Freespace / 1MB -le 100 ) {
Say "There is not enough disk space on drive ${installDrive}:"
exit 0
}
-$ZipPath = [System.IO.Path]::GetTempFileName()
+$ZipPath = [System.IO.Path]::combine([System.IO.Path]::GetTempPath(), [System.IO.Path]::GetRandomFileName())
Say-Verbose "Zip path: $ZipPath"
Say "Downloading link: $DownloadLink"
try {
@@ -486,7 +493,7 @@ try {
catch {
Say "Cannot download: $DownloadLink"
$DownloadLink = $LegacyDownloadLink
- $ZipPath = [System.IO.Path]::GetTempFileName()
+ $ZipPath = [System.IO.Path]::combine([System.IO.Path]::GetTempPath(), [System.IO.Path]::GetRandomFileName())
Say-Verbose "Legacy zip path: $ZipPath"
Say "Downloading legacy link: $DownloadLink"
DownloadFile -Uri $DownloadLink -OutPath $ZipPath
diff --git a/scripts/obtain/dotnet-install.sh b/scripts/obtain/dotnet-install.sh
index 451525269..a3a7b6ed8 100755
--- a/scripts/obtain/dotnet-install.sh
+++ b/scripts/obtain/dotnet-install.sh
@@ -55,6 +55,9 @@ say_verbose() {
fi
}
+# This platform list is finite - if the SDK/Runtime has supported Linux distribution-specific assets,
+# then and only then should the Linux distribution appear in this list.
+# Adding a Linux distribution to this list does not imply distribution-specific support.
get_os_download_name_from_platform() {
eval $invocation
@@ -84,6 +87,10 @@ get_os_download_name_from_platform() {
echo "opensuse.42.1"
return 0
;;
+ "rhel.6"*)
+ echo "rhel.6"
+ return 0
+ ;;
"rhel.7"*)
echo "rhel"
return 0
@@ -115,8 +122,14 @@ get_current_os_name() {
if [ "$uname" = "Darwin" ]; then
echo "osx"
return 0
- else
- if [ "$uname" = "Linux" ]; then
+ elif [ "$uname" = "Linux" ]; then
+ local distro_specific_osname
+ distro_specific_osname=$(get_distro_specific_os_name) || return 1
+
+ if [ "$distro_specific_osname" = "rhel.6" ]; then
+ echo $distro_specific_osname
+ return 0
+ else
echo "linux"
return 0
fi
@@ -144,6 +157,12 @@ get_distro_specific_os_name() {
echo "$os"
return 0
fi
+ elif [ -e /etc/redhat-release ]; then
+ local redhatRelease=$(&1 || download_failed=true
# if the download fails, download the legacy_download_link
if [ "$download_failed" = true ] && [ "$valid_legacy_download_link" = true ]; then
@@ -687,6 +713,7 @@ uncached_feed="https://dotnetcli.blob.core.windows.net/dotnet"
verbose=false
shared_runtime=false
runtime_id=""
+override_non_versioned_files=true
while [ $# -ne 0 ]
do
@@ -732,6 +759,10 @@ do
shift
runtime_id="$1"
;;
+ --skip-non-versioned-files|-[Ss]kip[Nn]on[Vv]ersioned[Ff]iles)
+ shift
+ override_non_versioned_files=false
+ ;;
-?|--?|-h|--help|-[Hh]elp)
script_name="$(basename $0)"
echo ".NET Tools Installer"
@@ -764,6 +795,8 @@ do
echo " --arch,-Architecture,-Arch"
echo " --shared-runtime Installs just the shared runtime bits, not the entire SDK."
echo " -SharedRuntime"
+ echo " --skip-non-versioned-files Skips non-versioned files if they already exist, such as the dotnet executable."
+ echo " -SkipNonVersionedFiles"
echo " --dry-run,-DryRun Do not perform installation. Display download link."
echo " --no-path, -NoPath Do not set PATH for the current process."
echo " --verbose,-Verbose Display diagnostics information."
diff --git a/src/Microsoft.DotNet.Cli.Utils/MSBuildForwardingAppWithoutLogging.cs b/src/Microsoft.DotNet.Cli.Utils/MSBuildForwardingAppWithoutLogging.cs
index 500ab7b30..39c7fb2df 100644
--- a/src/Microsoft.DotNet.Cli.Utils/MSBuildForwardingAppWithoutLogging.cs
+++ b/src/Microsoft.DotNet.Cli.Utils/MSBuildForwardingAppWithoutLogging.cs
@@ -23,9 +23,8 @@ namespace Microsoft.DotNet.Cli.Utils
new Dictionary
{
{ "MSBuildExtensionsPath", AppContext.BaseDirectory },
- { "CscToolExe", GetRunCscPath() },
- { "VbcToolExe", GetRunVbcPath() },
- { "MSBuildSDKsPath", GetMSBuildSDKsPath() }
+ { "MSBuildSDKsPath", GetMSBuildSDKsPath() },
+ { "DOTNET_HOST_PATH", GetDotnetPath() },
};
private readonly IEnumerable _msbuildRequiredParameters =
@@ -78,20 +77,9 @@ namespace Microsoft.DotNet.Cli.Utils
SdksDirectoryName);
}
- private static string GetRunVbcPath()
+ private static string GetDotnetPath()
{
- return GetRunToolPath("Vbc");
- }
-
- private static string GetRunCscPath()
- {
- return GetRunToolPath("Csc");
- }
-
- private static string GetRunToolPath(string compilerName)
- {
- var scriptExtension = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".cmd" : ".sh";
- return Path.Combine(AppContext.BaseDirectory, "Roslyn", $"Run{compilerName}{scriptExtension}");
+ return new Muxer().MuxerPath;
}
}
}
diff --git a/src/dotnet/commands/dotnet-run/LocalizableStrings.resx b/src/dotnet/commands/dotnet-run/LocalizableStrings.resx
index 8cab1941e..a939d42a8 100644
--- a/src/dotnet/commands/dotnet-run/LocalizableStrings.resx
+++ b/src/dotnet/commands/dotnet-run/LocalizableStrings.resx
@@ -177,7 +177,7 @@ The current {1} is '{2}'.
Using launch settings from {0}...
- Launch profile is not a JSON object.
+ A profile with the specified name could not be found or is not a valid JSON object.The launch profile type '{0}' is not supported.
diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.cs.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.cs.xlf
index 60ce2ef7b..8ea09aff9 100644
--- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.cs.xlf
+++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.cs.xlf
@@ -103,8 +103,8 @@ Aktuální {1} je {2}.
- Launch profile is not a JSON object.
- Profil spuštění není objektem JSON.
+ A profile with the specified name could not be found or is not a valid JSON object.
+ Profil spuštění není objektem JSON.
diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.de.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.de.xlf
index 2349aafdc..c4888a85d 100644
--- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.de.xlf
+++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.de.xlf
@@ -103,8 +103,8 @@ Ein ausführbares Projekt sollte ein ausführbares TFM (z.B. netcoreapp2.0) verw
- Launch profile is not a JSON object.
- Das Startprofil ist kein JSON-Objekt.
+ A profile with the specified name could not be found or is not a valid JSON object.
+ Das Startprofil ist kein JSON-Objekt.
diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.es.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.es.xlf
index 4c05cc144..f22075f6b 100644
--- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.es.xlf
+++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.es.xlf
@@ -103,8 +103,8 @@ El actual {1} es "{2}".
- Launch profile is not a JSON object.
- El perfil de inicio no es un objeto JSON.
+ A profile with the specified name could not be found or is not a valid JSON object.
+ El perfil de inicio no es un objeto JSON.
diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.fr.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.fr.xlf
index f62af586a..cb25dab6b 100644
--- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.fr.xlf
+++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.fr.xlf
@@ -103,8 +103,8 @@ Le {1} actuel est '{2}'.
- Launch profile is not a JSON object.
- Le profil de lancement n'est pas un objet JSON.
+ A profile with the specified name could not be found or is not a valid JSON object.
+ Le profil de lancement n'est pas un objet JSON.
diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.it.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.it.xlf
index ba7512823..13ca40c66 100644
--- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.it.xlf
+++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.it.xlf
@@ -103,8 +103,8 @@ Il valore corrente di {1} è '{2}'.
- Launch profile is not a JSON object.
- Il profilo di avvio non è un oggetto JSON.
+ A profile with the specified name could not be found or is not a valid JSON object.
+ Il profilo di avvio non è un oggetto JSON.
diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ja.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ja.xlf
index fa08955ee..8f52f732c 100644
--- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ja.xlf
+++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ja.xlf
@@ -103,8 +103,8 @@ The current {1} is '{2}'.
- Launch profile is not a JSON object.
- 起動プロファイルが JSON オブジェクトではありません。
+ A profile with the specified name could not be found or is not a valid JSON object.
+ 起動プロファイルが JSON オブジェクトではありません。
diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ko.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ko.xlf
index 41a2ec94e..86ff5d88f 100644
--- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ko.xlf
+++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ko.xlf
@@ -103,8 +103,8 @@ The current {1} is '{2}'.
- Launch profile is not a JSON object.
- 시작 프로필이 JSON 개체가 아닙니다.
+ A profile with the specified name could not be found or is not a valid JSON object.
+ 시작 프로필이 JSON 개체가 아닙니다.
diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pl.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pl.xlf
index aab3a4913..b07a84d33 100644
--- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pl.xlf
+++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pl.xlf
@@ -103,8 +103,8 @@ Bieżący element {1}: „{2}”.
- Launch profile is not a JSON object.
- Profil uruchamiania nie jest obiektem JSON.
+ A profile with the specified name could not be found or is not a valid JSON object.
+ Profil uruchamiania nie jest obiektem JSON.
diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pt-BR.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pt-BR.xlf
index 2843c82ef..1e19ebcf8 100644
--- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pt-BR.xlf
+++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pt-BR.xlf
@@ -103,8 +103,8 @@ O {1} atual é '{2}'.
- Launch profile is not a JSON object.
- O perfil de inicialização não é um objeto JSON.
+ A profile with the specified name could not be found or is not a valid JSON object.
+ O perfil de inicialização não é um objeto JSON.
diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ru.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ru.xlf
index 95b1e0400..cf00bd460 100644
--- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ru.xlf
+++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ru.xlf
@@ -103,8 +103,8 @@ The current {1} is '{2}'.
- Launch profile is not a JSON object.
- Профиль запуска не является объектом JSON.
+ A profile with the specified name could not be found or is not a valid JSON object.
+ Профиль запуска не является объектом JSON.
diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.tr.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.tr.xlf
index a3a9211fb..9a21b7da4 100644
--- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.tr.xlf
+++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.tr.xlf
@@ -103,8 +103,8 @@ Geçerli {1}: '{2}'.
- Launch profile is not a JSON object.
- Başlatma profili bir JSON nesnesi değil.
+ A profile with the specified name could not be found or is not a valid JSON object.
+ Başlatma profili bir JSON nesnesi değil.
diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hans.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hans.xlf
index a4b5c43c2..4ac5ce35e 100644
--- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hans.xlf
+++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hans.xlf
@@ -103,8 +103,8 @@ The current {1} is '{2}'.
- Launch profile is not a JSON object.
- 启动配置文件不是 JSON 对象。
+ A profile with the specified name could not be found or is not a valid JSON object.
+ 启动配置文件不是 JSON 对象。
diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hant.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hant.xlf
index b9bd6e9c3..05567e529 100644
--- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hant.xlf
+++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hant.xlf
@@ -103,8 +103,8 @@ The current {1} is '{2}'.
- Launch profile is not a JSON object.
- 啟動設定檔並非 JSON 物件。
+ A profile with the specified name could not be found or is not a valid JSON object.
+ 啟動設定檔並非 JSON 物件。
diff --git a/src/redist/redist.csproj b/src/redist/redist.csproj
index c45cd6bdf..4dbd46f5d 100644
--- a/src/redist/redist.csproj
+++ b/src/redist/redist.csproj
@@ -17,15 +17,16 @@
-
-
-
+
+ All
+
+
+ All
+
@@ -74,9 +75,25 @@
-
+
+
+
+
+
+
+
+
+
+
+
+ "version": ".*"
+ "version": "$(CLI_SharedFrameworkVersion)"
+
+
+
+
+
+
-
+
+
-
+
-
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
+
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
-
-
diff --git a/src/tool_roslyn/RunCsc.cmd b/src/tool_roslyn/RunCsc.cmd
deleted file mode 100644
index 7398082b2..000000000
--- a/src/tool_roslyn/RunCsc.cmd
+++ /dev/null
@@ -1,6 +0,0 @@
-@echo off
-
-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.
-
-"%~dp0..\..\..\dotnet" "%~dp0csc.exe" %*
diff --git a/src/tool_roslyn/RunCsc.sh b/src/tool_roslyn/RunCsc.sh
deleted file mode 100755
index 47aed63d1..000000000
--- a/src/tool_roslyn/RunCsc.sh
+++ /dev/null
@@ -1,17 +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 )"
-
-"$DIR/../../../dotnet" "$DIR/csc.exe" "$@"
diff --git a/src/tool_roslyn/RunVbc.cmd b/src/tool_roslyn/RunVbc.cmd
deleted file mode 100644
index e891b1bf5..000000000
--- a/src/tool_roslyn/RunVbc.cmd
+++ /dev/null
@@ -1,6 +0,0 @@
-@echo off
-
-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.
-
-"%~dp0..\..\..\dotnet" "%~dp0vbc.exe" %*
diff --git a/src/tool_roslyn/RunVbc.sh b/src/tool_roslyn/RunVbc.sh
deleted file mode 100755
index 3dda886a0..000000000
--- a/src/tool_roslyn/RunVbc.sh
+++ /dev/null
@@ -1,17 +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 )"
-
-"$DIR/../../../dotnet" "$DIR/vbc.exe" "$@"
diff --git a/src/tool_roslyn/tool_roslyn.csproj b/src/tool_roslyn/tool_roslyn.csproj
deleted file mode 100644
index bd702ca7c..000000000
--- a/src/tool_roslyn/tool_roslyn.csproj
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
-
-
-
- $(CliVersionPrefix)
- netcoreapp2.0
- $(CLI_SharedFrameworkVersion)
- true
- $(RoslynDirectory)
- $(CommitCount)
-
-
-
-
-
-
-
-
-
-
-
-
-
- PreserveNewest
- PreserveNewest
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs b/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs
index 7fe281b5d..83a877151 100644
--- a/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs
+++ b/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs
@@ -309,7 +309,7 @@ namespace Microsoft.DotNet.Tests
result.Should().NotBeNull();
- result.Args.Should().Contain("--fx-version 2.0.1");
+ result.Args.Should().Contain("--fx-version 2.0.0");
}
[Fact]
diff --git a/test/dotnet-msbuild.Tests/GivenMsbuildForwardingApp.cs b/test/dotnet-msbuild.Tests/GivenMsbuildForwardingApp.cs
index 4450258ee..4dad315e3 100644
--- a/test/dotnet-msbuild.Tests/GivenMsbuildForwardingApp.cs
+++ b/test/dotnet-msbuild.Tests/GivenMsbuildForwardingApp.cs
@@ -31,8 +31,6 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests
[Theory]
[InlineData("MSBuildExtensionsPath")]
- [InlineData("CscToolExe")]
- [InlineData("VbcToolExe")]
[InlineData("MSBuildSDKsPath")]
[InlineData("DOTNET_CLI_TELEMETRY_SESSIONID")]
public void ItSetsEnvironmentalVariables(string envVarName)
@@ -66,27 +64,6 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests
.Exist();
}
- [Fact]
- public void ItSetsCscToolExePathToValidPath()
- {
- var msbuildPath = "";
- var envVar = "CscToolExe";
- new FileInfo(new MSBuildForwardingApp(new string[0], msbuildPath)
- .GetProcessStartInfo()
- .Environment[envVar])
- .Should().NotBeNull("constructor will throw on invalid path");
- }
-
- [Fact]
- public void ItSetsVbcToolExePathToValidPath()
- {
- var msbuildPath = "";
- var envVar = "VbcToolExe";
- new FileInfo(new MSBuildForwardingApp(new string[0], msbuildPath)
- .GetProcessStartInfo()
- .Environment[envVar])
- .Should().NotBeNull("constructor will throw on invalid path");
- }
[Fact]
public void ItSetsOrIgnoresTelemetrySessionId()
diff --git a/test/dotnet-new.Tests/GivenThatIWantANewApp.cs b/test/dotnet-new.Tests/GivenThatIWantANewApp.cs
index a468bd7b8..cac098694 100644
--- a/test/dotnet-new.Tests/GivenThatIWantANewApp.cs
+++ b/test/dotnet-new.Tests/GivenThatIWantANewApp.cs
@@ -75,14 +75,14 @@ namespace Microsoft.DotNet.New.Tests
}
[Theory]
- [InlineData("console", "RuntimeFrameworkVersion", "microsoft.netcore.app")]
- [InlineData("classlib", "NetStandardImplicitPackageVersion", "netstandard.library")]
- public void NewProjectRestoresCorrectPackageVersion(string type, string propertyName, string packageName)
+ [InlineData("console", "microsoft.netcore.app")]
+ [InlineData("classlib", "netstandard.library")]
+ public void NewProjectRestoresCorrectPackageVersion(string type, string packageName)
{
var rootPath = TestAssets.CreateTestDirectory(identifier: $"_{type}").FullName;
var packagesDirectory = Path.Combine(rootPath, "packages");
var projectName = "Project";
- var expectedVersion = GetFrameworkPackageVersion();
+ var expectedVersion = "2.0.0";
var repoRootNuGetConfig = Path.Combine(RepoDirectoriesProvider.RepoRoot, "NuGet.Config");
new NewCommand()
@@ -98,32 +98,6 @@ namespace Microsoft.DotNet.New.Tests
new DirectoryInfo(Path.Combine(packagesDirectory, packageName))
.Should().Exist()
.And.HaveDirectory(expectedVersion);
-
- string GetFrameworkPackageVersion()
- {
- var dotnetDir = new FileInfo(DotnetUnderTest.FullName).Directory;
- var sharedFxDir = dotnetDir
- .GetDirectory("shared", "Microsoft.NETCore.App")
- .EnumerateDirectories()
- .Single(d => d.Name.StartsWith("2.0.0"));
-
- if (packageName == "microsoft.netcore.app")
- {
- return sharedFxDir.Name;
- }
-
- var depsFile = Path.Combine(sharedFxDir.FullName, "Microsoft.NETCore.App.deps.json");
- using (var stream = File.OpenRead(depsFile))
- using (var reader = new DependencyContextJsonReader())
- {
- var context = reader.Read(stream);
- var dependency = context
- .RuntimeLibraries
- .Single(library => string.Equals(library.Name, packageName, StringComparison.OrdinalIgnoreCase));
-
- return dependency.Version;
- }
- }
}
}
}