Skip to content

Commit

Permalink
Remove TaskWithAssemblyResolveHooks (#37913)
Browse files Browse the repository at this point in the history
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Viktor Hofer <[email protected]>
  • Loading branch information
3 people authored Jan 12, 2024
1 parent 1f9c139 commit 231e921
Show file tree
Hide file tree
Showing 15 changed files with 43 additions and 98 deletions.
28 changes: 14 additions & 14 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,34 +79,34 @@
<Sha>eda92c290b08a2be0fcb8e79ac07ebc94dffb2a3</Sha>
<SourceBuild RepoName="format" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.9.0-3.24053.1">
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.10.0-1.24061.4">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>237fb52c683601ed639f1fdeaf38ceef0c768fbc</Sha>
<Sha>514b5364881b9a36a2630ab7c0160f8e642fc1b3</Sha>
<SourceBuild RepoName="roslyn" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis" Version="4.9.0-3.24053.1">
<Dependency Name="Microsoft.CodeAnalysis" Version="4.10.0-1.24061.4">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>237fb52c683601ed639f1fdeaf38ceef0c768fbc</Sha>
<Sha>514b5364881b9a36a2630ab7c0160f8e642fc1b3</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.CSharp" Version="4.9.0-3.24053.1">
<Dependency Name="Microsoft.CodeAnalysis.CSharp" Version="4.10.0-1.24061.4">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>237fb52c683601ed639f1fdeaf38ceef0c768fbc</Sha>
<Sha>514b5364881b9a36a2630ab7c0160f8e642fc1b3</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="4.9.0-3.24053.1">
<Dependency Name="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="4.10.0-1.24061.4">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>237fb52c683601ed639f1fdeaf38ceef0c768fbc</Sha>
<Sha>514b5364881b9a36a2630ab7c0160f8e642fc1b3</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.CSharp.Features" Version="4.9.0-3.24053.1">
<Dependency Name="Microsoft.CodeAnalysis.CSharp.Features" Version="4.10.0-1.24061.4">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>237fb52c683601ed639f1fdeaf38ceef0c768fbc</Sha>
<Sha>514b5364881b9a36a2630ab7c0160f8e642fc1b3</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.9.0-3.24053.1">
<Dependency Name="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.10.0-1.24061.4">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>237fb52c683601ed639f1fdeaf38ceef0c768fbc</Sha>
<Sha>514b5364881b9a36a2630ab7c0160f8e642fc1b3</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="4.9.0-3.24053.1">
<Dependency Name="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="4.10.0-1.24061.4">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>237fb52c683601ed639f1fdeaf38ceef0c768fbc</Sha>
<Sha>514b5364881b9a36a2630ab7c0160f8e642fc1b3</Sha>
</Dependency>
<Dependency Name="Microsoft.AspNetCore.DeveloperCertificates.XPlat" Version="9.0.0-alpha.1.24061.8">
<Uri>https://github.com/dotnet/aspnetcore</Uri>
Expand Down
18 changes: 9 additions & 9 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
<NETStandardLibraryNETFrameworkVersion>2.0.1-servicing-26011-01</NETStandardLibraryNETFrameworkVersion>
<NewtonsoftJsonPackageVersion>13.0.3</NewtonsoftJsonPackageVersion>
<StyleCopAnalyzersPackageVersion>1.2.0-beta.435</StyleCopAnalyzersPackageVersion>
<SystemCollectionsImmutablePackageVersion>7.0.0</SystemCollectionsImmutablePackageVersion>
<SystemCollectionsImmutablePackageVersion>8.0.0</SystemCollectionsImmutablePackageVersion>
<SystemDiagnosticsFileVersionInfoVersion>4.0.0</SystemDiagnosticsFileVersionInfoVersion>
<SystemReflectionMetadataVersion>7.0.0</SystemReflectionMetadataVersion>
<SystemReflectionMetadataVersion>8.0.0</SystemReflectionMetadataVersion>
<SystemSecurityCryptographyProtectedDataPackageVersion>9.0.0-alpha.1.24061.26</SystemSecurityCryptographyProtectedDataPackageVersion>
<SystemCollectionsSpecializedPackageVersion>4.3.0</SystemCollectionsSpecializedPackageVersion>
<SystemXmlXmlDocumentPackageVersion>4.3.0</SystemXmlXmlDocumentPackageVersion>
Expand Down Expand Up @@ -137,13 +137,13 @@
</PropertyGroup>
<PropertyGroup>
<!-- Dependencies from https://github.com/dotnet/roslyn -->
<MicrosoftNetCompilersToolsetPackageVersion>4.9.0-3.24053.1</MicrosoftNetCompilersToolsetPackageVersion>
<MicrosoftCodeAnalysisPackageVersion>4.9.0-3.24053.1</MicrosoftCodeAnalysisPackageVersion>
<MicrosoftCodeAnalysisCSharpPackageVersion>4.9.0-3.24053.1</MicrosoftCodeAnalysisCSharpPackageVersion>
<MicrosoftCodeAnalysisCSharpCodeStylePackageVersion>4.9.0-3.24053.1</MicrosoftCodeAnalysisCSharpCodeStylePackageVersion>
<MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>4.9.0-3.24053.1</MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>
<MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>4.9.0-3.24053.1</MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>
<MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>4.9.0-3.24053.1</MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>
<MicrosoftNetCompilersToolsetPackageVersion>4.10.0-1.24061.4</MicrosoftNetCompilersToolsetPackageVersion>
<MicrosoftCodeAnalysisPackageVersion>4.10.0-1.24061.4</MicrosoftCodeAnalysisPackageVersion>
<MicrosoftCodeAnalysisCSharpPackageVersion>4.10.0-1.24061.4</MicrosoftCodeAnalysisCSharpPackageVersion>
<MicrosoftCodeAnalysisCSharpCodeStylePackageVersion>4.10.0-1.24061.4</MicrosoftCodeAnalysisCSharpCodeStylePackageVersion>
<MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>4.10.0-1.24061.4</MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>
<MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>4.10.0-1.24061.4</MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>
<MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>4.10.0-1.24061.4</MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>
<MicrosoftNetCompilersToolsetVersion>$(MicrosoftNetCompilersToolsetPackageVersion)</MicrosoftNetCompilersToolsetVersion>
</PropertyGroup>
<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
<ProjectReference Include="..\Microsoft.DotNet.PackageValidation\Microsoft.DotNet.PackageValidation.csproj" />
<ProjectReference Include="..\Microsoft.DotNet.ApiCompatibility\Microsoft.DotNet.ApiCompatibility.csproj" />
<!-- We carry NuGet as part of the package in case the package is used with an older SDKs or with full framework MSBuild. -->
<PackageReference Include="NuGet.Packaging" PrivateAssets="All" Publish="true"/>
<PackageReference Include="NuGet.Packaging" PrivateAssets="All" Publish="true" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" ExcludeAssets="Runtime" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" ExcludeAssets="Runtime" PrivateAssets="all" />

<ProjectReference Include="..\..\Microsoft.DotNet.ApiSymbolExtensions\Microsoft.DotNet.ApiSymbolExtensions.csproj" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<TargetFrameworks>$(NetToolCurrent);$(NetFrameworkToolCurrent)</TargetFrameworks>
</PropertyGroup>

<!-- Exclude files that depend on Microsoft.Build.Framework and Microsoft.Build.Utilities.Core. These will be included by users of this package. -->
<!-- Exclude files that depend on Microsoft.Build.Framework and Microsoft.Build.Utilities.Core. These should be manually included by other projects. -->
<PropertyGroup>
<DefaultItemExcludes>$(DefaultItemExcludes);Logging\MSBuildLog.cs</DefaultItemExcludes>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" ExcludeAssets="Runtime" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
<ExpectedDependencies Include="Microsoft.Deployment.DotNet.Releases, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<ExpectedDependencies Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" />
<ExpectedDependencies Include="Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<ExpectedDependencies Include="System.Collections.Immutable, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<ExpectedDependencies Include="System.Collections.Immutable, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<ExpectedDependencies Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" />
<ExpectedDependencies Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<ExpectedDependencies Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Microsoft.NET.Build.Tasks.ConflictResolution
{
public class ResolvePackageFileConflicts : TaskWithAssemblyResolveHooks
public class ResolvePackageFileConflicts : TaskBase
{
private HashSet<ITaskItem> referenceConflicts = new();
private HashSet<ITaskItem> analyzerConflicts = new();
Expand Down
58 changes: 0 additions & 58 deletions src/Tasks/Common/TaskWithAssemblyResolveHooks.cs

This file was deleted.

2 changes: 1 addition & 1 deletion src/Tasks/Microsoft.NET.Build.Tasks/CreateComHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace Microsoft.NET.Build.Tasks
{
public class CreateComHost : TaskWithAssemblyResolveHooks
public class CreateComHost : TaskBase
{
[Required]
public string ComHostSourcePath { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/Tasks/Microsoft.NET.Build.Tasks/GenerateBundle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace Microsoft.NET.Build.Tasks
{
public class GenerateBundle : TaskWithAssemblyResolveHooks
public class GenerateBundle : TaskBase
{
[Required]
public ITaskItem[] FilesToBundle { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/Tasks/Microsoft.NET.Build.Tasks/GenerateClsidMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Microsoft.NET.Build.Tasks
{
public class GenerateClsidMap : TaskWithAssemblyResolveHooks
public class GenerateClsidMap : TaskBase
{
[Required]
public string IntermediateAssembly { get; set; }
Expand Down
8 changes: 4 additions & 4 deletions src/Tasks/Microsoft.NET.Build.Tasks/GenerateDepsFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Microsoft.NET.Build.Tasks
/// <summary>
/// Generates the $(project).deps.json file.
/// </summary>
public class GenerateDepsFile : TaskWithAssemblyResolveHooks
public class GenerateDepsFile : TaskBase
{
[Required]
public string ProjectPath { get; set; }
Expand Down Expand Up @@ -198,15 +198,15 @@ bool ShouldIncludeRuntimeAsset(ITaskItem item)
{
// Generate the RID-fallback for self-contained builds.
//
// In order to support loading components with RID-specific assets,
// In order to support loading components with RID-specific assets,
// the AssemblyDependencyResolver requires a RID fallback graph.
// The component itself should not carry the RID fallback graph with it, because
// it would need to carry graph of all the RIDs and needs updates for newer RIDs.
// For framework dependent apps, the RID fallback graph comes from the core framework Microsoft.NETCore.App,
// For framework dependent apps, the RID fallback graph comes from the core framework Microsoft.NETCore.App,
// so there is no need to write it into the app.
// If self-contained apps, the (applicable subset of) RID fallback graph needs to be written to the deps.json manifest.
//
// If a RID-graph is provided to the DependencyContextBuilder, it generates a RID-fallback
// If a RID-graph is provided to the DependencyContextBuilder, it generates a RID-fallback
// graph with respect to the target RuntimeIdentifier.

RuntimeGraph runtimeGraph =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace Microsoft.NET.Build.Tasks
{
public class GenerateRegFreeComManifest : TaskWithAssemblyResolveHooks
public class GenerateRegFreeComManifest : TaskBase
{
[Required]
public string IntermediateAssembly { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/Tasks/Microsoft.NET.Build.Tasks/GenerateShims.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Microsoft.NET.Build.Tasks
{
public sealed class GenerateShims : TaskWithAssemblyResolveHooks
public sealed class GenerateShims : TaskBase
{
/// <summary>
/// Relative paths for Apphost for different ShimRuntimeIdentifiers with RuntimeIdentifier as meta data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@
the same System.Reflection.Metadata assembly and their types can unify. See the following link for the MSBuild binding redirect config.
https://github.com/dotnet/msbuild/blob/5d102ae37163fc1f22610bb433c3ab9a2fff91f0/src/MSBuild/app.config#L59
-->
<PackageReference Include="System.Collections.Immutable" VersionOverride="$(SystemCollectionsImmutablePackageVersion)" />
<PackageReference Include="System.Reflection.Metadata" VersionOverride="$(SystemReflectionMetadataVersion)" />
<PackageReference Include="System.Reflection.MetadataLoadContext" VersionOverride="$(SystemReflectionMetadataVersion)" />
<PackageReference Include="System.Collections.Immutable" VersionOverride="7.0.0" />
<PackageReference Include="System.Reflection.Metadata" VersionOverride="7.0.0" />
<PackageReference Include="System.Reflection.MetadataLoadContext" VersionOverride="7.0.0" />
</ItemGroup>

<!-- These are loaded from the CLI's copy on .NET Core, we don't need to duplicate them on disk -->
Expand Down

0 comments on commit 231e921

Please sign in to comment.