Skip to content

Commit dc385bf

Browse files
isra-felYeming Liu
andauthored
clean up old runtimes (#27665)
Co-authored-by: Yeming Liu <[email protected]>
1 parent 1fea7e7 commit dc385bf

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

tools/CleanupBuild.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ foreach($RMPath in $resourceManagerPaths)
7676
Import-LocalizedData -BindingVariable ModuleMetadata -BaseDirectory $psd1.DirectoryName -FileName $psd1.Name
7777

7878
$acceptedDlls = @(
79-
# netcoreapp, can't be in RequiredAssemblies, but we need to pack it
79+
# not targeting netstandard2.0, can't be in RequiredAssemblies, but we need to pack it
8080
"Microsoft.Azure.PowerShell.AuthenticationAssemblyLoadContext.dll",
8181
# customized AutoMapper
8282
"Microsoft.Azure.PowerShell.AutoMapper.dll",
@@ -113,7 +113,7 @@ foreach($RMPath in $resourceManagerPaths)
113113

114114
Write-Host "Removing redundant dlls in $($RMFolder.Name)"
115115
$removedDlls = Get-ChildItem -Path $RMFolder.FullName -Filter "*.dll" -Recurse | where { $acceptedDlls -notcontains $_.Name -and !$_.FullName.Contains("Assemblies") }
116-
# do not remove lib dlls (for example Az.Accounts/lib/netcoreapp2.1/Azure.Core.dll)
116+
# do not remove lib dlls (for example Az.Accounts/lib/netstandard2.0/Azure.Core.dll)
117117
$libPattern = [System.IO.Path]::DirectorySeparatorChar + "lib" + [System.IO.Path]::DirectorySeparatorChar;
118118
$removedDlls = $removedDlls | Where-Object { -not $_.FullName.Contains($libPattern) }
119119
$removedDlls | % { Write-Host "Removing $($_.Name)"; Remove-Item $_.FullName -Force }

tools/Tools.Common/Loaders/SharedAssemblyLoader.cs

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,28 @@
1-
using System;
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
using System;
216
using System.Collections.Generic;
317
using System.IO;
4-
using System.Linq;
518
using System.Reflection;
6-
using System.Text;
719

820
namespace Tools.Common.Loaders
921
{
1022
public class SharedAssemblyLoader
1123
{
12-
private const string NetCoreApp21 = "netcoreapp2.1";
13-
private const string NetCoreApp31 = "netcoreapp3.1";
1424
private const string NetStandard20 = "netstandard2.0";
15-
private static readonly IEnumerable<string> Frameworks = new string[] { NetCoreApp21, NetCoreApp31, NetStandard20 };
25+
private static readonly IEnumerable<string> Frameworks = new string[] { NetStandard20 };
1626
public static HashSet<string> ProcessedFolderSet = new HashSet<string>();
1727

1828
public static void Load(string directory)

0 commit comments

Comments
 (0)