Skip to content

Commit 9035164

Browse files
committed
Merged PR 18406: Merge from github
2 parents c6732a9 + 1a95562 commit 9035164

File tree

20 files changed

+717
-366
lines changed

20 files changed

+717
-366
lines changed

NuGet.config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
<add key="darc-int-dotnet-runtime-e1825b4" value="true" />
2626
<!-- End: Package sources from dotnet-runtime -->
2727
<!-- Begin: Package sources from dotnet-efcore -->
28-
<add key="darc-int-dotnet-efcore-4953039" value="true" /> from dotnet-efcore -->
28+
<add key="darc-int-dotnet-efcore-4953039" value="true" />
29+
<!-- End: Package sources from dotnet-efcore -->
2930
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
3031
</disabledPackageSources>
3132
</configuration>

eng/Baseline.Designer.props

Lines changed: 208 additions & 208 deletions
Large diffs are not rendered by default.

eng/Baseline.xml

Lines changed: 101 additions & 101 deletions
Large diffs are not rendered by default.

eng/Versions.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<AspNetCoreMajorVersion>5</AspNetCoreMajorVersion>
1010
<AspNetCoreMinorVersion>0</AspNetCoreMinorVersion>
1111
<AspNetCorePatchVersion>11</AspNetCorePatchVersion>
12-
<ValidateBaseline>false</ValidateBaseline>
12+
<ValidateBaseline>true</ValidateBaseline>
1313
<!--
1414
When StabilizePackageVersion is set to 'true', this branch will produce stable outputs for 'Shipping' packages
1515
-->
@@ -238,7 +238,7 @@
238238
<!-- Packages from 2.1, 2.2, and 3.1 branches used for site extension build. -->
239239
<MicrosoftAspNetCoreAzureAppServicesSiteExtension21PackageVersion>2.1.1</MicrosoftAspNetCoreAzureAppServicesSiteExtension21PackageVersion>
240240
<MicrosoftAspNetCoreAzureAppServicesSiteExtension22PackageVersion>2.2.0</MicrosoftAspNetCoreAzureAppServicesSiteExtension22PackageVersion>
241-
<MicrosoftAspNetCoreAzureAppServicesSiteExtension31PackageVersion>3.1.18-servicing-21365-4</MicrosoftAspNetCoreAzureAppServicesSiteExtension31PackageVersion>
241+
<MicrosoftAspNetCoreAzureAppServicesSiteExtension31PackageVersion>3.1.19-servicing-21417-13</MicrosoftAspNetCoreAzureAppServicesSiteExtension31PackageVersion>
242242
<MicrosoftAspNetCoreAzureAppServicesSiteExtension31x64PackageVersion>$(MicrosoftAspNetCoreAzureAppServicesSiteExtension31PackageVersion)</MicrosoftAspNetCoreAzureAppServicesSiteExtension31x64PackageVersion>
243243
<MicrosoftAspNetCoreAzureAppServicesSiteExtension31x86PackageVersion>$(MicrosoftAspNetCoreAzureAppServicesSiteExtension31PackageVersion)</MicrosoftAspNetCoreAzureAppServicesSiteExtension31x86PackageVersion>
244244
<!-- 3rd party dependencies -->

eng/tools/BaselineGenerator/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ private async Task<int> RunUpdateAsync(
242242
WriteEndDocumentOnClose = true,
243243
};
244244

245-
using (var stream = File.OpenWrite(documentPath))
245+
using (var stream = File.Open(documentPath, FileMode.Create))
246246
{
247247
using (var writer = XmlWriter.Create(stream, settings))
248248
{

global.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
22
"sdk": {
3-
"version": "5.0.206"
3+
"version": "5.0.207"
44
},
55
"tools": {
6-
"dotnet": "5.0.206",
6+
"dotnet": "5.0.207",
77
"runtimes": {
88
"dotnet/x64": [
9-
"2.1.29",
9+
"2.1.30",
1010
"$(MicrosoftNETCoreAppInternalPackageVersion)"
1111
],
1212
"dotnet/x86": [
1313
"$(MicrosoftNETCoreAppInternalPackageVersion)"
1414
],
1515
"aspnetcore/x64": [
16-
"3.1.18"
16+
"3.1.19"
1717
]
1818
},
1919
"Git": "2.22.0",

src/Components/benchmarkapps/BlazingPizza.Server/NuGet.config

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22
<configuration>
33
<packageSources>
44
<clear />
5-
<add key="dotnet-core" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
6-
<add key="extensions" value="https://dotnetfeed.blob.core.windows.net/aspnet-extensions/index.json" />
7-
<add key="entityframeworkcore" value="https://dotnetfeed.blob.core.windows.net/aspnet-entityframeworkcore/index.json" />
8-
<add key="aspnetcore-tooling" value="https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore-tooling/index.json" />
9-
<add key="aspnetcore" value="https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore/index.json" />
10-
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
5+
<add key="NuGet.org" value="https://api.nuget.org/v3/index.json" />
116
</packageSources>
127
</configuration>

src/Installers/Windows/SharedFrameworkBundle/Bundle.wxs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:dep="http://schemas.microsoft.com/wix/DependencyExtension" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
3-
<Bundle Name="$(var.BundleName)" Version="$(var.BundleVersion)" Manufacturer="Microsoft Corporation" UpgradeCode="$(var.BundleUpgradeCode)"
4-
dep:ProviderKey="$(var.BundleProviderKey)">
3+
<Bundle Name="$(var.BundleName)" Version="$(var.BundleVersion)" Manufacturer="Microsoft Corporation" UpgradeCode="$(var.BundleUpgradeCode)">
54
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense">
65
<bal:WixStandardBootstrapperApplication LicenseUrl="https://go.microsoft.com/fwlink/?LinkId=329770"
76
LogoFile="DotNetLogo.bmp"

src/Installers/Windows/WindowsHostingBundle/Bundle.wxs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@
7676
<PackageGroupRef Id="PG_ANCM" />
7777
<PackageGroupRef Id="PG_DOTNET_REDIST_LTS_BUNDLE" />
7878
<!--<PackageGroupRef Id="PG_DOTNET_REDIST_FTS_BUNDLE" />-->
79-
<PackageGroupRef Id="PG_AspNetCoreSharedFramework_x86" />
80-
<PackageGroupRef Id="PG_AspNetCoreSharedFramework_x64" />
79+
<PackageGroupRef Id="PG_SHAREDFX_REDIST_BUNDLE" />
8180
</Chain>
8281
</Bundle>
8382
</Wix>

src/Installers/Windows/WindowsHostingBundle/Product.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<DotNetDarkOutputPath>$(IntermediateOutputPath)d\</DotNetDarkOutputPath>
44
<DepsPath>$(BaseIntermediateOutputPath)</DepsPath>
55
<DefineConstants>$(DefineConstants);DepsPath=$(DepsPath)</DefineConstants>
6+
<DefineConstants>$(DefineConstants);InstallersOutputPath=$(InstallersOutputPath)</DefineConstants>
67
</PropertyGroup>
78

89
<ItemGroup>
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
3+
<Fragment>
4+
<PackageGroup Id="PG_SHAREDFX_REDIST_BUNDLE">
5+
<RollbackBoundary Id="RB_SHAREDFX_REDIST_BUNDLE" />
6+
7+
<ExePackage Id="SharedFxRedist_x64" SourceFile="$(var.InstallersOutputPath)\$(var.SharedFxRedistInstallerx64)"
8+
Name="$(var.SharedFxRedistInstallerx64)"
9+
Compressed="yes"
10+
Vital="yes"
11+
InstallCondition="VersionNT64 AND (NOT OPT_NO_SHAREDFX)"
12+
InstallCommand="/quiet /norestart"
13+
RepairCommand="/quiet /repair"
14+
Permanent="yes"
15+
DetectCondition="SharedFxRedistProductVersion_x64 = v$(var.SharedFxInstallerProductVersionx64)">
16+
</ExePackage>
17+
18+
<ExePackage Id="SharedFxRedist_x86" SourceFile="$(var.InstallersOutputPath)\$(var.SharedFxRedistInstallerx86)"
19+
Name="$(var.SharedFxRedistInstallerx86)"
20+
Compressed="yes"
21+
Vital="yes"
22+
InstallCondition="(NOT OPT_NO_SHAREDFX) AND (NOT OPT_NO_X86)"
23+
InstallCommand="/quiet /norestart"
24+
RepairCommand="/quiet /repair"
25+
Permanent="yes"
26+
DetectCondition="SharedFxRedistProductVersion_x86 = v$(var.SharedFxInstallerProductVersionx86)">
27+
</ExePackage>
28+
</PackageGroup>
29+
</Fragment>
30+
31+
<Fragment>
32+
<util:ProductSearch Id="SharedFxRedistProductSearch_x86"
33+
Condition="NOT VersionNT64"
34+
ProductCode="$(var.SharedFxInstallerProductCodex86)"
35+
Result="version"
36+
Variable="SharedFxRedistProductVersion_x86" />
37+
38+
<util:ProductSearch Id="SharedFxRedistProductSearch_x64"
39+
Condition="VersionNT64"
40+
ProductCode="$(var.SharedFxInstallerProductCodex64)"
41+
Result="version"
42+
Variable="SharedFxRedistProductVersion_x64" />
43+
</Fragment>
44+
</Wix>

src/Installers/Windows/WindowsHostingBundle/WindowsHostingBundle.wixproj

Lines changed: 56 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
<Compile Include="ANCM.wxs" />
3636
<Compile Include="Bundle.wxs" />
3737
<Compile Include="DotNetCore.wxs" />
38+
<Compile Include="SharedFramework.wxs" />
3839
<EmbeddedResource Include="thm.wxl" />
3940
</ItemGroup>
4041

@@ -53,19 +54,9 @@
5354
<Private>True</Private>
5455
<DoNotHarvest>true</DoNotHarvest>
5556
</ProjectReference>
56-
<ProjectReference Include="..\SharedFrameworkLib\SharedFrameworkLib.wixproj">
57-
<SetPlatform>Platform=x86</SetPlatform>
58-
<Name>SharedFrameworkLib_x86</Name>
59-
<Project>{5244BC49-2568-4701-80A6-EAB8950AB5FA}</Project>
57+
<ProjectReference Include="..\SharedFrameworkBundle\SharedFrameworkBundle.wixproj">
6058
<Private>True</Private>
61-
<DoNotHarvest>true</DoNotHarvest>
62-
</ProjectReference>
63-
<ProjectReference Include="..\SharedFrameworkLib\SharedFrameworkLib.wixproj">
64-
<SetPlatform>Platform=x64</SetPlatform>
65-
<Name>SharedFrameworkLib_x64</Name>
66-
<Project>{5244BC49-2568-4701-80A6-EAB8950AB5FA}</Project>
67-
<Private>True</Private>
68-
<DoNotHarvest>true</DoNotHarvest>
59+
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
6960
</ProjectReference>
7061
</ItemGroup>
7162

@@ -77,6 +68,10 @@
7768
<PackageFileName>dotnet-hosting-$(PackageVersion)-win$(TargetExt)</PackageFileName>
7869

7970
<BundleNameShort>Microsoft .NET $(PackageBrandingVersion)</BundleNameShort>
71+
<SharedFxPackageVersion>$(PackageVersion)</SharedFxPackageVersion>
72+
<SharedFxMsiVersion>$(PackageVersion)</SharedFxMsiVersion>
73+
<SharedFxMsiVersion
74+
Condition="! $(PackageVersion.Contains('$(_PreReleaseLabel)'))">$(PackageVersion)-$(_PreReleaseLabel)$(_BuildNumberLabels)</SharedFxMsiVersion>
8075
</PropertyGroup>
8176

8277
<PropertyGroup>
@@ -93,6 +88,19 @@
9388
<BundleRegName>$(BundleNameFull)</BundleRegName>
9489
</PropertyGroup>
9590

91+
<ItemGroup>
92+
<SharedFxInstallers Include="$(InstallersOutputPath)$(RuntimeInstallerBaseName)-$(SharedFxPackageVersion)-win-x64.exe">
93+
<TargetPlatform>x64</TargetPlatform>
94+
<BundleNameProperty>SharedFxRedistInstallerx64</BundleNameProperty>
95+
<Version>$(SharedFxPackageVersion)</Version>
96+
</SharedFxInstallers>
97+
<SharedFxInstallers Include="$(InstallersOutputPath)$(RuntimeInstallerBaseName)-$(SharedFxPackageVersion)-win-x86.exe">
98+
<TargetPlatform>x86</TargetPlatform>
99+
<BundleNameProperty>SharedFxRedistInstallerx86</BundleNameProperty>
100+
<Version>$(SharedFxPackageVersion)</Version>
101+
</SharedFxInstallers>
102+
</ItemGroup>
103+
96104
<PropertyGroup>
97105
<DefineConstants>$(DefineConstants);BundleName=$(BundleName)</DefineConstants>
98106
<DefineConstants>$(DefineConstants);BundleNameFull=$(BundleNameFull)</DefineConstants>
@@ -104,4 +112,40 @@
104112
<DefineConstants>$(DefineConstants);BundleRegFamily=$(BundleRegFamily)</DefineConstants>
105113
<DefineConstants>$(DefineConstants);BundleRegName=$(BundleRegName)</DefineConstants>
106114
</PropertyGroup>
115+
116+
<Target Name="ExtractPropertiesFromSharedFxMsi" DependsOnTargets="FetchDependencies" AfterTargets="ResolveProjectReferences">
117+
<!-- Create properties that holds the executable name. These are passed to the bundles so we can reference them as variables
118+
from inside the ExePackage authoring. -->
119+
<CreateProperty Value="%(SharedFxInstallers.Filename)%(Extension)">
120+
<Output TaskParameter="Value" PropertyName="%(SharedFxInstallers.BundleNameProperty)"/>
121+
</CreateProperty>
122+
123+
<ItemGroup>
124+
<SharedFxPayload Include="$(InstallersOutputPath)$(RuntimeInstallerBaseName)-$(SharedFxMsiVersion)-win-x64.msi">
125+
<ProductVersionProperty>SharedFxInstallerProductVersionx64</ProductVersionProperty>
126+
<ProductCodeProperty>SharedFxInstallerProductCodex64</ProductCodeProperty>
127+
</SharedFxPayload>
128+
<SharedFxPayload Include="$(InstallersOutputPath)$(RuntimeInstallerBaseName)-$(SharedFxMsiVersion)-win-x86.msi">
129+
<ProductVersionProperty>SharedFxInstallerProductVersionx86</ProductVersionProperty>
130+
<ProductCodeProperty>SharedFxInstallerProductCodex86</ProductCodeProperty>
131+
</SharedFxPayload>
132+
</ItemGroup>
133+
134+
<!-- Read MSI properties -->
135+
<GetMsiProperty InstallPackage="%(SharedFxPayload.Identity)" Property="ProductVersion">
136+
<Output TaskParameter="Value" PropertyName="%(ProductVersionProperty)" />
137+
</GetMsiProperty>
138+
<GetMsiProperty InstallPackage="%(SharedFxPayload.Identity)" Property="ProductCode">
139+
<Output TaskParameter="Value" PropertyName="%(ProductCodeProperty)" />
140+
</GetMsiProperty>
141+
142+
<PropertyGroup>
143+
<DefineConstants>$(DefineConstants);SharedFxRedistInstallerx64=$(SharedFxRedistInstallerx64)</DefineConstants>
144+
<DefineConstants>$(DefineConstants);SharedFxInstallerProductVersionx64=$(SharedFxInstallerProductVersionx64)</DefineConstants>
145+
<DefineConstants>$(DefineConstants);SharedFxInstallerProductCodex64=$(SharedFxInstallerProductCodex64)</DefineConstants>
146+
<DefineConstants>$(DefineConstants);SharedFxRedistInstallerx86=$(SharedFxRedistInstallerx86)</DefineConstants>
147+
<DefineConstants>$(DefineConstants);SharedFxInstallerProductVersionx86=$(SharedFxInstallerProductVersionx86)</DefineConstants>
148+
<DefineConstants>$(DefineConstants);SharedFxInstallerProductCodex86=$(SharedFxInstallerProductCodex86)</DefineConstants>
149+
</PropertyGroup>
150+
</Target>
107151
</Project>

src/Mvc/benchmarkapps/NuGet.config

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22
<configuration>
33
<packageSources>
44
<clear />
5-
<add key="dotnet-core" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
6-
<add key="extensions" value="https://dotnetfeed.blob.core.windows.net/aspnet-extensions/index.json" />
7-
<add key="entityframeworkcore" value="https://dotnetfeed.blob.core.windows.net/aspnet-entityframeworkcore/index.json" />
8-
<add key="aspnetcore-tooling" value="https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore-tooling/index.json" />
9-
<add key="aspnetcore" value="https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore/index.json" />
10-
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
5+
<add key="NuGet.org" value="https://api.nuget.org/v3/index.json" />
116
</packageSources>
127
</configuration>

src/Servers/Kestrel/Core/src/Internal/Http/Http1OutputProducer.cs

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ internal class Http1OutputProducer : IHttpOutputProducer, IDisposable
4949

5050
private readonly ConcurrentPipeWriter _pipeWriter;
5151
private IMemoryOwner<byte> _fakeMemoryOwner;
52+
private byte[] _fakeMemory;
5253

5354
// Chunked responses need to be treated uniquely when using GetMemory + Advance.
5455
// We need to know the size of the data written to the chunk before calling Advance on the
@@ -419,6 +420,12 @@ public void Dispose()
419420
_fakeMemoryOwner = null;
420421
}
421422

423+
if (_fakeMemory != null)
424+
{
425+
ArrayPool<byte>.Shared.Return(_fakeMemory);
426+
_fakeMemory = null;
427+
}
428+
422429
// Call dispose on any memory that wasn't written.
423430
if (_completedSegments != null)
424431
{
@@ -656,13 +663,48 @@ private void WriteCurrentChunkMemoryToPipeWriter(ref BufferWriter<PipeWriter> wr
656663
_advancedBytesForChunk = 0;
657664
}
658665

659-
private Memory<byte> GetFakeMemory(int sizeHint)
666+
internal Memory<byte> GetFakeMemory(int minSize)
660667
{
661-
if (_fakeMemoryOwner == null)
668+
// Try to reuse _fakeMemoryOwner
669+
if (_fakeMemoryOwner != null)
670+
{
671+
if (_fakeMemoryOwner.Memory.Length < minSize)
672+
{
673+
_fakeMemoryOwner.Dispose();
674+
_fakeMemoryOwner = null;
675+
}
676+
else
677+
{
678+
return _fakeMemoryOwner.Memory;
679+
}
680+
}
681+
682+
// Try to reuse _fakeMemory
683+
if (_fakeMemory != null)
684+
{
685+
if (_fakeMemory.Length < minSize)
686+
{
687+
ArrayPool<byte>.Shared.Return(_fakeMemory);
688+
_fakeMemory = null;
689+
}
690+
else
691+
{
692+
return _fakeMemory;
693+
}
694+
}
695+
696+
// Requesting a bigger buffer could throw.
697+
if (minSize <= _memoryPool.MaxBufferSize)
698+
{
699+
// Use the specified pool as it fits.
700+
_fakeMemoryOwner = _memoryPool.Rent(minSize);
701+
return _fakeMemoryOwner.Memory;
702+
}
703+
else
662704
{
663-
_fakeMemoryOwner = _memoryPool.Rent(sizeHint);
705+
// Use the array pool. Its MaxBufferSize is int.MaxValue.
706+
return _fakeMemory = ArrayPool<byte>.Shared.Rent(minSize);
664707
}
665-
return _fakeMemoryOwner.Memory;
666708
}
667709

668710
private Memory<byte> LeasedMemory(int sizeHint)

0 commit comments

Comments
 (0)