Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 18 additions & 10 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,24 @@ extends:
SourceFolder: bin
Contents: '**/*'

- task: UseDotNet@2
displayName: 🟣Install .NET Sdk
inputs:
useGlobalJson: true

- task: DotNetCoreCLI@2
displayName: 🟣dotnet restore
inputs:
command: custom
custom: restore
- task: UseDotNet@2
displayName: 🟣Install .NET Sdk
inputs:
useGlobalJson: true

- pwsh: |
Write-Host "DOTNET_ROOT=$env:DOTNET_ROOT"
Write-Host "DOTNET_HOST_PATH=$env:DOTNET_HOST_PATH"
Write-Host "DOTNET_INSTALL_DIR=$env:DOTNET_INSTALL_DIR"
where.exe dotnet
dotnet --info
displayName: 🟣Show .NET SDK info

- task: DotNetCoreCLI@2
displayName: 🟣dotnet restore
inputs:
command: custom
custom: restore
projects: |
**\*.sln

Expand Down
15 changes: 14 additions & 1 deletion src/index/index.proj
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,22 @@
<Target Name="PrepareV1" DependsOnTargets="PrepareOutput;ResolveHashV1" Outputs="%(ClonedRepository.Identity)">
<PropertyGroup>
<PrepareCommand>$([System.String]::Copy('%(ClonedRepository.PrepareCommand)').Trim())</PrepareCommand>
<InheritedDotnetHostPath>$([System.Environment]::GetEnvironmentVariable('DOTNET_HOST_PATH'))</InheritedDotnetHostPath>
<InheritedDotnetRoot>$([System.Environment]::GetEnvironmentVariable('DOTNET_ROOT'))</InheritedDotnetRoot>
<InheritedDotnetInstallDir>$([System.Environment]::GetEnvironmentVariable('DOTNET_INSTALL_DIR'))</InheritedDotnetInstallDir>
</PropertyGroup>
<Message Importance="High" Text="Preparing Repository %(ClonedRepository.Identity)"/>
<Exec Command="cmd /c &quot;$(PrepareCommand)&quot;" WorkingDirectory="%(ClonedRepository.LocalPath)" ContinueOnError="true" IgnoreStandardErrorWarningFormat="true" LogStandardErrorAsError="false" IgnoreExitCode="true"/>
<Message Importance="High" Text="Prepare environment before isolation for %(ClonedRepository.Identity): DOTNET_HOST_PATH='$(InheritedDotnetHostPath)', DOTNET_ROOT='$(InheritedDotnetRoot)', DOTNET_INSTALL_DIR='$(InheritedDotnetInstallDir)'"/>
<Exec Command="cmd /d /c &quot;set &quot;DOTNET_HOST_PATH=&quot; &amp; set &quot;DOTNET_ROOT=&quot; &amp; set &quot;DOTNET_INSTALL_DIR=&quot; &amp; set &quot;DOTNET_MULTILEVEL_LOOKUP=0&quot; &amp; where dotnet &amp; $(PrepareCommand)&quot;"
WorkingDirectory="%(ClonedRepository.LocalPath)"
ContinueOnError="true"
IgnoreStandardErrorWarningFormat="true"
LogStandardErrorAsError="false"
IgnoreExitCode="true">
<Output TaskParameter="ExitCode" PropertyName="PrepareExitCode"/>
</Exec>
<Warning Condition="'$(PrepareExitCode)' != '0'"
Text="Preparing repository %(ClonedRepository.Identity) failed with exit code $(PrepareExitCode)."/>
</Target>

<Target Name="PrepareV2" DependsOnTargets="ResolveHashV2" Outputs="%(ClonedRepositoryV2.Identity)">
Expand Down
Loading