Skip to content

CP1002 AssemblySymbolLoader warning needs more information #46093

Closed
@ViktorHofer

Description

D:\a\_work\1\s\.dotnet\sdk\10.0.100-alpha.1.25067.4\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ApiCompat.ValidatePackage.targets(39,5): error CP1002: Could not resolve reference 'Microsoft.NET.StringTools.dll' in any of the provided search directories. [D:\a\_work\1\s\src\SignalR\common\Protocols.MessagePack\src\Microsoft.AspNetCore.SignalR.Protocols.MessagePack.csproj]
D:\a\_work\1\s\.dotnet\sdk\10.0.100-alpha.1.25067.4\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ApiCompat.ValidatePackage.targets(39,5): error CP1002: Could not resolve reference 'Microsoft.NET.StringTools.dll' in any of the provided search directories. [D:\a\_work\1\s\src\SignalR\common\Protocols.MessagePack\src\Microsoft.AspNetCore.SignalR.Protocols.MessagePack.csproj]
D:\a\_work\1\s\.dotnet\sdk\10.0.100-alpha.1.25067.4\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ApiCompat.ValidatePackage.targets(39,5): error CP1002: Could not resolve reference 'Microsoft.NET.StringTools.dll' in any of the provided search directories. [D:\a\_work\1\s\src\SignalR\common\Protocols.MessagePack\src\Microsoft.AspNetCore.SignalR.Protocols.MessagePack.csproj]

A few issues:

  1. The warning message should mention why it gets loaded, which other assembly brings it in.
  2. The warning message can get logged multiple times if multiple assemblies in a package have a reference to it. Maybe the message could include the root assembly (including its relative path) that gets loaded.
  3. It would be good to log all assemblies that get loaded by the AssemblySymbolLoader with low importance so that the information appears in a binlog.

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions