Skip to content

Commit a07a3ff

Browse files
isra-felYeming Liu
and
Yeming Liu
authored
Tooling to update assemblies (Azure#27509)
Co-authored-by: Yeming Liu <[email protected]>
1 parent c23e4af commit a07a3ff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1314
-109
lines changed

src/Accounts/Accounts/Accounts.csproj

+8-6
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<NetFxAssemblies Include="$(RepoSrc)lib\netfx\*.dll" />
15-
<NetCore21Assemblies Include="$(RepoSrc)lib\netcoreapp2.1\*.dll" />
16-
<NetCore31Assemblies Include="$(RepoSrc)lib\netcoreapp3.1\*.dll" />
14+
<Net45Assemblies Include="$(RepoSrc)lib\net45\*.dll" />
15+
<Net46Assemblies Include="$(RepoSrc)lib\net46\*.dll" />
16+
<Net461Assemblies Include="$(RepoSrc)lib\net461\*.dll" />
17+
<Net47Assemblies Include="$(RepoSrc)lib\net47\*.dll" />
1718
<NetStandardAssemblies Include="$(RepoSrc)lib\netstandard2.0\*.dll" />
1819
<StorageDependencies Include="$(RepoSrc)lib\WindowsAzure.Storage\9.3.0\Microsoft.WindowsAzure.Storage.dll" />
1920
</ItemGroup>
@@ -23,9 +24,10 @@
2324
</ItemGroup>
2425

2526
<Target Name="CopyFiles" AfterTargets="Build">
26-
<Copy SourceFiles="@(NetFxAssemblies)" DestinationFolder="$(TargetDir)lib\netfx" />
27-
<Copy SourceFiles="@(NetCore21Assemblies)" DestinationFolder="$(TargetDir)lib\netcoreapp2.1" />
28-
<Copy SourceFiles="@(NetCore31Assemblies)" DestinationFolder="$(TargetDir)lib\netcoreapp3.1" />
27+
<Copy SourceFiles="@(Net45Assemblies)" DestinationFolder="$(TargetDir)lib\net45" />
28+
<Copy SourceFiles="@(Net46Assemblies)" DestinationFolder="$(TargetDir)lib\net46" />
29+
<Copy SourceFiles="@(Net461Assemblies)" DestinationFolder="$(TargetDir)lib\net461" />
30+
<Copy SourceFiles="@(Net47Assemblies)" DestinationFolder="$(TargetDir)lib\net47" />
2931
<Copy SourceFiles="@(NetStandardAssemblies)" DestinationFolder="$(TargetDir)lib\netstandard2.0" />
3032
<Copy SourceFiles="@(StorageDependencies)" DestinationFolder="$(TargetDir)" />
3133
<!--To automatically launch pwsh for debugging when hitting F5, set below and UNCOMMENT Copy:

src/Accounts/AssemblyLoading/ConditionalAssemblyProvider.cs

+17-18
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// ----------------------------------------------------------------------------------
1+
// ----------------------------------------------------------------------------------
22
//
33
// Copyright Microsoft Corporation
44
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -39,40 +39,39 @@ public static void Initialize(string rootPath, IConditionalAssemblyContext conte
3939
_context = context ?? throw new ArgumentNullException(nameof(context));
4040
_assemblies = new List<IConditionalAssembly>()
4141
{
42-
// todo: add a tool to update assembly versions after replacing the assemblies. (Can it support newly introduced assemblies?)
4342
// todo: consider moving the list to a standalone config file
44-
#region AssemblyList
43+
// do not update this list manually, see src/lib/README.md for details
44+
#region Generated
45+
CreateAssembly("net45", "Newtonsoft.Json", "13.0.0.0").WithWindowsPowerShell(),
46+
CreateAssembly("net46", "System.Numerics.Vectors", "4.1.4.0").WithWindowsPowerShell(),
47+
CreateAssembly("net46", "System.Xml.ReaderWriter", "4.1.0.0").WithWindowsPowerShell(),
48+
CreateAssembly("net461", "System.Diagnostics.DiagnosticSource", "6.0.0.1").WithWindowsPowerShell(),
49+
CreateAssembly("net461", "System.Reflection.DispatchProxy", "4.0.4.0").WithWindowsPowerShell(),
50+
CreateAssembly("net461", "System.Runtime.CompilerServices.Unsafe", "6.0.0.0").WithWindowsPowerShell(),
51+
CreateAssembly("net461", "System.Security.Cryptography.ProtectedData", "4.0.3.0").WithWindowsPowerShell(),
52+
CreateAssembly("net461", "System.Text.Encodings.Web", "6.0.0.1").WithWindowsPowerShell(),
53+
CreateAssembly("net47", "System.Security.Cryptography.Cng", "4.3.0.0").WithWindowsPowerShell(),
4554
CreateAssembly("netstandard2.0", "Azure.Core", "1.44.1.0"),
46-
CreateAssembly("netstandard2.0", "Azure.Identity", "1.13.0.0"),
4755
CreateAssembly("netstandard2.0", "Azure.Identity.Broker", "1.1.0.0"),
56+
CreateAssembly("netstandard2.0", "Azure.Identity", "1.13.0.0"),
4857
CreateAssembly("netstandard2.0", "Microsoft.Bcl.AsyncInterfaces", "6.0.0.0"),
58+
CreateAssembly("netstandard2.0", "Microsoft.Identity.Client.Broker", "4.65.0.0"),
4959
CreateAssembly("netstandard2.0", "Microsoft.Identity.Client", "4.65.0.0"),
5060
CreateAssembly("netstandard2.0", "Microsoft.Identity.Client.Extensions.Msal", "4.65.0.0"),
51-
CreateAssembly("netstandard2.0", "Microsoft.Identity.Client.Broker", "4.65.0.0"),
5261
CreateAssembly("netstandard2.0", "Microsoft.Identity.Client.NativeInterop", "0.16.2.0"),
5362
CreateAssembly("netstandard2.0", "Microsoft.IdentityModel.Abstractions", "6.35.0.0"),
54-
CreateAssembly("netstandard2.0", "System.ClientModel", "1.1.0.0"),
55-
CreateAssembly("netstandard2.0", "System.Memory.Data", "6.0.0.1"), // 6.0.1
56-
CreateAssembly("netstandard2.0", "System.Text.Json", "6.0.0.0"), // 6.0.11
5763
CreateAssembly("netstandard2.0", "System.Buffers", "4.0.3.0").WithWindowsPowerShell(),
64+
CreateAssembly("netstandard2.0", "System.ClientModel", "1.1.0.0"),
65+
CreateAssembly("netstandard2.0", "System.Memory.Data", "6.0.0.1"),
5866
CreateAssembly("netstandard2.0", "System.Memory", "4.0.1.2").WithWindowsPowerShell(),
5967
CreateAssembly("netstandard2.0", "System.Net.Http.WinHttpHandler", "4.0.4.0").WithWindowsPowerShell(),
6068
CreateAssembly("netstandard2.0", "System.Private.ServiceModel", "4.7.0.0").WithWindowsPowerShell(),
6169
CreateAssembly("netstandard2.0", "System.Security.AccessControl", "4.1.3.0").WithWindowsPowerShell(),
6270
CreateAssembly("netstandard2.0", "System.Security.Permissions", "4.0.3.0").WithWindowsPowerShell(),
6371
CreateAssembly("netstandard2.0", "System.Security.Principal.Windows", "4.1.3.0").WithWindowsPowerShell(),
6472
CreateAssembly("netstandard2.0", "System.ServiceModel.Primitives", "4.7.0.0").WithWindowsPowerShell(),
73+
CreateAssembly("netstandard2.0", "System.Text.Json", "6.0.0.0"),
6574
CreateAssembly("netstandard2.0", "System.Threading.Tasks.Extensions", "4.2.0.1").WithWindowsPowerShell(),
66-
67-
CreateAssembly("netfx", "Newtonsoft.Json", "13.0.0.0").WithWindowsPowerShell(),
68-
CreateAssembly("netfx", "System.Diagnostics.DiagnosticSource", "6.0.0.1").WithWindowsPowerShell(),
69-
CreateAssembly("netfx", "System.Numerics.Vectors", "4.1.4.0").WithWindowsPowerShell(),
70-
CreateAssembly("netfx", "System.Reflection.DispatchProxy", "4.0.4.0").WithWindowsPowerShell(),
71-
CreateAssembly("netfx", "System.Runtime.CompilerServices.Unsafe", "6.0.0.0").WithWindowsPowerShell(),
72-
CreateAssembly("netfx", "System.Security.Cryptography.Cng", "4.3.0.0").WithWindowsPowerShell(),
73-
CreateAssembly("netfx", "System.Security.Cryptography.ProtectedData", "4.0.3.0").WithWindowsPowerShell(),
74-
CreateAssembly("netfx", "System.Text.Encodings.Web", "6.0.0.1").WithWindowsPowerShell(), // net461, 6.0.1
75-
CreateAssembly("netfx", "System.Xml.ReaderWriter", "4.1.0.0").WithWindowsPowerShell(),
7675
#endregion
7776
};
7877
}

src/lib/README.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# About `lib` Directory
2+
3+
This directory contains common assemblies / libraries that Azure PowerShell modules depend on.
4+
5+
## How to use this directory
6+
7+
When making changes to the dependencies in this directory, please follow these steps:
8+
9+
1. Update `manifest.json` no matter if you are adding, removing or updating a dependency. This serves as the source of truth.
10+
2. Run `Update-DevDependency` found in the AzDev module. Follow the instructions necessary to [build and import the module](../../tools/AzDev/README.md) first.

src/lib/cgmanifest.json

+276
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,276 @@
1+
{
2+
"$schema": "https://json.schemastore.org/component-detection-manifest.json",
3+
"version": 1,
4+
"registrations": [
5+
{
6+
"component": {
7+
"type": "nuget",
8+
"nuget": {
9+
"name": "Newtonsoft.Json",
10+
"version": "13.0.2"
11+
}
12+
}
13+
},
14+
{
15+
"component": {
16+
"type": "nuget",
17+
"nuget": {
18+
"name": "System.Numerics.Vectors",
19+
"version": "4.5.0"
20+
}
21+
}
22+
},
23+
{
24+
"component": {
25+
"type": "nuget",
26+
"nuget": {
27+
"name": "System.Xml.ReaderWriter",
28+
"version": "4.3.0"
29+
}
30+
}
31+
},
32+
{
33+
"component": {
34+
"type": "nuget",
35+
"nuget": {
36+
"name": "System.Diagnostics.DiagnosticSource",
37+
"version": "6.0.1"
38+
}
39+
}
40+
},
41+
{
42+
"component": {
43+
"type": "nuget",
44+
"nuget": {
45+
"name": "System.Reflection.DispatchProxy",
46+
"version": "4.5.0"
47+
}
48+
}
49+
},
50+
{
51+
"component": {
52+
"type": "nuget",
53+
"nuget": {
54+
"name": "System.Runtime.CompilerServices.Unsafe",
55+
"version": "6.0.0"
56+
}
57+
}
58+
},
59+
{
60+
"component": {
61+
"type": "nuget",
62+
"nuget": {
63+
"name": "System.Security.Cryptography.ProtectedData",
64+
"version": "4.5.0"
65+
}
66+
}
67+
},
68+
{
69+
"component": {
70+
"type": "nuget",
71+
"nuget": {
72+
"name": "System.Text.Encodings.Web",
73+
"version": "6.0.1"
74+
}
75+
}
76+
},
77+
{
78+
"component": {
79+
"type": "nuget",
80+
"nuget": {
81+
"name": "System.Security.Cryptography.Cng",
82+
"version": "4.4.0"
83+
}
84+
}
85+
},
86+
{
87+
"component": {
88+
"type": "nuget",
89+
"nuget": {
90+
"name": "Azure.Core",
91+
"version": "1.44.1"
92+
}
93+
}
94+
},
95+
{
96+
"component": {
97+
"type": "nuget",
98+
"nuget": {
99+
"name": "Azure.Identity.Broker",
100+
"version": "1.1.0"
101+
}
102+
}
103+
},
104+
{
105+
"component": {
106+
"type": "nuget",
107+
"nuget": {
108+
"name": "Azure.Identity",
109+
"version": "1.13.0"
110+
}
111+
}
112+
},
113+
{
114+
"component": {
115+
"type": "nuget",
116+
"nuget": {
117+
"name": "Microsoft.Bcl.AsyncInterfaces",
118+
"version": "6.0.0"
119+
}
120+
}
121+
},
122+
{
123+
"component": {
124+
"type": "nuget",
125+
"nuget": {
126+
"name": "Microsoft.Identity.Client.Broker",
127+
"version": "4.65.0"
128+
}
129+
}
130+
},
131+
{
132+
"component": {
133+
"type": "nuget",
134+
"nuget": {
135+
"name": "Microsoft.Identity.Client",
136+
"version": "4.65.0"
137+
}
138+
}
139+
},
140+
{
141+
"component": {
142+
"type": "nuget",
143+
"nuget": {
144+
"name": "Microsoft.Identity.Client.Extensions.Msal",
145+
"version": "4.65.0"
146+
}
147+
}
148+
},
149+
{
150+
"component": {
151+
"type": "nuget",
152+
"nuget": {
153+
"name": "Microsoft.Identity.Client.NativeInterop",
154+
"version": "0.16.2"
155+
}
156+
}
157+
},
158+
{
159+
"component": {
160+
"type": "nuget",
161+
"nuget": {
162+
"name": "Microsoft.IdentityModel.Abstractions",
163+
"version": "6.35.0"
164+
}
165+
}
166+
},
167+
{
168+
"component": {
169+
"type": "nuget",
170+
"nuget": {
171+
"name": "System.Buffers",
172+
"version": "4.5.1"
173+
}
174+
}
175+
},
176+
{
177+
"component": {
178+
"type": "nuget",
179+
"nuget": {
180+
"name": "System.ClientModel",
181+
"version": "1.1.0"
182+
}
183+
}
184+
},
185+
{
186+
"component": {
187+
"type": "nuget",
188+
"nuget": {
189+
"name": "System.Memory.Data",
190+
"version": "6.0.1"
191+
}
192+
}
193+
},
194+
{
195+
"component": {
196+
"type": "nuget",
197+
"nuget": {
198+
"name": "System.Memory",
199+
"version": "4.5.5"
200+
}
201+
}
202+
},
203+
{
204+
"component": {
205+
"type": "nuget",
206+
"nuget": {
207+
"name": "System.Net.Http.WinHttpHandler",
208+
"version": "4.6.0"
209+
}
210+
}
211+
},
212+
{
213+
"component": {
214+
"type": "nuget",
215+
"nuget": {
216+
"name": "System.Private.ServiceModel",
217+
"version": "4.7.0"
218+
}
219+
}
220+
},
221+
{
222+
"component": {
223+
"type": "nuget",
224+
"nuget": {
225+
"name": "System.Security.AccessControl",
226+
"version": "4.7.0"
227+
}
228+
}
229+
},
230+
{
231+
"component": {
232+
"type": "nuget",
233+
"nuget": {
234+
"name": "System.Security.Permissions",
235+
"version": "4.7.0"
236+
}
237+
}
238+
},
239+
{
240+
"component": {
241+
"type": "nuget",
242+
"nuget": {
243+
"name": "System.Security.Principal.Windows",
244+
"version": "4.7.0"
245+
}
246+
}
247+
},
248+
{
249+
"component": {
250+
"type": "nuget",
251+
"nuget": {
252+
"name": "System.ServiceModel.Primitives",
253+
"version": "4.7.0"
254+
}
255+
}
256+
},
257+
{
258+
"component": {
259+
"type": "nuget",
260+
"nuget": {
261+
"name": "System.Text.Json",
262+
"version": "6.0.11"
263+
}
264+
}
265+
},
266+
{
267+
"component": {
268+
"type": "nuget",
269+
"nuget": {
270+
"name": "System.Threading.Tasks.Extensions",
271+
"version": "4.5.4"
272+
}
273+
}
274+
}
275+
]
276+
}

0 commit comments

Comments
 (0)