Skip to content

Commit 05e132e

Browse files
committed
Rebase latest code
1 parent f332b1f commit 05e132e

File tree

199 files changed

+2212
-4241
lines changed

Some content is hidden

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

199 files changed

+2212
-4241
lines changed

NuGet.config

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<packageSources>
44
<clear />
55
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
66
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
77
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
8+
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
9+
<add key="CoreWCF_Dev" value="https://pkgs.dev.azure.com/dotnet/CoreWCF/_packaging/CoreWCF/nuget/v3/index.json" />
810
</packageSources>
911
<disabledPackageSources />
1012
</configuration>

System.ServiceModel.sln

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Encoding.MessageVersion.Int
4949
EndProject
5050
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Extensibility.MessageEncoder.IntegrationTests", "src\System.Private.ServiceModel\tests\Scenarios\Extensibility\MessageEncoder\Extensibility.MessageEncoder.IntegrationTests.csproj", "{76361777-321D-4588-87F9-38992A758350}"
5151
EndProject
52-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Extensibility.MessageInterceptor.IntegrationTests", "src\System.Private.ServiceModel\tests\Scenarios\Extensibility\MessageInterceptor\Extensibility.MessageInterceptor.IntegrationTests.csproj", "{ACCCB1B8-5ABE-4F3B-BFEF-9A9C15AA1267}"
53-
EndProject
5452
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Extensibility.WebSockets.IntegrationTests", "src\System.Private.ServiceModel\tests\Scenarios\Extensibility\WebSockets\Extensibility.WebSockets.IntegrationTests.csproj", "{C8CA16D3-5B1E-4EC0-A817-205A798DC272}"
5553
EndProject
5654
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Infrastructure.IntegrationTests", "src\System.Private.ServiceModel\tests\Scenarios\Infrastructure\Infrastructure.IntegrationTests.csproj", "{719E874A-AEFA-44D5-9530-9C41BD0FA4E8}"
@@ -91,6 +89,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Binding.UDS.IntegrationTest
9189
EndProject
9290
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.ServiceModel.NetNamedPipe.Tests", "src\System.ServiceModel.NetNamedPipe\tests\System.ServiceModel.NetNamedPipe.Tests.csproj", "{FD188537-21AF-48C5-84FF-F8758F4C42A8}"
9391
EndProject
92+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SelfHostedCoreWCFService", "src\System.Private.ServiceModel\tools\SelfHostedCoreWcfService\SelfHostedCoreWCFService.csproj", "{D89D949F-254B-4A29-AE78-DEB081ACA601}"
93+
EndProject
9494
Global
9595
GlobalSection(SolutionConfigurationPlatforms) = preSolution
9696
Debug|Any CPU = Debug|Any CPU
@@ -189,10 +189,6 @@ Global
189189
{76361777-321D-4588-87F9-38992A758350}.Debug|Any CPU.Build.0 = Debug|Any CPU
190190
{76361777-321D-4588-87F9-38992A758350}.Release|Any CPU.ActiveCfg = Release|Any CPU
191191
{76361777-321D-4588-87F9-38992A758350}.Release|Any CPU.Build.0 = Release|Any CPU
192-
{ACCCB1B8-5ABE-4F3B-BFEF-9A9C15AA1267}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
193-
{ACCCB1B8-5ABE-4F3B-BFEF-9A9C15AA1267}.Debug|Any CPU.Build.0 = Debug|Any CPU
194-
{ACCCB1B8-5ABE-4F3B-BFEF-9A9C15AA1267}.Release|Any CPU.ActiveCfg = Release|Any CPU
195-
{ACCCB1B8-5ABE-4F3B-BFEF-9A9C15AA1267}.Release|Any CPU.Build.0 = Release|Any CPU
196192
{C8CA16D3-5B1E-4EC0-A817-205A798DC272}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
197193
{C8CA16D3-5B1E-4EC0-A817-205A798DC272}.Debug|Any CPU.Build.0 = Debug|Any CPU
198194
{C8CA16D3-5B1E-4EC0-A817-205A798DC272}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -265,6 +261,10 @@ Global
265261
{FD188537-21AF-48C5-84FF-F8758F4C42A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
266262
{FD188537-21AF-48C5-84FF-F8758F4C42A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
267263
{FD188537-21AF-48C5-84FF-F8758F4C42A8}.Release|Any CPU.Build.0 = Release|Any CPU
264+
{D89D949F-254B-4A29-AE78-DEB081ACA601}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
265+
{D89D949F-254B-4A29-AE78-DEB081ACA601}.Debug|Any CPU.Build.0 = Debug|Any CPU
266+
{D89D949F-254B-4A29-AE78-DEB081ACA601}.Release|Any CPU.ActiveCfg = Release|Any CPU
267+
{D89D949F-254B-4A29-AE78-DEB081ACA601}.Release|Any CPU.Build.0 = Release|Any CPU
268268
EndGlobalSection
269269
GlobalSection(SolutionProperties) = preSolution
270270
HideSolutionNode = FALSE
@@ -289,7 +289,6 @@ Global
289289
{48C41A27-631F-45FA-ACD5-7D7EDD4A4931} = {D6302510-AB10-4775-BCE9-98FA96FDEB76}
290290
{36DD97F6-1F78-4843-A9C0-58C59D367603} = {D6302510-AB10-4775-BCE9-98FA96FDEB76}
291291
{76361777-321D-4588-87F9-38992A758350} = {D6302510-AB10-4775-BCE9-98FA96FDEB76}
292-
{ACCCB1B8-5ABE-4F3B-BFEF-9A9C15AA1267} = {D6302510-AB10-4775-BCE9-98FA96FDEB76}
293292
{C8CA16D3-5B1E-4EC0-A817-205A798DC272} = {D6302510-AB10-4775-BCE9-98FA96FDEB76}
294293
{719E874A-AEFA-44D5-9530-9C41BD0FA4E8} = {D6302510-AB10-4775-BCE9-98FA96FDEB76}
295294
{E878E412-F0AB-4D87-8A7A-3114AAC48CD5} = {D6302510-AB10-4775-BCE9-98FA96FDEB76}

azure-pipelines-arcade-PR.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ variables:
3131
value: true
3232
- name: _RunAsInternal
3333
value: false
34+
- name: _RunWithCoreWcfService
35+
value: true
3436

3537
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
3638
- name: _RunAsPublic
@@ -134,6 +136,7 @@ stages:
134136
XUnitWorkItemTimeout: $(_xUnitWorkItemTimeout)
135137
RunAsPublic: $(_RunAsPublic)
136138
RunAsInternal: $(_RunAsInternal)
139+
RunWithCoreWcfService: $(_RunWithCoreWcfService)
137140
IsWindowsBuild: true
138141

139142
# Only build and test Linux in PR and CI builds.
@@ -194,6 +197,7 @@ stages:
194197
ServiceHost: $(_serviceUri)
195198
RunAsPublic: $(_RunAsPublic)
196199
RunAsInternal: $(_RunAsInternal)
200+
RunWithCoreWcfService: $(_RunWithCoreWcfService)
197201
IsWindowsBuild: false
198202

199203
# Only build and test MacOS in PR and CI builds.
@@ -253,4 +257,5 @@ stages:
253257
ServiceHost: $(_serviceUri)
254258
RunAsPublic: $(_RunAsPublic)
255259
RunAsInternal: $(_RunAsInternal)
260+
RunWithCoreWcfService: $(_RunWithCoreWcfService)
256261
IsWindowsBuild: false

azure-pipelines-arcade.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ variables:
2424
value: false
2525
- name: _RunAsInternal
2626
value: true
27+
- name: _RunWithCoreWcfService
28+
value: true
2729
- group: DotNet-Wcf-SDLValidation-Params
2830
resources:
2931
repositories:
@@ -98,6 +100,7 @@ extends:
98100
XUnitWorkItemTimeout: $(_xUnitWorkItemTimeout)
99101
RunAsPublic: $(_RunAsPublic)
100102
RunAsInternal: $(_RunAsInternal)
103+
RunWithCoreWcfService: $(_RunWithCoreWcfService)
101104
IsWindowsBuild: true
102105
- ${{ if eq(variables._RunAsInternal, True) }}:
103106
- template: /eng/common/templates-official/post-build/post-build.yml@self

eng/SendToHelix.proj

Lines changed: 52 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,35 @@
1-
<Project Sdk="Microsoft.DotNet.Helix.Sdk" DefaultTargets="Test">
1+
<Project Sdk="Microsoft.DotNet.Helix.Sdk" InitialTargets="InstallDotNet;Test">
22
<PropertyGroup>
33
<HelixSource Condition=" '$(RunAsPublic)' == 'true' ">pr/dotnet/wcf/$(BUILD_SOURCEBRANCH)/</HelixSource>
44
<HelixSource Condition=" '$(RunAsInternal)' == 'true' ">official/dotnet/wcf/$(BUILD_SOURCEBRANCH)/</HelixSource>
55
<HelixType>test/product/</HelixType>
66
<HelixBuild>$(BUILD_BUILDNUMBER)</HelixBuild>
77
<HelixBuild Condition="'$(HelixBuild)' == ''">123460.01</HelixBuild>
8-
<DotNetCliPackageType>sdk</DotNetCliPackageType>
9-
<DotNetCliVersion>8.0.100</DotNetCliVersion>
10-
<IncludeDotNetCli>true</IncludeDotNetCli>
118

9+
<!-- Read global.json so we know the version of the dotnet cli we need -->
10+
<GlobalJsonContent>$([System.IO.File]::ReadAllText('$(RepoRoot)global.json'))</GlobalJsonContent>
11+
<DotNetCliPackageType>sdk</DotNetCliPackageType>
12+
<DotNetCliVersion>$([System.Text.RegularExpressions.Regex]::Match($(GlobalJsonContent), '(%3F&lt;="dotnet": ").*(%3F=")'))</DotNetCliVersion>
13+
14+
<IncludeDotNetCli>true</IncludeDotNetCli>
1215
<EnableAzurePipelinesReporter>true</EnableAzurePipelinesReporter>
1316
<TestRunNamePrefix>$(AGENT_JOBNAME)</TestRunNamePrefix>
14-
1517
<EnableXUnitReporter>true</EnableXUnitReporter>
1618
</PropertyGroup>
1719

20+
<Target Name="InstallDotNet">
21+
<ItemGroup>
22+
<AdditionalDotNetPackage Include="8.0.5">
23+
<PackageType>aspnetcore-runtime</PackageType>
24+
<Channel>Current</Channel>
25+
</AdditionalDotNetPackage>
26+
</ItemGroup>
27+
</Target>
28+
29+
<ItemGroup>
30+
<ProjectsToBuild Include="..\src\System.Private.ServiceModel\tools\SelfHostedCoreWcfService\SelfHostedCoreWCFService.csproj"/>
31+
</ItemGroup>
32+
1833
<ItemGroup>
1934
<XUnitProject Include="..\src\System.Private.ServiceModel\tests\Scenarios\**\*.IntegrationTests.csproj">
2035
<TargetFramework>$(XUnitPublishTargetFramework)</TargetFramework>
@@ -54,19 +69,48 @@
5469
<Creator>$(BUILD_SOURCEVERSIONAUTHOR)</Creator>
5570
<Creator Condition=" '$(Creator)' == ''">anon</Creator>
5671
</PropertyGroup>
57-
58-
<PropertyGroup Condition="!$(HelixTargetQueue.StartsWith('Windows'))">
72+
73+
<PropertyGroup>
74+
<RunWithCoreWcfService>false</RunWithCoreWcfService>
75+
</PropertyGroup>
76+
77+
<PropertyGroup Condition="'$(RunWithCoreWcfService)' == 'false' AND '$(TestJob)' == 'Linux'" >
5978
<HelixPreCommands>$(HelixPreCommands);chmod a+x $HELIX_CORRELATION_PAYLOAD/InstallRootCertificate.sh</HelixPreCommands>
6079
<HelixPreCommands>$(HelixPreCommands);sudo -E -n $HELIX_CORRELATION_PAYLOAD/InstallRootCertificate.sh --service-host $(ServiceHost) --cert-file /tmp/wcfrootca.crt</HelixPreCommands>
6180
</PropertyGroup>
6281

63-
<Target Name="Pack"/>
82+
<PropertyGroup Condition="'$(RunWithCoreWcfService)' == 'true' AND '$(TestJob)' == 'Windows'">
83+
<HelixPreCommands>$(HelixPreCommands);set PATH=%HELIX_CORRELATION_PAYLOAD%\dotnet-cli%3B%PATH%</HelixPreCommands>
84+
<!-- %3B is an escaped ; -->
85+
<HelixPreCommands>$(HelixPreCommands);set DOTNET_ROOT=%HELIX_CORRELATION_PAYLOAD%\dotnet-cli;set DOTNET_CLI_TELEMETRY_OPTOUT=1</HelixPreCommands>
86+
<HelixPreCommands>$(HelixPreCommands);set DOTNET_CLI_HOME=%HELIX_WORKITEM_ROOT%\.dotnet</HelixPreCommands>
87+
<HelixPreCommands>$(HelixPreCommands);set NUGET_PACKAGES=%HELIX_WORKITEM_ROOT%\.nuget</HelixPreCommands>
88+
<HelixPreCommands>$(HelixPreCommands);set ServiceUri=localhost</HelixPreCommands>
89+
<HelixPreCommands>$(HelixPreCommands);%HELIX_CORRELATION_PAYLOAD%\SelfHostedCoreWCFService\$(Configuration)\net8.0\SelfHostedCoreWCFService bootstrap:true</HelixPreCommands>
90+
</PropertyGroup>
91+
92+
<PropertyGroup Condition="'$(RunWithCoreWcfService)' == 'true' AND '$(TestJob)' != 'Windows'">
93+
<HelixPreCommands>$(HelixPreCommands);export PATH=$HELIX_CORRELATION_PAYLOAD/dotnet-cli:$PATH</HelixPreCommands>
94+
<HelixPreCommands>$(HelixPreCommands);export DOTNET_ROOT=$HELIX_CORRELATION_PAYLOAD/dotnet-cli;export DOTNET_CLI_TELEMETRY_OPTOUT=1</HelixPreCommands>
95+
<HelixPreCommands>$(HelixPreCommands);export DOTNET_CLI_HOME=$HELIX_WORKITEM_ROOT/.dotnet</HelixPreCommands>
96+
<HelixPreCommands>$(HelixPreCommands);export NUGET_PACKAGES=$HELIX_WORKITEM_ROOT/.nuget</HelixPreCommands>
97+
<HelixPreCommands>$(HelixPreCommands);export ServiceUri=localhost</HelixPreCommands>
98+
<HelixPreCommands>$(HelixPreCommands);dotnet exec --roll-forward Major $HELIX_CORRELATION_PAYLOAD/SelfHostedCoreWCFService/$(Configuration)/net8.0/SelfHostedCoreWCFService.dll bootstrap:true</HelixPreCommands>
99+
</PropertyGroup>
100+
101+
<Target Name="BuildProjects">
102+
<MSBuild Targets="Publish" Projects="@(ProjectsToBuild)" Properties="PublishDir='$(MSBuildThisFileDirectory)\..\artifacts\bin\SelfHostedCoreWCFService'" />
103+
</Target>
64104

65105
<ItemGroup>
66106
<!-- Directory that is zipped up and sent as a correlation payload to Helix -->
67107
<HelixCorrelationPayload Include="$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\src\System.Private.ServiceModel\tools\scripts'))" >
68108
<PayloadDirectory>%(Identity)</PayloadDirectory>
69109
</HelixCorrelationPayload>
110+
111+
<HelixCorrelationPayload Include="$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\artifacts\bin\SelfHostedCoreWCFService'))" >
112+
<Destination>SelfHostedCoreWCFService</Destination>
113+
</HelixCorrelationPayload>
70114
</ItemGroup>
71115

72116
<PropertyGroup>

src/System.Private.ServiceModel/tests/Common/Infrastructure/ServiceUtilHelper.cs

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,14 @@ public static string GetResourceFromServiceAsString(string resource)
535535
using (HttpClient httpClient = new HttpClient())
536536
{
537537
HttpResponseMessage response = httpClient.GetAsync(requestUri).GetAwaiter().GetResult();
538-
return response.Content.ReadAsStringAsync().GetAwaiter().GetResult();
538+
if (response.IsSuccessStatusCode)
539+
{
540+
return response.Content.ReadAsStringAsync().GetAwaiter().GetResult();
541+
}
542+
else
543+
{
544+
throw new Exception($"Got Status code {response.StatusCode} from {requestUri}.");
545+
}
539546
}
540547
}
541548

@@ -547,7 +554,14 @@ public static byte[] GetResourceFromServiceAsByteArray(string resource)
547554
using (HttpClient httpClient = new HttpClient())
548555
{
549556
HttpResponseMessage response = httpClient.GetAsync(requestUri).GetAwaiter().GetResult();
550-
return response.Content.ReadAsByteArrayAsync().GetAwaiter().GetResult();
557+
if (response.IsSuccessStatusCode)
558+
{
559+
return response.Content.ReadAsByteArrayAsync().GetAwaiter().GetResult();
560+
}
561+
else
562+
{
563+
throw new Exception($"Got Status code {response.StatusCode} from {requestUri}.");
564+
}
551565
}
552566
}
553567

@@ -559,7 +573,14 @@ public static async Task<byte[]> GetResourceFromServiceAsByteArrayAsync(string r
559573
using (HttpClient httpClient = new HttpClient())
560574
{
561575
HttpResponseMessage response = await httpClient.GetAsync(requestUri);
562-
return await response.Content.ReadAsByteArrayAsync();
576+
if (response.IsSuccessStatusCode)
577+
{
578+
return await response.Content.ReadAsByteArrayAsync();
579+
}
580+
else
581+
{
582+
throw new Exception($"Got Status code {response.StatusCode} from {requestUri}.");
583+
}
563584
}
564585
}
565586
}

src/System.Private.ServiceModel/tests/Common/Infrastructure/testproperties.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</PropertyGroup>
2020

2121
<PropertyGroup Condition="'$(ServiceTcpPort)' == ''">
22-
<ServiceTcpPort>809</ServiceTcpPort>
22+
<ServiceTcpPort>8808</ServiceTcpPort>
2323
</PropertyGroup>
2424

2525
<PropertyGroup Condition="'$(ServiceWebSocketPort)' == ''">

0 commit comments

Comments
 (0)