Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dead code from WCF repository & simplify msbuild logic #5222

Merged
merged 4 commits into from
Aug 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitmirrorall

This file was deleted.

45 changes: 27 additions & 18 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,49 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<ImportNetSdkFromRepoToolset>false</ImportNetSdkFromRepoToolset>
</PropertyGroup>

<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<Import Project="eng\ReferenceAssemblies.props" />
<Import Project="eng\Versioning.props"/>
<Import Project="eng\TestProperties.props"/>
<Import Project="eng\TargetFramework.props" />

<!-- Packaging props -->
<PropertyGroup Condition="'$(CopyrightNetFoundation)' != ''">
<PropertyGroup>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Ship_SvcUtilXmlSerPackages Condition="'$(Ship_SvcUtilXmlSerPackages)'==''">false</Ship_SvcUtilXmlSerPackages>
<Ship_SvcUtilPackages Condition="'$(Ship_SvcUtilPackages)'==''">false</Ship_SvcUtilPackages>
<Ship_WcfPackages Condition="'$(Ship_WcfPackages)'==''">true</Ship_WcfPackages>
</PropertyGroup>

<!-- Include license and third party files to packages -->
<ItemGroup>
<Content Include="$(RepoRoot)THIRD-PARTY-NOTICES.TXT" Pack="true" PackagePath="\" />
<Content Include="$(RepoRoot)LICENSE.TXT" Pack="true" PackagePath="\" />
</ItemGroup>

<PropertyGroup>
<IsPartialFacadeAssembly Condition="'$(IsPartialFacadeAssembly)'=='' AND ($(MSBuildProjectName.EndsWith('.Facade')))">true</IsPartialFacadeAssembly>
<IsReferenceAssembly Condition="'$(IsReferenceAssembly)'=='' AND ($(MSBuildProjectName.EndsWith('.Ref')))">true</IsReferenceAssembly>
</PropertyGroup>

<PropertyGroup>
<MicrosoftIdentityModelProtocolsWsTrustPackageVersion>6.8.0</MicrosoftIdentityModelProtocolsWsTrustPackageVersion>
<WcfPrivateServiceModelProj>$(RepoRoot)src\System.Private.ServiceModel\src\System.Private.ServiceModel.csproj</WcfPrivateServiceModelProj>
<SvcUtilCoreProj>$(RepoRoot)src\svcutilcore\src\dotnet-svcutil.xmlserializer.csproj</SvcUtilCoreProj>
<WcfUnitTestCommonProj>$(RepoRoot)src\System.Private.ServiceModel\tests\Common\Unit\UnitTests.Common.csproj</WcfUnitTestCommonProj>
<WcfScenarioTestCommonProj>$(RepoRoot)src\System.Private.ServiceModel\tests\Common\Scenarios\ScenarioTests.Common.Tests.csproj</WcfScenarioTestCommonProj>
<WcfInfrastructureCommonProj>$(RepoRoot)src\System.Private.ServiceModel\tests\Common\Infrastructure\Infrastructure.Common.csproj</WcfInfrastructureCommonProj>
</PropertyGroup>

<!-- All reference assemblies should have a ReferenceAssemblyAttribute and the 0x70 flag which prevents them from loading. -->
<ItemGroup Condition="'$(IsReferenceAssembly)' == 'true'">
<AssemblyAttribute Include="System.Runtime.CompilerServices.ReferenceAssemblyAttribute" />
<AssemblyAttribute Include="System.Reflection.AssemblyFlags">
<_Parameter1>(System.Reflection.AssemblyNameFlags)0x70</_Parameter1>
<_Parameter1_IsLiteral>true</_Parameter1_IsLiteral>
</AssemblyAttribute>
</ItemGroup>

<PropertyGroup>
<ScenarioTestTargetFrameworks>net6.0;net7.0</ScenarioTestTargetFrameworks>
<UnitTestTargetFrameworks>net6.0;net7.0</UnitTestTargetFrameworks>
<!-- This is the target framework version of the built tests picked up to send to Helix -->
<UnitTestTargetFrameworks>net6.0;net7.0</UnitTestTargetFrameworks>
<!-- This is the target framework version of the built tests picked up to send to Helix -->
<XUnitPublishTargetFramework>net6.0</XUnitPublishTargetFramework>
</PropertyGroup>

<PropertyGroup Condition="'$(IsTestProject)' == 'true'">
<!-- TODO: Remove this condition when VSTest is used in CI. -->
<EnableRunSettingsSupport Condition="'$(ContinuousIntegrationBuild)' != 'true'">true</EnableRunSettingsSupport>
</PropertyGroup>

<ItemGroup>
<!-- Include license and third party files to packages -->
<Content Include="$(RepoRoot)THIRD-PARTY-NOTICES.TXT" Pack="true" PackagePath="\" />
<Content Include="$(RepoRoot)LICENSE.TXT" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup Condition="'$(IsTestProject)' == 'true'">
<!-- 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. -->
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
</ItemGroup>

</Project>
46 changes: 44 additions & 2 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,8 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>

<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<Import Project="eng\FacadeAssemblies.targets" Condition="'$(IsPartialFacadeAssembly)' == 'true'" />
<Import Project="eng\harvest.targets" Condition="'$(HarvestFromPackage)' == 'true'" />
<Import Project="eng\uwp.targets" />
<Import Project="eng\testing\runsettings.targets" Condition="'$(EnableRunSettingsSupport)' == 'true'" />

<PropertyGroup>
<!-- Disable some standard properties for building our projects -->
<GenerateTargetFrameworkAttribute>true</GenerateTargetFrameworkAttribute>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<!-- [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. -->
<GenerateNeutralResourcesLanguageAttribute>false</GenerateNeutralResourcesLanguageAttribute>
</PropertyGroup>

<PropertyGroup>
<!-- wcf has always added a description set to assembly name so include that here -->
<Description Condition="'$(Description)' == ''">$(AssemblyName)</Description>

<!-- SDK sets product to assembly but we want it to be our product name -->
<Product>Microsoft%AE .NET Core</Product>

<!-- Use the .NET Core product branding version for informational version description -->
<!-- [todo:arcade] Currently in local builds this is producing a weird version "3.0.0-ci.19157.1" need to verify what this looks like in an official build. -->
<InformationalVersion>$(ProductVersion)</InformationalVersion>
<InformationalVersion Condition="'$(VersionSuffix)' != ''">$(InformationalVersion)-$(VersionSuffix)</InformationalVersion>
</PropertyGroup>

<!-- [todo:arcade] Make sure all test projects set IsTestProject to true -->
<ItemGroup Condition="'$(IsTestProject)' != 'true'" >
<AssemblyAttribute Include="System.Reflection.AssemblyMetadata">
<_Parameter1>Serviceable</_Parameter1>
<_Parameter2>True</_Parameter2>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Reflection.AssemblyMetadata">
<_Parameter1>PreferInbox</_Parameter1>
<_Parameter2>True</_Parameter2>
</AssemblyAttribute>
</ItemGroup>

<ItemGroup>
<AssemblyAttribute Include="System.Reflection.AssemblyDefaultAliasAttribute">
<_Parameter1>$(AssemblyName)</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="CLSCompliantAttribute" Condition="'$(CLSCompliant)' == 'true'">
<_Parameter1>true</_Parameter1>
</AssemblyAttribute>
</ItemGroup>

</Project>
1 change: 0 additions & 1 deletion DotnetCLIVersion.txt

This file was deleted.

15 changes: 0 additions & 15 deletions eng/BlockReflectionAttribute.cs

This file was deleted.

2 changes: 1 addition & 1 deletion eng/FacadeAssemblies.targets
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project>

<PropertyGroup>
<!--Don't produce or publish symbols for Facade assemblies.-->
Expand Down
6 changes: 0 additions & 6 deletions eng/Publishing.props

This file was deleted.

18 changes: 0 additions & 18 deletions eng/ReferenceAssemblies.props

This file was deleted.

64 changes: 0 additions & 64 deletions eng/TargetFramework.props

This file was deleted.

17 changes: 0 additions & 17 deletions eng/TestProperties.props

This file was deleted.

Loading