Skip to content

Commit 1e3d9ee

Browse files
committed
Merge branch 'main' into AddCoreWcfServicesLatest
2 parents bae0e73 + 3e24c11 commit 1e3d9ee

File tree

19 files changed

+749
-108
lines changed

19 files changed

+749
-108
lines changed

azure-pipelines-arcade-PR.yml

+10-8
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ stages:
107107
steps:
108108
- checkout: self
109109
clean: true
110-
- ${{ if eq(variables._RunAsPublic, True) }}:
110+
- ${{ if and(eq(variables._RunAsPublic, True), ne(variables._RunWithCoreWcfService, True)) }}:
111111
- template: /eng/UpdatePRService.yml
112112
parameters:
113113
wcfPRServiceId: $(_WcfPRServiceId)
@@ -172,9 +172,10 @@ stages:
172172
steps:
173173
- checkout: self
174174
clean: true
175-
- template: /eng/UpdatePRService.yml
176-
parameters:
177-
wcfPRServiceId: $(_WcfPRServiceId)
175+
- ${{ if and(eq(variables._RunAsPublic, True), ne(variables._RunWithCoreWcfService, True)) }}:
176+
- template: /eng/UpdatePRService.yml
177+
parameters:
178+
wcfPRServiceId: $(_WcfPRServiceId)
178179
- script: eng/common/cibuild.sh
179180
-configuration $(_BuildConfig)
180181
-preparemachine
@@ -232,9 +233,10 @@ stages:
232233
steps:
233234
- checkout: self
234235
clean: true
235-
- template: /eng/UpdatePRService.yml
236-
parameters:
237-
wcfPRServiceId: $(_WcfPRServiceId)
236+
- ${{ if and(eq(variables._RunAsPublic, True), ne(variables._RunWithCoreWcfService, True)) }}:
237+
- template: /eng/UpdatePRService.yml
238+
parameters:
239+
wcfPRServiceId: $(_WcfPRServiceId)
238240
- script: eng\common\cibuild.cmd
239241
-configuration $(_BuildConfig)
240242
-preparemachine
@@ -258,4 +260,4 @@ stages:
258260
ServiceHost: $(_serviceUri)
259261
RunAsPublic: $(_RunAsPublic)
260262
RunAsInternal: $(_RunAsInternal)
261-
IsWindowsBuild: false
263+
IsWindowsBuild: false

eng/Version.Details.xml

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
<ProductDependencies>
55
</ProductDependencies>
66
<ToolsetDependencies>
7-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24414.3">
7+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.24459.1">
88
<Uri>https://github.com/dotnet/arcade</Uri>
9-
<Sha>4d15f8d1f2d61f6513b70f0bcd4bd3c1828a3a68</Sha>
9+
<Sha>8260f289b9d748432a34680a1afeac677cda6049</Sha>
1010
</Dependency>
11-
<Dependency Name="Microsoft.DotNet.GenFacades" Version="9.0.0-beta.24414.3">
11+
<Dependency Name="Microsoft.DotNet.GenFacades" Version="10.0.0-beta.24459.1">
1212
<Uri>https://github.com/dotnet/arcade</Uri>
13-
<Sha>4d15f8d1f2d61f6513b70f0bcd4bd3c1828a3a68</Sha>
13+
<Sha>8260f289b9d748432a34680a1afeac677cda6049</Sha>
1414
</Dependency>
15-
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="9.0.0-beta.24414.3">
15+
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="10.0.0-beta.24459.1">
1616
<Uri>https://github.com/dotnet/arcade</Uri>
17-
<Sha>4d15f8d1f2d61f6513b70f0bcd4bd3c1828a3a68</Sha>
17+
<Sha>8260f289b9d748432a34680a1afeac677cda6049</Sha>
1818
</Dependency>
1919
</ToolsetDependencies>
2020
</Dependencies>

eng/Versions.props

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
</PropertyGroup>
1919
<!-- Arcade dependencies -->
2020
<PropertyGroup>
21-
<MicrosoftDotNetGenFacadesPackageVersion>9.0.0-beta.24414.3</MicrosoftDotNetGenFacadesPackageVersion>
22-
<MicrosoftDotNetXUnitExtensionsPackageVersion>9.0.0-beta.24414.3</MicrosoftDotNetXUnitExtensionsPackageVersion>
21+
<MicrosoftDotNetGenFacadesPackageVersion>10.0.0-beta.24459.1</MicrosoftDotNetGenFacadesPackageVersion>
22+
<MicrosoftDotNetXUnitExtensionsPackageVersion>10.0.0-beta.24459.1</MicrosoftDotNetXUnitExtensionsPackageVersion>
2323
</PropertyGroup>
2424
<!-- CoreFx dependencies -->
2525
<PropertyGroup>

eng/common/SetupNugetSources.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ if ($dotnet31Source -ne $null) {
157157
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -pwd $Password
158158
}
159159

160-
$dotnetVersions = @('5','6','7','8')
160+
$dotnetVersions = @('5','6','7','8','9')
161161

162162
foreach ($dotnetVersion in $dotnetVersions) {
163163
$feedPrefix = "dotnet" + $dotnetVersion;

eng/common/SetupNugetSources.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ if [ "$?" == "0" ]; then
9999
PackageSources+=('dotnet3.1-internal-transport')
100100
fi
101101

102-
DotNetVersions=('5' '6' '7' '8')
102+
DotNetVersions=('5' '6' '7' '8' '9')
103103

104104
for DotNetVersion in ${DotNetVersions[@]} ; do
105105
FeedPrefix="dotnet${DotNetVersion}";

eng/common/core-templates/job/job.yml

-5
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ parameters:
3333
artifactPublishSteps: []
3434
runAsPublic: false
3535

36-
# Sbom related params
37-
enableSbom: true
38-
PackageVersion: 9.0.0
39-
BuildDropPath: '$(Build.SourcesDirectory)/artifacts'
40-
4136
# 1es specific parameters
4237
is1ESPipeline: ''
4338

eng/common/core-templates/steps/publish-logs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ steps:
4545
SourceFolder: '$(Build.SourcesDirectory)/PostBuildLogs'
4646
Contents: '**'
4747
TargetFolder: '$(Build.ArtifactStagingDirectory)/PostBuildLogs'
48+
condition: always()
4849

4950
- template: /eng/common/core-templates/steps/publish-build-artifacts.yml
5051
parameters:

eng/common/internal/Tools.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<PropertyGroup>
55
<TargetFramework>net472</TargetFramework>
66
<AutomaticallyUseReferenceAssemblyPackages>false</AutomaticallyUseReferenceAssemblyPackages>
7+
<BuildWithNetFrameworkHostedCompiler>false</BuildWithNetFrameworkHostedCompiler>
78
</PropertyGroup>
89
<ItemGroup>
910
<!-- Clear references, the SDK may add some depending on UsuingToolXxx settings, but we only want to restore the following -->

eng/common/templates-official/job/job.yml

+14
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
1+
parameters:
2+
# Sbom related params
3+
enableSbom: true
4+
PackageVersion: 9.0.0
5+
BuildDropPath: '$(Build.SourcesDirectory)/artifacts'
6+
17
jobs:
28
- template: /eng/common/core-templates/job/job.yml
39
parameters:
410
is1ESPipeline: true
511

12+
componentGovernanceSteps:
13+
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.enableSbom, 'true')) }}:
14+
- template: /eng/common/templates/steps/generate-sbom.yml
15+
parameters:
16+
PackageVersion: ${{ parameters.packageVersion }}
17+
BuildDropPath: ${{ parameters.buildDropPath }}
18+
publishArtifacts: false
19+
620
# publish artifacts
721
# for 1ES managed templates, use the templateContext.output to handle multiple outputs.
822
templateContext:

eng/common/templates/job/job.yml

+44-52
Original file line numberDiff line numberDiff line change
@@ -19,71 +19,63 @@ jobs:
1919
steps:
2020
- ${{ each step in parameters.steps }}:
2121
- ${{ step }}
22-
22+
2323
componentGovernanceSteps:
24-
- template: /eng/common/templates/steps/component-governance.yml
25-
parameters:
26-
${{ if eq(parameters.disableComponentGovernance, '') }}:
27-
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.runAsPublic, 'false'), or(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/dotnet/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/microsoft/'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))) }}:
28-
disableComponentGovernance: false
29-
${{ else }}:
30-
disableComponentGovernance: true
24+
- template: /eng/common/templates/steps/component-governance.yml
25+
parameters:
26+
${{ if eq(parameters.disableComponentGovernance, '') }}:
27+
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.runAsPublic, 'false'), or(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/dotnet/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/microsoft/'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))) }}:
28+
disableComponentGovernance: false
3129
${{ else }}:
32-
disableComponentGovernance: ${{ parameters.disableComponentGovernance }}
33-
componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }}
34-
35-
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.enableSbom, 'true')) }}:
36-
- template: /eng/common/templates/steps/generate-sbom.yml
37-
parameters:
38-
PackageVersion: ${{ parameters.packageVersion }}
39-
BuildDropPath: ${{ parameters.buildDropPath }}
40-
publishArtifacts: false
41-
30+
disableComponentGovernance: true
31+
${{ else }}:
32+
disableComponentGovernance: ${{ parameters.disableComponentGovernance }}
33+
componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }}
4234

4335
artifactPublishSteps:
44-
- ${{ if ne(parameters.artifacts.publish, '') }}:
45-
- ${{ if and(ne(parameters.artifacts.publish.artifacts, 'false'), ne(parameters.artifacts.publish.artifacts, '')) }}:
46-
- template: /eng/common/core-templates/steps/publish-build-artifacts.yml
47-
parameters:
48-
is1ESPipeline: false
49-
args:
50-
displayName: Publish pipeline artifacts
51-
pathToPublish: '$(Build.ArtifactStagingDirectory)/artifacts'
52-
publishLocation: Container
53-
artifactName: ${{ coalesce(parameters.artifacts.publish.artifacts.name , 'Artifacts_$(Agent.Os)_$(_BuildConfig)') }}
54-
continueOnError: true
55-
condition: always()
56-
- ${{ if and(ne(parameters.artifacts.publish.logs, 'false'), ne(parameters.artifacts.publish.logs, '')) }}:
57-
- template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml
58-
parameters:
59-
is1ESPipeline: false
60-
args:
61-
targetPath: '$(Build.ArtifactStagingDirectory)/artifacts/log'
62-
artifactName: ${{ coalesce(parameters.artifacts.publish.logs.name, 'Logs_Build_$(Agent.Os)_$(_BuildConfig)') }}
63-
displayName: 'Publish logs'
64-
continueOnError: true
65-
condition: always()
66-
sbomEnabled: false # we don't need SBOM for logs
67-
68-
- ${{ if ne(parameters.enablePublishBuildArtifacts, 'false') }}:
36+
- ${{ if ne(parameters.artifacts.publish, '') }}:
37+
- ${{ if and(ne(parameters.artifacts.publish.artifacts, 'false'), ne(parameters.artifacts.publish.artifacts, '')) }}:
6938
- template: /eng/common/core-templates/steps/publish-build-artifacts.yml
7039
parameters:
7140
is1ESPipeline: false
7241
args:
73-
displayName: Publish Logs
74-
pathToPublish: '$(Build.ArtifactStagingDirectory)/artifacts/log/$(_BuildConfig)'
42+
displayName: Publish pipeline artifacts
43+
pathToPublish: '$(Build.ArtifactStagingDirectory)/artifacts'
7544
publishLocation: Container
76-
artifactName: ${{ coalesce(parameters.enablePublishBuildArtifacts.artifactName, '$(Agent.Os)_$(Agent.JobName)' ) }}
45+
artifactName: ${{ coalesce(parameters.artifacts.publish.artifacts.name , 'Artifacts_$(Agent.Os)_$(_BuildConfig)') }}
7746
continueOnError: true
7847
condition: always()
79-
80-
- ${{ if eq(parameters.enableBuildRetry, 'true') }}:
48+
- ${{ if and(ne(parameters.artifacts.publish.logs, 'false'), ne(parameters.artifacts.publish.logs, '')) }}:
8149
- template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml
8250
parameters:
8351
is1ESPipeline: false
8452
args:
85-
targetPath: '$(Build.SourcesDirectory)\eng\common\BuildConfiguration'
86-
artifactName: 'BuildConfiguration'
87-
displayName: 'Publish build retry configuration'
53+
targetPath: '$(Build.ArtifactStagingDirectory)/artifacts/log'
54+
artifactName: ${{ coalesce(parameters.artifacts.publish.logs.name, 'Logs_Build_$(Agent.Os)_$(_BuildConfig)') }}
55+
displayName: 'Publish logs'
8856
continueOnError: true
89-
sbomEnabled: false # we don't need SBOM for BuildConfiguration
57+
condition: always()
58+
sbomEnabled: false # we don't need SBOM for logs
59+
60+
- ${{ if ne(parameters.enablePublishBuildArtifacts, 'false') }}:
61+
- template: /eng/common/core-templates/steps/publish-build-artifacts.yml
62+
parameters:
63+
is1ESPipeline: false
64+
args:
65+
displayName: Publish Logs
66+
pathToPublish: '$(Build.ArtifactStagingDirectory)/artifacts/log/$(_BuildConfig)'
67+
publishLocation: Container
68+
artifactName: ${{ coalesce(parameters.enablePublishBuildArtifacts.artifactName, '$(Agent.Os)_$(Agent.JobName)' ) }}
69+
continueOnError: true
70+
condition: always()
71+
72+
- ${{ if eq(parameters.enableBuildRetry, 'true') }}:
73+
- template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml
74+
parameters:
75+
is1ESPipeline: false
76+
args:
77+
targetPath: '$(Build.SourcesDirectory)\eng\common\BuildConfiguration'
78+
artifactName: 'BuildConfiguration'
79+
displayName: 'Publish build retry configuration'
80+
continueOnError: true
81+
sbomEnabled: false # we don't need SBOM for BuildConfiguration

global.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"tools": {
3-
"dotnet": "9.0.100-preview.5.24307.3",
3+
"dotnet": "9.0.100-preview.7.24407.12",
44
"runtimes": {
55
"aspnetcore": [
66
"3.1.5",
@@ -11,10 +11,10 @@
1111
}
1212
},
1313
"sdk": {
14-
"version": "9.0.100-preview.5.24307.3"
14+
"version": "9.0.100-preview.7.24407.12"
1515
},
1616
"msbuild-sdks": {
17-
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24414.3",
17+
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.24459.1",
1818
"Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23409.5"
1919
}
2020
}

src/dotnet-svcutil/lib/Microsoft.Svcutil.NamedPipeMetadataImporter/NamedPipeMetadataImporter.cs

+32-9
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ public class NamedPipeMetadataImporter
1515
const string UriSchemeNetPipe = "net.pipe";
1616
const string NamedPipeBindingName = "MetadataExchangeNamedPipeBinding";
1717
const string BindingNamespace = "http://schemas.microsoft.com/ws/2005/02/mex/bindings";
18-
XmlReader _xmlReader;
1918

2019
#if NET6_0_OR_GREATER
2120
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
@@ -38,41 +37,65 @@ public async Task<XmlReader> GetMetadatadataAsync(Uri uri)
3837
ChannelFactory<IMetadataExchange> factory = new ChannelFactory<IMetadataExchange>(CreateNamedPipeBinding(), new EndpointAddress(uri.AbsoluteUri));
3938
IMetadataExchange proxy = factory.CreateChannel();
4039
MessageVersion messageVersion = factory.Endpoint.Binding.MessageVersion;
41-
40+
var tcs = new TaskCompletionSource<XmlReader>();
4241
try
4342
{
4443
var _message = Message.CreateMessage(messageVersion, WSTransfer.GetAction);
45-
IAsyncResult result = proxy.BeginGet(_message, new AsyncCallback(RequestCallback), proxy);
44+
IAsyncResult result = proxy.BeginGet(_message, new AsyncCallback(ar =>
45+
{
46+
try
47+
{
48+
RequestCallback(ar, tcs);
49+
}
50+
catch (Exception ex)
51+
{
52+
tcs.SetException(ex);
53+
}
54+
}), proxy);
4655

4756
while (!result.IsCompleted)
4857
{
4958
await Task.Delay(100);
5059
}
5160
}
52-
catch
61+
catch (Exception ex)
5362
{
5463
((IClientChannel)proxy).Close();
64+
tcs.SetException(ex);
5565
}
5666

5767
finally
5868
{
5969
((IClientChannel)proxy).Abort();
6070
}
6171

62-
return _xmlReader;
72+
return await tcs.Task;
6373
}
6474

65-
public void RequestCallback(IAsyncResult result)
75+
public void RequestCallback(IAsyncResult result, TaskCompletionSource<XmlReader> tcs)
6676
{
6777
if (result.CompletedSynchronously)
6878
return;
6979

7080
if (result.AsyncState is IMetadataExchange metadataClient)
7181
{
72-
Message response = metadataClient.EndGet(result);
73-
if (!response.IsFault)
82+
try
83+
{
84+
Message response = metadataClient.EndGet(result);
85+
if (!response.IsFault)
86+
{
87+
XmlReader xmlReader = response.GetReaderAtBodyContents();
88+
tcs.SetResult(xmlReader);
89+
}
90+
else
91+
{
92+
// Handle fault response
93+
tcs.SetException(new Exception("Fault response received."));
94+
}
95+
}
96+
catch (Exception ex)
7497
{
75-
_xmlReader = response.GetReaderAtBodyContents();
98+
tcs.SetException(ex);
7699
}
77100
}
78101
}

0 commit comments

Comments
 (0)