diff --git a/build/yaml/templates/component-template.yml b/build/yaml/templates/component-template.yml index bd27ea611e..935cd64a04 100644 --- a/build/yaml/templates/component-template.yml +++ b/build/yaml/templates/component-template.yml @@ -31,7 +31,6 @@ stages: - job: build_test_dotnet displayName: Build and test .csproj with dotnet steps: - - template: dotnet-install-sdk-steps.yml - template: dotnet-build-test-steps.yml - stage: stage_package_nuget @@ -44,7 +43,6 @@ stages: condition: eq(variables.ComponentType, 'codeExtension') steps: - template: nuget-versioning-steps.yml - - template: dotnet-install-sdk-steps.yml - template: dotnet-package-steps.yml - template: nuget-signing-steps.yml - job: job_pack_nuspec diff --git a/build/yaml/templates/dotnet-build-test-steps.yml b/build/yaml/templates/dotnet-build-test-steps.yml index cf6901e5b2..6a6c0e7bc5 100644 --- a/build/yaml/templates/dotnet-build-test-steps.yml +++ b/build/yaml/templates/dotnet-build-test-steps.yml @@ -1,4 +1,14 @@ steps: +- task: UseDotNet@2 + displayName: 'Use .Net Core sdk 2.1.x' + inputs: + version: 2.1.x + +- task: UseDotNet@2 + displayName: 'Use .Net Core sdk 3.1.x' + inputs: + version: 3.1.x + - task: DotNetCoreCLI@2 displayName: 'Run `dotnet restore`' inputs: diff --git a/build/yaml/templates/dotnet-install-sdk-steps.yml b/build/yaml/templates/dotnet-install-sdk-steps.yml deleted file mode 100644 index 772e09f578..0000000000 --- a/build/yaml/templates/dotnet-install-sdk-steps.yml +++ /dev/null @@ -1,10 +0,0 @@ -steps: -- task: UseDotNet@2 - displayName: 'Use .Net Core sdk 2.1.x' - inputs: - version: 2.1.x - -- task: UseDotNet@2 - displayName: 'Use .Net Core sdk 3.1.x' - inputs: - version: 3.1.x diff --git a/build/yaml/templates/dotnet-package-steps.yml b/build/yaml/templates/dotnet-package-steps.yml index 49e0a39302..106b8caa7e 100644 --- a/build/yaml/templates/dotnet-package-steps.yml +++ b/build/yaml/templates/dotnet-package-steps.yml @@ -1,4 +1,9 @@ steps: +- task: UseDotNet@2 + displayName: 'Use .Net Core sdk 2.1.x' + inputs: + version: 2.1.x + - task: DotNetCoreCLI@2 displayName: 'Run `dotnet publish`' inputs: diff --git a/build/yaml/templates/nuget-signing-steps.yml b/build/yaml/templates/nuget-signing-steps.yml index 5e08c14ebe..269af981c7 100644 --- a/build/yaml/templates/nuget-signing-steps.yml +++ b/build/yaml/templates/nuget-signing-steps.yml @@ -2,11 +2,6 @@ # Extra steps are required to sign the binaries of the code extensions. steps: -- task: UseDotNet@2 - displayName: 'Use .Net Core sdk 2.1.x' - inputs: - version: 2.1.x - - task: CopyFiles@2 displayName: 'Copy packages to Signing' inputs: