File tree Expand file tree Collapse file tree 6 files changed +449
-3
lines changed
tools/ExtensionsMetadataGenerator/src/ExtensionsMetadataGenerator Expand file tree Collapse file tree 6 files changed +449
-3
lines changed Original file line number Diff line number Diff line change 394
394
"name" : " Microsoft.Azure.WebJobs" ,
395
395
"resolutionPolicy" : " minorMatchOrLower"
396
396
},
397
+ {
398
+ "name" : " Microsoft.Azure.WebJobs.Host.Storage" ,
399
+ "resolutionPolicy" : " minorMatchOrLower"
400
+ },
397
401
{
398
402
"name" : " Microsoft.Azure.WebJobs.Extensions" ,
399
403
"resolutionPolicy" : " minorMatchOrLower"
Original file line number Diff line number Diff line change
1
+ // Copyright (c) .NET Foundation. All rights reserved.
2
+ // Licensed under the MIT License. See License.txt in the project root for license information.
3
+
4
+ using System ;
5
+ using System . Collections . Generic ;
6
+ using System . Diagnostics ;
7
+ using System . IO ;
8
+ using System . Reflection ;
9
+ using System . Text ;
10
+ using Microsoft . Build . Framework ;
11
+ using Microsoft . Build . Utilities ;
12
+
13
+ namespace Microsoft . Azure . WebJobs . Script . ExtensionsMetadataGenerator . BuildTasks
14
+ {
15
+ #if NET46
16
+ public class RemoveRuntimeDependencies : AppDomainIsolatedTask
17
+ #else
18
+ public class RemoveRuntimeDependencies : Task
19
+ #endif
20
+ {
21
+ [ Required ]
22
+ public string OutputPath { get ; set ; }
23
+
24
+ public override bool Execute ( )
25
+ {
26
+ Assembly assembly = typeof ( RemoveRuntimeDependencies ) . Assembly ;
27
+ using ( Stream resource = assembly . GetManifestResourceStream ( assembly . GetName ( ) . Name + ".runtimeassemblies.txt" ) )
28
+ using ( var reader = new StreamReader ( resource ) )
29
+ {
30
+ string assemblyName = reader . ReadLine ( ) ;
31
+ while ( ! string . IsNullOrEmpty ( assemblyName ) )
32
+ {
33
+ string fileName = Path . Combine ( OutputPath , assemblyName ) ;
34
+
35
+ if ( File . Exists ( fileName ) )
36
+ {
37
+ File . Delete ( fileName ) ;
38
+ }
39
+
40
+ assemblyName = reader . ReadLine ( ) ;
41
+ }
42
+ }
43
+
44
+ return true ;
45
+ }
46
+ }
47
+ }
Original file line number Diff line number Diff line change 1
1
<Project Sdk =" Microsoft.NET.Sdk" >
2
2
<Import Project =" ..\..\build\metadatagenerator.props" />
3
3
<PropertyGroup >
4
- <Version >1.1.3 </Version >
4
+ <Version >1.1.4 </Version >
5
5
<OutputType >Library</OutputType >
6
6
<TargetFrameworks >netstandard2.0;net46</TargetFrameworks >
7
7
<AssemblyName >Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator</AssemblyName >
29
29
</Content >
30
30
</ItemGroup >
31
31
32
+ <Target Name =" UpdateRuntimeAssemblies" BeforeTargets =" Build" >
33
+ <Exec Command =" powershell.exe –command .\updateruntimeassemblies.ps1" />
34
+ </Target >
35
+
32
36
<Target Name =" PackReferenceAssemblies" >
33
37
<ItemGroup >
34
38
<Content Include =" $(OutputPath)\netstandard2.0\generator\*" >
41
45
</Content >
42
46
</ItemGroup >
43
47
</Target >
48
+
49
+ <ItemGroup >
50
+ <None Remove =" runtimeassemblies.txt" />
51
+ </ItemGroup >
52
+
53
+ <ItemGroup >
54
+ <EmbeddedResource Include =" runtimeassemblies.txt" >
55
+ <CopyToOutputDirectory >Never</CopyToOutputDirectory >
56
+ </EmbeddedResource >
57
+ </ItemGroup >
44
58
45
59
<ItemGroup >
46
- <PackageReference Include =" Microsoft.Build.Framework" Version =" 15.3.409" />
47
- <PackageReference Include =" Microsoft.Build.Utilities.Core" Version =" 15.3.409" />
60
+ <PackageReference Include =" Microsoft.Build.Framework" Version =" 15.3.409" >
61
+ <PrivateAssets >all</PrivateAssets >
62
+ </PackageReference >
63
+ <PackageReference Include =" Microsoft.Build.Utilities.Core" Version =" 15.3.409" >
64
+ <PrivateAssets >all</PrivateAssets >
65
+ </PackageReference >
48
66
<PackageReference Include =" StyleCop.Analyzers" Version =" 1.0.2" >
49
67
<PrivateAssets >all</PrivateAssets >
50
68
</PackageReference >
Original file line number Diff line number Diff line change 24
24
</PropertyGroup >
25
25
</Target >
26
26
27
+ <UsingTask TaskName =" RemoveRuntimeDependencies"
28
+ AssemblyFile =" $(_FunctionsExtensionsTaskAssemblyFullPath)" />
29
+
30
+ <Target Name =" _FunctionsBuildCleanOutput" AfterTargets =" _GenerateFunctionsPostBuild" Condition =" $(_FunctionsSkipCleanOutput) != 'true'" >
31
+ <RemoveRuntimeDependencies OutputPath =" $(TargetDir)bin" />
32
+ </Target >
33
+
34
+ <Target Name =" _FunctionsPublishCleanOutput" AfterTargets =" _GenerateFunctionsExtensionsMetadataPostPublish" Condition =" $(_FunctionsSkipCleanOutput) != 'true'" >
35
+ <RemoveRuntimeDependencies OutputPath =" $(PublishDir)bin" />
36
+ </Target >
37
+
27
38
<UsingTask TaskName =" GenerateFunctionsExtensionsMetadata"
28
39
AssemblyFile =" $(_FunctionsExtensionsTaskAssemblyFullPath)" />
29
40
You can’t perform that action at this time.
0 commit comments