Skip to content

Commit 89ce336

Browse files
committed
merge
2 parents 0f85880 + 4e6e777 commit 89ce336

File tree

199 files changed

+11091
-1624
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

+11091
-1624
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ build/
2525
bld/
2626
[Bb]in/
2727
[Oo]bj/
28-
msbuild.binlog
28+
*.binlog
2929
msbuild.log
3030
msbuild.err
3131
msbuild.wrn

Directory.Build.props

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,18 @@
99
<Ship_SvcUtilXmlSerPackages Condition="'$(Ship_SvcUtilXmlSerPackages)'==''">false</Ship_SvcUtilXmlSerPackages>
1010
<Ship_SvcUtilPackages Condition="'$(Ship_SvcUtilPackages)'==''">false</Ship_SvcUtilPackages>
1111
<Ship_WcfPackages Condition="'$(Ship_WcfPackages)'==''">true</Ship_WcfPackages>
12+
<PlaceholderFile>$(RepositoryEngineeringDir)_._</PlaceholderFile>
1213
</PropertyGroup>
1314

14-
<!-- Include license and third party files to packages -->
15-
<ItemGroup>
16-
<Content Include="$(RepoRoot)THIRD-PARTY-NOTICES.TXT" Pack="true" PackagePath="\" />
17-
<Content Include="$(RepoRoot)LICENSE.TXT" Pack="true" PackagePath="\" />
18-
</ItemGroup>
15+
<PropertyGroup>
16+
<NetFrameworkVersion>net462</NetFrameworkVersion>
17+
<DotNetVersion>net8.0</DotNetVersion>
18+
</PropertyGroup>
1919

2020
<PropertyGroup>
2121
<IsPartialFacadeAssembly Condition="'$(IsPartialFacadeAssembly)'=='' AND ($(MSBuildProjectName.EndsWith('.Facade')))">true</IsPartialFacadeAssembly>
22-
<IsReferenceAssembly Condition="'$(IsReferenceAssembly)'=='' AND ($(MSBuildProjectName.EndsWith('.Ref')))">true</IsReferenceAssembly>
22+
<IsReferenceAssembly Condition="'$(IsReferenceAssembly)' == '' and ($(MSBuildProjectName.EndsWith('.Ref')))">true</IsReferenceAssembly>
23+
<HasReferenceAssembly Condition="'$(IsReferenceAssembly)' != 'true' AND Exists('..\ref\$([System.IO.Path]::GetFileNameWithoutExtension($(MSBuildProjectFile))).Ref.csproj')">true</HasReferenceAssembly>
2324
</PropertyGroup>
2425

2526
<PropertyGroup>
@@ -40,8 +41,8 @@
4041
</ItemGroup>
4142

4243
<PropertyGroup>
43-
<ScenarioTestTargetFrameworks>net8.0</ScenarioTestTargetFrameworks>
44-
<UnitTestTargetFrameworks>net8.0</UnitTestTargetFrameworks>
44+
<ScenarioTestTargetFrameworks>net8.0;net9.0</ScenarioTestTargetFrameworks>
45+
<UnitTestTargetFrameworks>net8.0;net9.0</UnitTestTargetFrameworks>
4546
<!-- This is the target framework version of the built tests picked up to send to Helix -->
4647
<XUnitPublishTargetFramework>net8.0</XUnitPublishTargetFramework>
4748
</PropertyGroup>
@@ -52,7 +53,7 @@
5253

5354
<ItemGroup Condition="'$(IsTestProject)' == 'true'">
5455
<!-- Microsoft.NET.Test.Sdk package defaults to restore the minimum supported version for its dependency Newtonsoft.Json, here force test project to reference higher version for security reason. -->
55-
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
56+
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
5657
</ItemGroup>
5758

5859
</Project>

Directory.Build.targets

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,26 @@
22
<Project>
33

44
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
5-
<Import Project="eng\FacadeAssemblies.targets" Condition="'$(IsPartialFacadeAssembly)' == 'true'" />
5+
<!-- <Import Project="eng\FacadeAssemblies.targets" Condition="'$(IsPartialFacadeAssembly)' == 'true'" /> -->
6+
<Import Project="eng\GenRefAssembly.targets" Condition="'$(HasReferenceAssembly)' == 'true'" />
7+
<Import Project="eng\ReferenceAssembly.targets" Condition="'$(IsReferenceAssembly)' == 'true'" />
68
<Import Project="eng\testing\runsettings.targets" Condition="'$(EnableRunSettingsSupport)' == 'true'" />
79

10+
<!-- Include license and third party files to packages -->
11+
<ItemGroup Condition="'$(IsShippingPackage)' != 'false'">
12+
<Content Include="$(RepoRoot)THIRD-PARTY-NOTICES.TXT" Pack="true" PackagePath="\" />
13+
<Content Include="$(RepoRoot)LICENSE.TXT" Pack="true" PackagePath="\" />
14+
</ItemGroup>
15+
816
<PropertyGroup>
917
<!-- Disable some standard properties for building our projects -->
1018
<GenerateTargetFrameworkAttribute>true</GenerateTargetFrameworkAttribute>
1119
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
1220
<!-- [todo:arcade] This attribute exists in our previously shipped S.P.SM assembly but not in all the Facade assemblies. For now removing accross all assemblies. -->
1321
<GenerateNeutralResourcesLanguageAttribute>false</GenerateNeutralResourcesLanguageAttribute>
22+
<!-- We only want to ensure direct dependencies don't have a vulnerability for our packages,
23+
but for unit tests, we want to make sure we aren't using vulnerable versions at runtime -->
24+
<NuGetAuditMode Condition="'$(IsTestProject)' != 'true'">direct</NuGetAuditMode>
1425
</PropertyGroup>
1526

1627
<PropertyGroup>
@@ -47,4 +58,9 @@
4758
</AssemblyAttribute>
4859
</ItemGroup>
4960

61+
<ItemGroup Condition="Exists('README.md')" >
62+
<None Include="README.md" Pack="true" PackagePath="\"/>
63+
</ItemGroup>
64+
65+
<Import Project="eng\RuntimePackages.targets" Condition="'$(StrongNameKeyId)' == 'Microsoft'" />
5066
</Project>

NuGet.config

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@
33
<packageSources>
44
<clear />
55
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
6-
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
76
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
87
</packageSources>
9-
<disabledPackageSources />
8+
<auditSources>
9+
<clear />
10+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
11+
</auditSources>
12+
<disabledPackageSources>
13+
<clear />
14+
</disabledPackageSources>
1015
</configuration>

System.ServiceModel.sln

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,24 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Binding.UDS.IntegrationTest
8989
EndProject
9090
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}"
9191
EndProject
92+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.ServiceModel.Http.Ref", "src\System.ServiceModel.Http\ref\System.ServiceModel.Http.Ref.csproj", "{34CCEAC9-43B1-4654-BF2F-0B40EC7AD016}"
93+
EndProject
94+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.ServiceModel.NetTcp.Ref", "src\System.ServiceModel.NetTcp\ref\System.ServiceModel.NetTcp.Ref.csproj", "{81843CB2-E128-427B-9920-EEDBBBD4CB0B}"
95+
EndProject
96+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build Files", "Build Files", "{E7BC33F3-6B4C-44A1-9427-10312E1EAB26}"
97+
ProjectSection(SolutionItems) = preProject
98+
Directory.Build.props = Directory.Build.props
99+
Directory.Build.targets = Directory.Build.targets
100+
EndProjectSection
101+
EndProject
102+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.ServiceModel.Duplex", "src\System.ServiceModel.Duplex\src\System.ServiceModel.Duplex.csproj", "{1B2CC303-9D61-4A2E-9B9F-BD92294411E9}"
103+
EndProject
104+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.ServiceModel.Security", "src\System.ServiceModel.Security\src\System.ServiceModel.Security.csproj", "{DFABBE15-01CF-473A-8BD4-A7F374371E4C}"
105+
EndProject
106+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.ServiceModel.Shim", "src\System.ServiceModel.Shim\System.ServiceModel.Shim.csproj", "{1C5A7A17-E06D-4F19-B18B-C5AAE512AF59}"
107+
EndProject
108+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.ServiceModel.NetFramingBase.Ref", "src\System.ServiceModel.NetFramingBase\ref\System.ServiceModel.NetFramingBase.Ref.csproj", "{09D0456B-C1C6-40E4-AE8E-64D60189A7B2}"
109+
EndProject
92110
Global
93111
GlobalSection(SolutionConfigurationPlatforms) = preSolution
94112
Debug|Any CPU = Debug|Any CPU
@@ -259,6 +277,30 @@ Global
259277
{FD188537-21AF-48C5-84FF-F8758F4C42A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
260278
{FD188537-21AF-48C5-84FF-F8758F4C42A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
261279
{FD188537-21AF-48C5-84FF-F8758F4C42A8}.Release|Any CPU.Build.0 = Release|Any CPU
280+
{34CCEAC9-43B1-4654-BF2F-0B40EC7AD016}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
281+
{34CCEAC9-43B1-4654-BF2F-0B40EC7AD016}.Debug|Any CPU.Build.0 = Debug|Any CPU
282+
{34CCEAC9-43B1-4654-BF2F-0B40EC7AD016}.Release|Any CPU.ActiveCfg = Release|Any CPU
283+
{34CCEAC9-43B1-4654-BF2F-0B40EC7AD016}.Release|Any CPU.Build.0 = Release|Any CPU
284+
{81843CB2-E128-427B-9920-EEDBBBD4CB0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
285+
{81843CB2-E128-427B-9920-EEDBBBD4CB0B}.Debug|Any CPU.Build.0 = Debug|Any CPU
286+
{81843CB2-E128-427B-9920-EEDBBBD4CB0B}.Release|Any CPU.ActiveCfg = Release|Any CPU
287+
{81843CB2-E128-427B-9920-EEDBBBD4CB0B}.Release|Any CPU.Build.0 = Release|Any CPU
288+
{1B2CC303-9D61-4A2E-9B9F-BD92294411E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
289+
{1B2CC303-9D61-4A2E-9B9F-BD92294411E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
290+
{1B2CC303-9D61-4A2E-9B9F-BD92294411E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
291+
{1B2CC303-9D61-4A2E-9B9F-BD92294411E9}.Release|Any CPU.Build.0 = Release|Any CPU
292+
{DFABBE15-01CF-473A-8BD4-A7F374371E4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
293+
{DFABBE15-01CF-473A-8BD4-A7F374371E4C}.Debug|Any CPU.Build.0 = Debug|Any CPU
294+
{DFABBE15-01CF-473A-8BD4-A7F374371E4C}.Release|Any CPU.ActiveCfg = Release|Any CPU
295+
{DFABBE15-01CF-473A-8BD4-A7F374371E4C}.Release|Any CPU.Build.0 = Release|Any CPU
296+
{1C5A7A17-E06D-4F19-B18B-C5AAE512AF59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
297+
{1C5A7A17-E06D-4F19-B18B-C5AAE512AF59}.Debug|Any CPU.Build.0 = Debug|Any CPU
298+
{1C5A7A17-E06D-4F19-B18B-C5AAE512AF59}.Release|Any CPU.ActiveCfg = Release|Any CPU
299+
{1C5A7A17-E06D-4F19-B18B-C5AAE512AF59}.Release|Any CPU.Build.0 = Release|Any CPU
300+
{09D0456B-C1C6-40E4-AE8E-64D60189A7B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
301+
{09D0456B-C1C6-40E4-AE8E-64D60189A7B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
302+
{09D0456B-C1C6-40E4-AE8E-64D60189A7B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
303+
{09D0456B-C1C6-40E4-AE8E-64D60189A7B2}.Release|Any CPU.Build.0 = Release|Any CPU
262304
EndGlobalSection
263305
GlobalSection(SolutionProperties) = preSolution
264306
HideSolutionNode = FALSE

azure-pipelines-arcade-PR.yml

Lines changed: 41 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ variables:
3131
value: true
3232
- name: _RunAsInternal
3333
value: false
34-
- name: _RunWithCoreWcfService
35-
value: false
36-
3734
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
3835
- name: _RunAsPublic
3936
value: false
@@ -77,13 +74,12 @@ stages:
7774
- _TestArgs: /p:ServiceUri=$(_serviceUri) /p:Root_Certificate_Installed=true /p:Client_Certificate_Installed=true /p:SSL_Available=true
7875

7976
# Public/PR & CI Build Variables
80-
- ${{ if eq(variables._RunAsPublic, True) }}:
81-
# For PR and CI test runs we use a different server machine that host multiple services to avoid concurrency issues.
82-
- _serviceUri: wcfcoresrv23.westus3.cloudapp.azure.com/WcfService$(_WcfPRServiceId)
83-
# For PR and CI test runs we need to update the Service being used by Scenario tests.
84-
# Used in UpdatePRService.yml
85-
# I think this can be removed based on the logic, setting it to true for now.
86-
- _updateService: true
77+
# For PR and CI test runs we use a different server machine that host multiple services to avoid concurrency issues.
78+
- _serviceUri:
79+
# For PR and CI test runs we need to update the Service being used by Scenario tests.
80+
# Used in UpdatePRService.yml
81+
# I think this can be removed based on the logic, setting it to true for now.
82+
- _updateService: false
8783

8884
# Send to Helix variables
8985
- _xUnitWorkItemTimeout: '00:10:00'
@@ -107,7 +103,14 @@ stages:
107103
steps:
108104
- checkout: self
109105
clean: true
110-
- ${{ if and(eq(variables._RunAsPublic, True), ne(variables._RunWithCoreWcfService, True)) }}:
106+
- powershell: |
107+
Write-Host "##vso[task.setvariable variable=_updateService]true"
108+
Write-Host "##vso[task.setvariable variable=_serviceUri]wcfcoresrv23.westus3.cloudapp.azure.com/WcfService$(_WcfPRServiceId)"
109+
110+
displayName: Update _updateService variable
111+
condition: and(eq(variables._RunAsPublic, True), ne(variables._RunWithCoreWcfService, True))
112+
113+
- ${{ if eq(variables._RunAsPublic, True) }}:
111114
- template: /eng/UpdatePRService.yml
112115
parameters:
113116
wcfPRServiceId: $(_WcfPRServiceId)
@@ -128,7 +131,7 @@ stages:
128131
-projects $(Build.SourcesDirectory)/eng/SendToHelix.proj
129132
$(_TestArgs)
130133
/p:TestJob=Windows
131-
/p:RunWithCoreWcfService=$(_RunWithCoreWcfService)
134+
/p:RunWithCoreWcfService=$($Env:_RunWithCoreWcfService)
132135
/bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog
133136
displayName: Windows - Run Helix Tests
134137
env:
@@ -149,8 +152,8 @@ stages:
149152
demands: ImageOverride -equals build.Ubuntu.1804.Amd64.Open
150153
variables:
151154
- _TestArgs: /p:ServiceUri=$(_serviceUri) /p:Root_Certificate_Installed=true /p:Client_Certificate_Installed=true /p:SSL_Available=true
152-
- _serviceUri: wcfcoresrv23.westus3.cloudapp.azure.com/WcfService$(_WcfPRServiceId)
153-
- _updateService: true
155+
- _serviceUri:
156+
- _updateService: false
154157

155158
# Send to Helix variables
156159
- _xUnitWorkItemTimeout: '00:10:00'
@@ -172,10 +175,16 @@ stages:
172175
steps:
173176
- checkout: self
174177
clean: true
175-
- ${{ if and(eq(variables._RunAsPublic, True), ne(variables._RunWithCoreWcfService, True)) }}:
176-
- template: /eng/UpdatePRService.yml
177-
parameters:
178-
wcfPRServiceId: $(_WcfPRServiceId)
178+
- powershell: |
179+
Write-Host "##vso[task.setvariable variable=_updateService]true"
180+
Write-Host "##vso[task.setvariable variable=_serviceUri]wcfcoresrv23.westus3.cloudapp.azure.com/WcfService$(_WcfPRServiceId)"
181+
182+
displayName: Update _updateService variable
183+
condition: and(eq(variables._RunAsPublic, True), ne(variables._RunWithCoreWcfService, True))
184+
185+
- template: /eng/UpdatePRService.yml
186+
parameters:
187+
wcfPRServiceId: $(_WcfPRServiceId)
179188
- script: eng/common/cibuild.sh
180189
-configuration $(_BuildConfig)
181190
-preparemachine
@@ -191,7 +200,7 @@ stages:
191200
--projects $(Build.SourcesDirectory)/eng/SendToHelix.proj
192201
$(_TestArgs)
193202
/p:TestJob=Linux
194-
/p:RunWithCoreWcfService=$(_RunWithCoreWcfService)
203+
/p:RunWithCoreWcfService=$($Env:_RunWithCoreWcfService)
195204
/bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog
196205
displayName: Linux - Run Helix Tests
197206
env:
@@ -210,8 +219,8 @@ stages:
210219
demands: ImageOverride -equals windows.vs2022.amd64.open
211220
variables:
212221
- _TestArgs: /p:ServiceUri=$(_serviceUri) /p:Root_Certificate_Installed=true /p:Client_Certificate_Installed=true /p:SSL_Available=true
213-
- _serviceUri: wcfcoresrv23.westus3.cloudapp.azure.com/WcfService$(_WcfPRServiceId)
214-
- _updateService: true
222+
- _serviceUri:
223+
- _updateService: false
215224

216225
# Send to Helix variables
217226
- _xUnitWorkItemTimeout: '00:10:00'
@@ -233,10 +242,16 @@ stages:
233242
steps:
234243
- checkout: self
235244
clean: true
236-
- ${{ if and(eq(variables._RunAsPublic, True), ne(variables._RunWithCoreWcfService, True)) }}:
237-
- template: /eng/UpdatePRService.yml
238-
parameters:
239-
wcfPRServiceId: $(_WcfPRServiceId)
245+
- powershell: |
246+
Write-Host "##vso[task.setvariable variable=_updateService]true"
247+
Write-Host "##vso[task.setvariable variable=_serviceUri]wcfcoresrv23.westus3.cloudapp.azure.com/WcfService$(_WcfPRServiceId)"
248+
249+
displayName: Update _updateService variable
250+
condition: and(eq(variables._RunAsPublic, True), ne(variables._RunWithCoreWcfService, True))
251+
252+
- template: /eng/UpdatePRService.yml
253+
parameters:
254+
wcfPRServiceId: $(_WcfPRServiceId)
240255
- script: eng\common\cibuild.cmd
241256
-configuration $(_BuildConfig)
242257
-preparemachine
@@ -252,7 +267,7 @@ stages:
252267
-projects $(Build.SourcesDirectory)/eng/SendToHelix.proj
253268
$(_TestArgs)
254269
/p:TestJob=MacOS
255-
/p:RunWithCoreWcfService=$(_RunWithCoreWcfService)
270+
/p:RunWithCoreWcfService=$($Env:_RunWithCoreWcfService)
256271
/bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog
257272
displayName: MacOS - Run Helix Tests
258273
env:

azure-pipelines-arcade.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ trigger:
66
branches:
77
include:
88
- main
9-
- release/3.*
109
- release/4.*
1110
- release/6.*
1211

@@ -43,6 +42,13 @@ extends:
4342
compiled:
4443
enabled: false
4544
justificationForDisabling: 'CodeQL is already enabled in pipeline dotnet-wcf-codeql; this is a duplicate scan'
45+
binskim:
46+
enabled: true
47+
justificationForDisabling: true
48+
policheck:
49+
enabled: true
50+
tsa:
51+
enabled: true
4652
customBuildTags:
4753
- ES365AIMigrationTooling
4854
stages:

eng/FacadeAssemblies.targets

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="Microsoft.DotNet.GenFacades" Version="$(MicrosoftDotNetGenFacadesPackageVersion)" PrivateAssets="All" />
15-
14+
<PackageReference Include="Microsoft.DotNet.GenFacades"
15+
Version="$(MicrosoftDotNetGenFacadesVersion)"
16+
PrivateAssets="all"
17+
IsImplicitlyDefined="true" />
18+
1619
<ContractProjectReference Include="..\ref\$(AssemblyName).Ref.csproj"
1720
Condition="'@(ContractProjectReference)' == '' AND '$(HasReferenceAssembly)' == 'true'" />
1821
</ItemGroup>

eng/GenRefAssembly.targets

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
<PropertyGroup>
4+
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
5+
<GenAPIGenerateReferenceAssemblySource Condition="'$(GenAPIGenerateReferenceAssemblySource)' == ''">true</GenAPIGenerateReferenceAssemblySource>
6+
<GenAPITargetPath>..\ref\$(AssemblyName).cs</GenAPITargetPath>
7+
<RefAssemblyProjectReference>$(MSBuildProjectDirectory)\..\ref\$(AssemblyName).Ref.csproj</RefAssemblyProjectReference>
8+
<RefAssemblyProjectReference>$([System.IO.Path]::GetFullPath($(RefAssemblyProjectReference)))</RefAssemblyProjectReference>
9+
<GenAPIExcludeApiList Condition="Exists('ReferenceAssemblyExclusions.txt')">ReferenceAssemblyExclusions.txt</GenAPIExcludeApiList>
10+
<!-- <RefAssemblyProjectReference Condition="'$(RefAssemblyProjectReference)' == '' AND '$(HasReferenceAssembly)' == 'true'">$([System.IO.Path]::GetFullPath($(MSBuildProjectDirectory)\..\ref\$(AssemblyName).Ref.csproj)</RefAssemblyProjectReference> -->
11+
</PropertyGroup>
12+
13+
<ItemGroup>
14+
<None Include="ReferenceAssemblyExclusions.txt" Condition="Exists('ReferenceAssemblyExclusions.txt')" />
15+
</ItemGroup>
16+
17+
<ItemGroup>
18+
<PackageReference Include="Microsoft.DotNet.GenAPI"
19+
version="$(MicrosoftDotNetGenApiPackageVersion)"
20+
PrivateAssets="all"
21+
IsImplicitlyDefined="true"/>
22+
<ProjectReference Include="$(RefAssemblyProjectReference)">
23+
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
24+
<OutputItemType>ResolvedReferenceAssemblyReference</OutputItemType>
25+
</ProjectReference>
26+
</ItemGroup>
27+
28+
<PropertyGroup Condition="'$(HasReferenceAssembly)' == 'true'">
29+
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);AddReferenceAssemblyToPackage</TargetsForTfmSpecificContentInPackage>
30+
</PropertyGroup>
31+
32+
<Target Name="AddReferenceAssemblyToPackage" AfterTargets="AssignTargetPaths">
33+
<ItemGroup>
34+
<TfmSpecificPackageFile Include="@(ResolvedReferenceAssemblyReference)" PackagePath="ref/$(TargetFramework)" />
35+
</ItemGroup>
36+
</Target>
37+
</Project>

0 commit comments

Comments
 (0)