Skip to content

Commit

Permalink
Avoid package dependencies on inbox librares & clean-up (#13210)
Browse files Browse the repository at this point in the history
1. Avoid package dependencies on inbox libraries to not bring in
   deprecated or no longer supported packages:
   - System.Net.Http (inbox on all TFMs)
   - System.IO.Compression (inbox on all TFMs)
   - System.Reflection.Metadata (inbox on .NETCoreApp)
   - ...
2. Remove versions that aren't used anymore and update dependencies to
   latest servicing digit. Make sure that nearly all versions are
   encoded in Versions.props instead of hardcoded in project files
   except for few deprecated cases like Microsoft.Cci. Mark deprecated
   packages in Versions.props with a TODO to switch off them.
3. Use NetCurrent, NetFrameworkMinimum and NetFrameworkToolCurrent for
   floating TFMs. Expose the latter two + NetFrameworkCurrent in the
   Arcade.Sdk. Change build conditions to not assert on a specific TFM
   version.
4. Remove custom CodeAnaylsis package version from GenAPI, ApiCompat
   and GenFacades.
5. Format project files:
   - Empty lines after Project and before closing tag
   - Empty lines between Property/Item groups
   - Remove unused or duplicated msbuild properties
   - Delete unused or non-necessary files
   - Use less verbose item include/update syntax
   - Remove unnecessary "<?xml" and "ToolsVersion" tags in files that
     don't need them (msbuild).
   - Add missing license headers in the package msbuild files and remove
     license headers from project files which don't need them.
6. Avoid netstandard1.x dependencies and lift potential
   NETStandard.Library transitive references to the latest version
   (2.0.3).
7. Use Microsoft.Build.NoTargets Sdk to create content only packages to
   avoid defining custom targets and/or invoking the compiler.
8. Remove unnecessary needed project dependencies (package and/or
   project references).
9. Fix ApiCompat output path and ApiCompatAssembly property in package
   build file.
10. Use "TargetFramework" instead of "TargetFrameworks" in single
    targeting projects for improved performance.
11. Avoid the external Xunit.SkippableFact dependency in a test project
    in favor of Microsoft.DotNet.XUnitExtensions which is used by the
    stack and part of Arcade.
  • Loading branch information
ViktorHofer committed Apr 25, 2023
1 parent 092ad72 commit bde465e
Show file tree
Hide file tree
Showing 140 changed files with 592 additions and 898 deletions.
19 changes: 5 additions & 14 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,31 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />


<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />

<PropertyGroup>
<Copyright>$(CopyrightNetFoundation)</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DebugType>embedded</DebugType>
<DebugSymbols>true</DebugSymbols>
<LangVersion>Latest</LangVersion>
<TargetFrameworkForNETSDK>net8.0</TargetFrameworkForNETSDK>

<!-- TODO: Remove when a new Arcade.Sdk is consumed with the changes in TargetFrameworkDefaults.props. -->
<NetFrameworkToolCurrent>net472</NetFrameworkToolCurrent>

<!--
Tools and packages produced by this repository support infrastructure and are not shipping on NuGet or via any other official channel.
-->
<IsShipping>false</IsShipping>
</PropertyGroup>

<PropertyGroup Condition="'$(DotNetBuildOffline)' == 'true'">
<!--
Arcade has a special version prop for CodeAnalysis.CSharp in GenFacades
to try to match the version loaded by msbuild. In the offline build, this
is simply the source-built version.
-->
<MsbuildTaskMicrosoftCodeAnalysisCSharpVersion>$(MicrosoftCodeAnalysisCSharpVersion)</MsbuildTaskMicrosoftCodeAnalysisCSharpVersion>
</PropertyGroup>

</Project>
12 changes: 11 additions & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>

<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />

<ItemGroup>
<!-- Upgrade the NETStandard.Library transitive dependency to avoid transitive 1.x NS dependencies. -->
<PackageReference Include="NETStandard.Library"
Version="$(NETStandardLibraryVersion)"
PrivateAssets="all"
Condition="'$(TargetFrameworkIdentifier)' != '.NETStandard' and
$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'netstandard2.0'))" />
</ItemGroup>

</Project>
1 change: 0 additions & 1 deletion Documentation/Darc.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ index a1d683c1..dbf3fe0e 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -60,6 +60,7 @@
<MicrosoftVisualStudioWebCodeGenerationDesignVersion>2.0.4</MicrosoftVisualStudioWebCodeGenerationDesignVersion>
<MicrosoftDiaSymReaderConverterVersion>1.1.0-beta1-62810-01</MicrosoftDiaSymReaderConverterVersion>
<MicrosoftDiaSymReaderNativeVersion>1.7.0</MicrosoftDiaSymReaderNativeVersion>
+ <MicrosoftNETCoreAppVersion>3.0.0-preview-27401-3</MicrosoftNETCoreAppVersion>
Expand Down
3 changes: 1 addition & 2 deletions Documentation/UnifiedBuild/TFM-Trimming-And-Targeting.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,8 @@ With this invocation, projects will only produce assets that target `net7*` and
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;$(TargetFrameworkForNETSDK)</TargetFrameworks>
<TargetFrameworks>$(NetCurrent);net472</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>Latest</LangVersion>
<IsPackable>true</IsPackable>
<Description>Build artifact signing tool</Description>
<PackageTags>Arcade Build Tool Signing</PackageTags>
Expand Down
51 changes: 23 additions & 28 deletions eng/BuildTask.targets
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<PackTasks Condition="'$(PackTasks)' == ''">true</PackTasks>
<!-- Build Tasks should have this set per https://github.com/dotnet/arcade/blob/master/Documentation/CorePackages/Versioning.md#recommended-settings -->
<AutoGenerateAssemblyVersion>true</AutoGenerateAssemblyVersion>
<BuildTaskTargetFolder>tools</BuildTaskTargetFolder>
</PropertyGroup>

<!--
Expand All @@ -15,9 +16,9 @@
-->
<ItemGroup Condition="'$(EnableDefaultItems)' != 'false'">
<None Condition="'$(EnableDefaultNoneItems)' != 'false'"
Include="**/*.props;**/*.targets" Pack="true">
<PackagePath>%(RecursiveDir)%(Filename)%(Extension)</PackagePath>
</None>
Include="**/*.props;**/*.targets"
Pack="true"
PackagePath="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>

<ItemGroup>
Expand All @@ -26,41 +27,35 @@
</ItemGroup>

<ItemGroup>
<!--
Do not include assemblies that MSBuild ships with in the package.
-->
<PackageReference Update="Microsoft.Build" Publish="false" />
<PackageReference Update="Microsoft.Build.Framework" Publish="false" />
<PackageReference Update="Microsoft.Build.Tasks.Core" Publish="false" />
<PackageReference Update="Microsoft.Build.Utilities.Core" Publish="false" />
<PackageReference Update="System.Collections.Immutable" Publish="false" />
<PackageReference Update="System.Runtime.InteropServices.RuntimeInformation" Publish="false" />

<!--
Update all PackageReference and ProjectReference Items to have
PrivateAssets="All" and default Publish to true.
This removes the dependency nodes from the generated nuspec and
forces the publish output to contain the dlls.
Update all PackageReference and ProjectReference Items to
default Publish to true.
This forces the publish output to contain the dlls.
-->
<PackageReference Update="@(PackageReference)">
<PrivateAssets>All</PrivateAssets>
<Publish Condition="'%(PackageReference.Publish)' == ''">true</Publish>
<ExcludeAssets Condition="'%(PackageReference.Publish)' == 'false'">runtime</ExcludeAssets>
</PackageReference>
<ProjectReference Update="@(ProjectReference)">
<PrivateAssets>All</PrivateAssets>
<Publish Condition="'%(ProjectReference.Publish)' == ''">true</Publish>
</ProjectReference>

<!--
Update all Reference items to have Pack="false"
This removes the frameworkDependency nodes from the generated nuspec
-->
<Reference Update="@(Reference)">
<Pack>false</Pack>
</Reference>

<!--
Do not include assemblies that MSBuild ships with in the package.
-->
<PackageReference Update="Microsoft.Build" PrivateAssets="All" Publish="false" ExcludeAssets="runtime" />
<PackageReference Update="Microsoft.Build.Framework" PrivateAssets="All" Publish="false" ExcludeAssets="runtime" />
<PackageReference Update="Microsoft.Build.Tasks.Core" PrivateAssets="All" Publish="false" ExcludeAssets="runtime" />
<PackageReference Update="Microsoft.Build.Utilities.Core" PrivateAssets="All" Publish="false" ExcludeAssets="runtime" />
<PackageReference Update="System.Collections.Immutable" PrivateAssets="All" Publish="false" ExcludeAssets="runtime" />
<PackageReference Update="System.IO.Compression" PrivateAssets="All" Publish="false" ExcludeAssets="runtime" />
<PackageReference Update="System.Runtime.InteropServices.RuntimeInformation" PrivateAssets="All" Publish="false" ExcludeAssets="runtime" />
<PackageReference Update="System.Threading.Tasks.Dataflow" PrivateAssets="All" Publish="false" ExcludeAssets="runtime" />
<Reference Update="@(Reference)"
Pack="false" />
</ItemGroup>

<PropertyGroup Condition="'$(PackTasks)' == 'true'">
Expand All @@ -69,16 +64,16 @@

<Target Name="_AddBuildOutputToPackageCore" DependsOnTargets="Publish" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<ItemGroup>
<!-- Publish .NET Core assets and include them in the package under tools directory. -->
<!-- Publish .NET Core assets and include them in the package under $(BuildTaskTargetFolder) directory. -->
<TfmSpecificPackageFile Include="$(PublishDir)**"
PackagePath="tools/$(TargetFramework)/%(RecursiveDir)%(FileName)%(Extension)"/>
PackagePath="$(BuildTaskTargetFolder)/$(TargetFramework)/%(RecursiveDir)%(FileName)%(Extension)"/>
</ItemGroup>
</Target>

<Target Name="_AddBuildOutputToPackageDesktop" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
<ItemGroup>
<!-- Include .NET Framework build outputs in the package under tools directory. -->
<TfmSpecificPackageFile Include="$(OutputPath)**" PackagePath="tools/$(TargetFramework)/%(RecursiveDir)%(FileName)%(Extension)"/>
<!-- Include .NET Framework build outputs in the package under $(BuildTaskTargetFolder) directory. -->
<TfmSpecificPackageFile Include="$(OutputPath)**" PackagePath="$(BuildTaskTargetFolder)/$(TargetFramework)/%(RecursiveDir)%(FileName)%(Extension)"/>
</ItemGroup>
</Target>
</Project>
67 changes: 31 additions & 36 deletions eng/Versions.props
Original file line number Diff line number Diff line change
@@ -1,83 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>

<PropertyGroup>
<!-- This repo version -->
<VersionPrefix>8.0.0</VersionPrefix>
<PreReleaseVersionLabel>beta</PreReleaseVersionLabel>
<!-- Opt-out repo features -->
<UsingToolXliff>false</UsingToolXliff>
<!-- Libs -->
<CommandLineParserVersion>2.2.1</CommandLineParserVersion>
<CommandLineParserVersion>2.5.0</CommandLineParserVersion>
<CredentialManagementVersion>1.0.2</CredentialManagementVersion>
<HandlebarsNetVersion>1.10.1</HandlebarsNetVersion>
<LibGit2SharpVersion>0.25.2</LibGit2SharpVersion>
<log4netVersion>2.0.10</log4netVersion>
<SystemNetHttpVersion>4.3.4</SystemNetHttpVersion>
<AzureCoreVersion>1.31.0</AzureCoreVersion>
<AzureIdentityVersion>1.8.0</AzureIdentityVersion>
<AzureSecurityKeyVaultSecretsVersion>4.4.0</AzureSecurityKeyVaultSecretsVersion>
<AzureStorageBlobsVersion>12.13.0</AzureStorageBlobsVersion>
<AzureDataTablesVersion>12.8.0</AzureDataTablesVersion>
<FluentAssertionsVersion>5.10.3</FluentAssertionsVersion>
<NETStandardLibraryVersion>1.6.1</NETStandardLibraryVersion>
<NETStandardLibraryVersion>2.0.3</NETStandardLibraryVersion>
<MicrosoftApplicationInsightsVersion>2.21.0</MicrosoftApplicationInsightsVersion>
<MicrosoftAzureServicesAppAuthenticationVersion>1.3.1</MicrosoftAzureServicesAppAuthenticationVersion>
<MicrosoftDataAnalysisVersion>0.1.0</MicrosoftDataAnalysisVersion>
<MicrosoftDataODataVersion>5.8.4</MicrosoftDataODataVersion>
<MicrosoftDataServicesClientVersion>5.8.4</MicrosoftDataServicesClientVersion>
<MicrosoftBuildVersion>15.7.179</MicrosoftBuildVersion>
<MicrosoftBuildFrameworkVersion>15.7.179</MicrosoftBuildFrameworkVersion>
<MicrosoftBuildTasksCoreVersion>15.7.179</MicrosoftBuildTasksCoreVersion>
<MicrosoftBuildUtilitiesCoreVersion>15.7.179</MicrosoftBuildUtilitiesCoreVersion>
<MicrosoftCodeAnalysisAnalyzersVersion>2.6.3</MicrosoftCodeAnalysisAnalyzersVersion>
<MicrosoftCodeAnalysisCSharpVersion>2.9.0</MicrosoftCodeAnalysisCSharpVersion>
<MsbuildTaskMicrosoftCodeAnalysisCSharpVersion>3.8.0</MsbuildTaskMicrosoftCodeAnalysisCSharpVersion>
<GenAPIMicrosoftCodeAnalysisVersion>4.3.0</GenAPIMicrosoftCodeAnalysisVersion>
<GenAPISystemCommandLineVersion>2.0.0-beta4.22272.1</GenAPISystemCommandLineVersion>
<MicrosoftDataServicesClientVersion>5.8.5</MicrosoftDataServicesClientVersion>
<MicrosoftBuildVersion>17.3.2</MicrosoftBuildVersion>
<MicrosoftBuildFrameworkVersion>17.3.2</MicrosoftBuildFrameworkVersion>
<MicrosoftBuildTasksCoreVersion>17.3.2</MicrosoftBuildTasksCoreVersion>
<MicrosoftBuildUtilitiesCoreVersion>17.3.2</MicrosoftBuildUtilitiesCoreVersion>
<MicrosoftCodeAnalysisCSharpVersion>4.4.0</MicrosoftCodeAnalysisCSharpVersion>
<!-- TODO: This library is deprecated, brings in the entire .NET Standard 1.3 dependency graph (including vulnerable libraries)
and should be replaced with Microsoft.Identity.Client. -->
<MicrosoftIdentityModelClientsActiveDirectoryVersion>3.17.2</MicrosoftIdentityModelClientsActiveDirectoryVersion>
<MicrosoftRestClientRuntimeVersion>2.3.13</MicrosoftRestClientRuntimeVersion>
<MicrosoftExtensionsDependencyModelVersion>6.0.0</MicrosoftExtensionsDependencyModelVersion>
<MicrosoftExtensionsDependencyInjectionAbstractionsVersion>6.0.0</MicrosoftExtensionsDependencyInjectionAbstractionsVersion>
<MicrosoftExtensionsDependencyInjectionVersion>6.0.0</MicrosoftExtensionsDependencyInjectionVersion>
<MicrosoftExtensionsFileSystemGlobbingVersion>2.0.0</MicrosoftExtensionsFileSystemGlobbingVersion>
<MicrosoftExtensionsLoggingConsoleVersion>6.0.0</MicrosoftExtensionsLoggingConsoleVersion>
<MicrosoftNETCorePlatformsVersion>2.1.0</MicrosoftNETCorePlatformsVersion>
<MicrosoftNETCorePlatformsVersion>5.0.0</MicrosoftNETCorePlatformsVersion>
<MicrosoftNetCompilersToolsetVersion>4.5.2-3.23152.4</MicrosoftNetCompilersToolsetVersion>
<MicrosoftNetTestSdkVersion>17.5.0</MicrosoftNetTestSdkVersion>
<MicrosoftNETILLinkTasksVersion>6.0.100-1.22103.2</MicrosoftNETILLinkTasksVersion>
<MicrosoftSignedWixVersion>1.0.0-v3.14.0.5722</MicrosoftSignedWixVersion>
<MoqVersion>4.8.3</MoqVersion>
<MoqVersion>4.18.4</MoqVersion>
<MonoOptionsVersion>5.3.0.1</MonoOptionsVersion>
<McMasterExtensionsCommandLineUtils>2.3.0</McMasterExtensionsCommandLineUtils>
<NewtonsoftJsonVersion>13.0.1</NewtonsoftJsonVersion>
<SystemTextJsonVersion>7.0.2</SystemTextJsonVersion>
<NuGetFrameworksVersion>6.2.2</NuGetFrameworksVersion>
<NuGetPackagingVersion>6.2.2</NuGetPackagingVersion>
<OctokitVersion>0.32.0</OctokitVersion>
<SwashbuckleAspNetCoreSwaggerVersion>3.0.0</SwashbuckleAspNetCoreSwaggerVersion>
<SystemBuffersVersion>4.5.1</SystemBuffersVersion>
<NuGetVersioningVersion>6.2.2</NuGetVersioningVersion>
<OctokitVersion>0.41.0</OctokitVersion>
<SystemCollectionsImmutableVersion>1.5.0</SystemCollectionsImmutableVersion>
<SystemDiagnosticsTraceSourceVersion>4.0.0</SystemDiagnosticsTraceSourceVersion>
<SystemIOCompressionVersion>4.3.0</SystemIOCompressionVersion>
<SystemIOPackagingVersion>4.5.0</SystemIOPackagingVersion>
<SystemIOFileSystemPrimitivesVersion>4.3.0</SystemIOFileSystemPrimitivesVersion>
<SystemMemoryVersion>4.5.5</SystemMemoryVersion>
<SystemNumericsVectorsVersion>4.5.0</SystemNumericsVectorsVersion>
<SystemReflectionMetadataVersion>1.6.0</SystemReflectionMetadataVersion>
<SystemRuntimeCompilerServicesUnsafeVersion>6.0.0</SystemRuntimeCompilerServicesUnsafeVersion>
<SystemReflectionMetadataVersion>6.0.1</SystemReflectionMetadataVersion>
<SystemRuntimeInteropServicesRuntimeInformation>4.3.0</SystemRuntimeInteropServicesRuntimeInformation>
<SystemSecurityCryptographyX509CertificatesVersion>4.3.0</SystemSecurityCryptographyX509CertificatesVersion>
<SystemTextEncodingsWebVersion>6.0.0</SystemTextEncodingsWebVersion>
<SystemThreadingTasksExtensionVersion>4.5.4</SystemThreadingTasksExtensionVersion>
<SystemValueTupleVersion>4.5.0</SystemValueTupleVersion>
<!-- TODO: This library is deprecated, brings in the entire .NET Standard 1.3 dependency graph (including vulnerable libraries)
and should be replaced with Azure.Storage.Common. -->
<WindowsAzureStorageVersion>8.5.0</WindowsAzureStorageVersion>
<XUnitVersion>2.4.2</XUnitVersion>
<XUnitAbstractionsVersion>2.0.3</XUnitAbstractionsVersion>
<MicrosoftDotNetBuildTasksFeedVersion>8.0.0-beta.23219.2</MicrosoftDotNetBuildTasksFeedVersion>
<MicrosoftDotNetSignToolVersion>8.0.0-beta.23219.2</MicrosoftDotNetSignToolVersion>
<MicrosoftAspNetCoreAllVersion>2.0.0</MicrosoftAspNetCoreAllVersion>
<MicrosoftDotNetGitHubIssueLabelerAssetsVersion>1.6.0</MicrosoftDotNetGitHubIssueLabelerAssetsVersion>
<MicrosoftMLVersion>1.0.0</MicrosoftMLVersion>
<MicrosoftVisualStudioWebCodeGenerationDesignVersion>2.0.4</MicrosoftVisualStudioWebCodeGenerationDesignVersion>
<MicrosoftDiaSymReaderPdb2PdbVersion>1.1.0-beta2-19575-01</MicrosoftDiaSymReaderPdb2PdbVersion>
<MicrosoftDotNetMaestroClientVersion>1.1.0-beta.21553.1</MicrosoftDotNetMaestroClientVersion>
<MicrosoftSourceLinkGitHubVersion>8.0.0-beta.23218.3</MicrosoftSourceLinkGitHubVersion>
Expand All @@ -91,5 +74,17 @@
<MicrosoftNetSdkWorkloadManifestReaderVersion>8.0.100-preview.3.23178.3</MicrosoftNetSdkWorkloadManifestReaderVersion>
<MicrosoftDeploymentDotNetReleasesVersion>1.0.0-preview6.1.23159.4</MicrosoftDeploymentDotNetReleasesVersion>
<MicrosoftTemplateEngineAuthoringTasksVersion>8.0.100-preview.4.23224.3</MicrosoftTemplateEngineAuthoringTasksVersion>
<MicrosoftNETWorkloadMonoToolChainManifest_60200Version>6.0.3</MicrosoftNETWorkloadMonoToolChainManifest_60200Version>
<MicrosoftiOSTemplatesVersion>15.2.302-preview.14.122</MicrosoftiOSTemplatesVersion>
<MicrosoftNETWorkloadEmscriptenManifest_60200Version>6.0.4</MicrosoftNETWorkloadEmscriptenManifest_60200Version>
<MicrosoftNETRuntimeEmscripten2023Nodewin_x64>6.0.4</MicrosoftNETRuntimeEmscripten2023Nodewin_x64>
<MicrosoftNETRuntimeEmscripten2023Pythonwin_x64>6.0.4</MicrosoftNETRuntimeEmscripten2023Pythonwin_x64>
<MicrosoftNETRuntimeEmscripten2023Sdkwin_x64>6.0.4</MicrosoftNETRuntimeEmscripten2023Sdkwin_x64>
<CoverletCollectorVersion>1.0.1</CoverletCollectorVersion>
<MicrosoftOpenApiVersion>1.1.4</MicrosoftOpenApiVersion>
<MicrosoftOpenApiReadersVersion>1.1.4</MicrosoftOpenApiReadersVersion>
<MicrosoftBclHashCodeVersion>1.1.1</MicrosoftBclHashCodeVersion>
<JetBrainsAnnotationsVersion>2018.2.1</JetBrainsAnnotationsVersion>
</PropertyGroup>

</Project>
3 changes: 2 additions & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23219.2",
"Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23219.2"
"Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23219.2",
"Microsoft.Build.NoTargets": "3.7.0"
}
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(TargetFrameworkForNETSDK)</TargetFramework>
<TargetFramework>$(NetCurrent)</TargetFramework>
<Nullable>enable</Nullable>
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="Moq" Version="4.8.3" />

<!-- This is here so that we agree with the project's transitive references to NewtonSoft.Json -->
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionsVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
17 changes: 4 additions & 13 deletions src/Common/Microsoft.Arcade.Common/Microsoft.Arcade.Common.csproj
Original file line number Diff line number Diff line change
@@ -1,30 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net472;netstandard2.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;$(NetFrameworkToolCurrent)</TargetFrameworks>
<IsPackable>true</IsPackable>
<DefaultExcludesInProjectFolder Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) != '.NETFramework'">**/*.Desktop.*</DefaultExcludesInProjectFolder>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildUtilitiesCoreVersion)" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="$(MicrosoftExtensionsDependencyInjectionVersion)" />
<PackageReference Include="System.Net.Http" Version="$(SystemNetHttpVersion)" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="$(MicrosoftExtensionsLoggingConsoleVersion)" />

<!-- This is here so that we agree with the project's transitive references to NewtonSoft.Json -->
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<Compile Include="..\Internal\AssemblyResolver.cs" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' != 'net472'">
<Compile Remove="MSBuildTaskBase.Desktop.cs" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
<Reference Include="System.IO.Compression" />
<Reference Include="System.Net.Http" />
</ItemGroup>

</Project>
Loading

0 comments on commit bde465e

Please sign in to comment.