-
Notifications
You must be signed in to change notification settings - Fork 342
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid package dependencies on inbox librares & clean-up (#13210)
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
1 parent
092ad72
commit bde465e
Showing
140 changed files
with
592 additions
and
898 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 2 additions & 6 deletions
8
src/Common/Microsoft.Arcade.Common.Tests/Microsoft.Arcade.Common.Tests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 4 additions & 13 deletions
17
src/Common/Microsoft.Arcade.Common/Microsoft.Arcade.Common.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
Oops, something went wrong.