8
8
<IsPackable Condition =" '$(IsPackable)' != ''" >true</IsPackable >
9
9
<AspNetCoreHostingModel >InProcess</AspNetCoreHostingModel >
10
10
</PropertyGroup >
11
- <ItemGroup >
12
- <PublishReadyToRunExclude Include =" Microsoft.PackageManagement.dll" />
13
- <PublishReadyToRunExclude Include =" Microsoft.PackageManagement.ArchiverProviders.dll" />
14
- <PublishReadyToRunExclude Include =" Microsoft.PackageManagement.CoreProviders.dll" />
15
- <PublishReadyToRunExclude Include =" Microsoft.PackageManagement.MetaProvider.PowerShell.dll" />
16
- <PublishReadyToRunExclude Include =" Microsoft.PackageManagement.NuGetProvider.dll" />
17
- <PublishReadyToRunExclude Include =" Microsoft.Management.Infrastructure.dll" />
18
- <PublishReadyToRunExclude Include =" Microsoft.Management.Infrastructure.Native.dll" />
19
- <PublishReadyToRunExclude Include =" Microsoft.PowerShell.ConsoleHost.dll" />
20
- <PublishReadyToRunExclude Include =" Microsoft.PowerShell.PackageManagement.dll" />
21
- <PublishReadyToRunExclude Include =" Microsoft.PowerShell.Commands.Diagnostics.dll" />
22
- <PublishReadyToRunExclude Include =" Microsoft.PowerShell.Commands.Utility.dll" />
23
- <PublishReadyToRunExclude Include =" Microsoft.PowerShell.MarkdownRender.dll" />
24
- <PublishReadyToRunExclude Include =" Microsoft.PowerShell.Commands.Management.dll" />
25
- <PublishReadyToRunExclude Include =" Microsoft.PowerShell.Security.dll" />
26
- <PublishReadyToRunExclude Include =" Microsoft.CodeAnalysis.CSharp.dll" />
27
- <PublishReadyToRunExclude Include =" System.Management.Automation.dll" />
28
- <PublishReadyToRunExclude Include =" Microsoft.WSMan.Management.dll" />
29
- <PublishReadyToRunExclude Include =" System.DirectoryServices.AccountManagement.dll" />
30
- </ItemGroup >
11
+ <PropertyGroup Condition =" '$(RuntimeIdentifier)' != ''" >
12
+ <PublishReadyToRun >true</PublishReadyToRun >
13
+ <PublishReadyToRunEmitSymbols >true</PublishReadyToRunEmitSymbols >
14
+ <PublishReadyToRunShowWarnings >true</PublishReadyToRunShowWarnings >
15
+ </PropertyGroup >
31
16
<PropertyGroup >
32
17
<AllowUnsafeBlocks >true</AllowUnsafeBlocks >
33
18
<LangVersion >7.3</LangVersion >
123
108
<CopyToOutputDirectory >PreserveNewest</CopyToOutputDirectory >
124
109
</Content >
125
110
</ItemGroup >
126
-
127
- <!-- This target copies the contract assemblies we need to reference as part of function compilation-->
128
- <!-- Temporarily commented out since we're not using contract assemblies -->
129
- <!-- <Target Name="CopyCompilationReferenceFiles" AfterTargets="Build">
111
+
112
+ <!-- Remove all worker items from the ReadyToRun publish list -->
113
+ <Target Name =" ExcludeWorkersFromReadyToRun" BeforeTargets =" _PrepareForReadyToRunCompilation" >
114
+ <CreateItem
115
+ Include =" @(ResolvedFileToPublish)"
116
+ Condition =" $([System.String]::new('%(ResolvedFileToPublish.TargetPath)').StartsWith('workers'))" >
117
+ <Output
118
+ TaskParameter =" Include"
119
+ ItemName =" _ExcludeFromReadyToRun" />
120
+ </CreateItem >
121
+
130
122
<ItemGroup >
131
- <RefSourceFiles Include="$(UserProfile)/.nuget/packages/netstandard.library/2.0.0/build/netstandard2.0/ref/*.dll " />
123
+ <ResolvedFileToPublish Remove = " @(_ExcludeFromReadyToRun) " />
132
124
</ItemGroup >
133
- <Copy SourceFiles="@(RefSourceFiles)" DestinationFiles="@(RefSourceFiles->'$(OutDir)/compilationrefs/%(RecursiveDir)%(Filename)%(Extension)')" />
134
- </Target>-->
125
+ </Target >
126
+
127
+ <!-- Add all worker items back to the publish list -->
128
+ <Target Name =" IncludeWorkersInPublish" AfterTargets =" CreateReadyToRunImages" >
129
+ <CreateItem
130
+ Include =" @(_ExcludeFromReadyToRun)" >
131
+ <Output
132
+ TaskParameter =" Include"
133
+ ItemName =" ResolvedFileToPublish" />
134
+ </CreateItem >
135
+ </Target >
135
136
136
- </Project >
137
+ </Project >
0 commit comments