Merge branch 'rel/2.0.0-preview2' into dev
This commit is contained in:
commit
41f211f3a7
|
|
@ -36,6 +36,8 @@
|
|||
<DependencyBuildDirectory>$(RepositoryRoot).deps\build\</DependencyBuildDirectory>
|
||||
<RuntimeStoreReferenceDirectory>$(ToolsDir)Build.RuntimeStore.References\</RuntimeStoreReferenceDirectory>
|
||||
<RuntimeStoreReferencePackageDirectory>$(RuntimeStoreReferenceDirectory)bin\Release\</RuntimeStoreReferencePackageDirectory>
|
||||
<BuildTempDirectory>$(RepositoryRoot).build\temp\</BuildTempDirectory>
|
||||
|
||||
<PrepareDependsOn>
|
||||
$(PrepareDependsOn);
|
||||
UpdateNuGetConfig
|
||||
|
|
@ -158,15 +160,20 @@
|
|||
</Target>
|
||||
|
||||
<Target Name="AddDiaSymReaderToPath" Condition="'$(OS)' == 'Windows_NT'">
|
||||
<Exec Command="powershell.exe $(ToolsDir)GetSharedFrameworkVersion.ps1" ConsoleToMSBuild="true">
|
||||
<Output TaskParameter="ConsoleOutput" PropertyName="SharedFrameworkVersion" />
|
||||
</Exec>
|
||||
|
||||
<MSBuild Projects="$(ProjectPath)" Targets="_AddDiaSymReaderFromCurrentSharedFramework" Properties="SharedFrameworkVersion=$(SharedFrameworkVersion)" Condition="'$(PACKAGE_CACHE_PLATFORM)' == 'x64'" />
|
||||
<MSBuild Projects="$(ProjectPath)" Targets="_AddDiaSymReaderFromDownloadedSharedFramework" Properties="SharedFrameworkVersion=$(SharedFrameworkVersion)" Condition="'$(PACKAGE_CACHE_PLATFORM)' == 'x86'" />
|
||||
</Target>
|
||||
|
||||
<Target Name="_AddDiaSymReaderFromCurrentSharedFramework">
|
||||
<!-- Parse framework version -->
|
||||
<GetDotNetHost>
|
||||
<Output TaskParameter="DotNetDirectory" PropertyName="DotnetHomeDirectory" />
|
||||
</GetDotNetHost>
|
||||
|
||||
<Exec Command="powershell.exe $(ToolsDir)GetSharedFrameworkVersion.ps1" ConsoleToMSBuild="true">
|
||||
<Output TaskParameter="ConsoleOutput" PropertyName="SharedFrameworkVersion" />
|
||||
</Exec>
|
||||
|
||||
<PropertyGroup>
|
||||
<DiaSymReaderDirectory>$(DotnetHomeDirectory)shared\Microsoft.NETCore.App\$(SharedFrameworkVersion)</DiaSymReaderDirectory>
|
||||
</PropertyGroup>
|
||||
|
|
@ -176,6 +183,18 @@
|
|||
<SetEnvironmentVariable Variable="PATH" Value="$(PATH);$(DiaSymReaderDirectory)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="_AddDiaSymReaderFromDownloadedSharedFramework">
|
||||
<Exec Command="powershell.exe $(ToolsDir)InstallSharedFrameworkx86.ps1 $(SharedFrameworkVersion) $(BuildTempDirectory)"/>
|
||||
|
||||
<PropertyGroup>
|
||||
<DiaSymReaderDirectory>$(BuildTempDirectory)shared\Microsoft.NETCore.App\$(SharedFrameworkVersion)</DiaSymReaderDirectory>
|
||||
</PropertyGroup>
|
||||
|
||||
<Message Text="Adding DiaSymReader to PATH by appending: $(DiaSymReaderDirectory)" Importance="high" />
|
||||
|
||||
<SetEnvironmentVariable Variable="PATH" Value="$(PATH);$(DiaSymReaderDirectory)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="_RemoveTimestampFromDepsFile">
|
||||
<GetOSPlatform>
|
||||
<!-- Returns {Linux, macOS, Windows} -->
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@ $versions = $infoOutput | Select-String -Pattern "version"
|
|||
$FXVersionRaw = $versions | Select-Object -Last 1
|
||||
$FXVersionString = $FXVersionRaw.ToString()
|
||||
$FXVersion = $FXVersionString.SubString($FXVersionString.IndexOf(':') + 1).Trim()
|
||||
Write-Host $FXVersion
|
||||
Write-Host $FXVersion
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
param (
|
||||
[string]$sharedRuntimeVersion,
|
||||
[string]$installationDirectory
|
||||
)
|
||||
|
||||
$sharedRuntimeChannel = "master"
|
||||
if ($env:KOREBUILD_DOTNET_SHARED_RUNTIME_CHANNEL)
|
||||
{
|
||||
$sharedRuntimeChannel = $env:KOREBUILD_DOTNET_SHARED_RUNTIME_CHANNEL
|
||||
}
|
||||
|
||||
function InstallSharedRuntime([string] $version, [string] $channel, [string] $installDir)
|
||||
{
|
||||
$sharedRuntimePath = [IO.Path]::Combine($installDir, 'shared', 'Microsoft.NETCore.App', $version)
|
||||
# Avoid redownloading the CLI if it's already installed.
|
||||
if (!(Test-Path $sharedRuntimePath))
|
||||
{
|
||||
& "$PSScriptRoot\..\.build\dotnet\dotnet-install.ps1" `
|
||||
-Channel $channel `
|
||||
-SharedRuntime `
|
||||
-Version $version `
|
||||
-Architecture 'x86' `
|
||||
-InstallDir $installDir `
|
||||
-NoPath
|
||||
}
|
||||
}
|
||||
|
||||
InstallSharedRuntime -version $sharedRuntimeVersion -channel $sharedRuntimeChannel -installDir $installationDirectory
|
||||
Loading…
Reference in New Issue