You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The behavior of ResolveNuGetPackageAssets has gotten out of sync with ResolvePackageAssets. A few years ago the ResolvePackageAssets task was updated to understand multi-targeted analyzers. That allows a NuPkg to deploy multiple versions of an analyzer targeted to different versions of the Roslyn API. Since then this behavior's been used in a number of high impact packages like System.Text.Json, Microsoft.Extensions.Logging.Abstractions, etc ...
That behavior was never replicated in ResolveNuGetPackageAssets. This means when a <PackageReference> to one of those NuPkg is done in an old style project it will end up resolving all of the analyzers in the NuPkg. Basically many different versions of the same analyzer. That essentially breaks the build as it can't be interpreted correctly by the compiler.
The NuPkg have tried to work around this by detecting unsuported scenarios and picking the most compatible analyzer. That is a band aid though. It removes one symptom of the problem while causing others. The real fix is getting these two asset resolutions back in sync with respect to features.
The text was updated successfully, but these errors were encountered:
The behavior of
ResolveNuGetPackageAssets
has gotten out of sync withResolvePackageAssets
. A few years ago theResolvePackageAssets
task was updated to understand multi-targeted analyzers. That allows a NuPkg to deploy multiple versions of an analyzer targeted to different versions of the Roslyn API. Since then this behavior's been used in a number of high impact packages like System.Text.Json, Microsoft.Extensions.Logging.Abstractions, etc ...That behavior was never replicated in
ResolveNuGetPackageAssets
. This means when a<PackageReference>
to one of those NuPkg is done in an old style project it will end up resolving all of the analyzers in the NuPkg. Basically many different versions of the same analyzer. That essentially breaks the build as it can't be interpreted correctly by the compiler.The NuPkg have tried to work around this by detecting unsuported scenarios and picking the most compatible analyzer. That is a band aid though. It removes one symptom of the problem while causing others. The real fix is getting these two asset resolutions back in sync with respect to features.
The text was updated successfully, but these errors were encountered: