CP1002 AssemblySymbolLoader warning needs more information #46093
Closed
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:
- The warning message should mention why it gets loaded, which other assembly brings it in.
- 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.
- 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.