From b58f40a40a0bcffe7ed5dbf70e5ff75e0a14984e Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Mon, 9 Nov 2026 07:28:51 +0100 Subject: [PATCH] Build the repo with the published ICSharpCode.ReferenceAssemblyAnnotator Replace TunnelVisionLabs.ReferenceAssemblyAnnotator 1.0.0-alpha.160 (which still has the GetElementType() comparer bug) with the published ICSharpCode.ReferenceAssemblyAnnotator 2.0.0-preview.7. The project now references a package with its own ID, which fails restore with NU1108, so restore the NewIdRequiredDueToNuGetBug PackageId workaround under the new ID. The packed nupkg keeps its real name. Co-Authored-By: Claude Opus 5.5 --- CLAUDE.md | 2 +- Directory.Build.props | 2 +- .../ICSharpCode.ReferenceAssemblyAnnotator.csproj | 12 ++++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 27b842b..69b5606 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -16,7 +16,7 @@ dotnet build ReferenceAssemblyAnnotator.sln -c Release - `GeneratePackageOnBuild` is on: the build writes the `.nupkg` to `ICSharpCode.ReferenceAssemblyAnnotator/bin//`. The version comes from Nerdbank.GitVersioning (`version.json`), so it only reflects committed changes. - `TreatWarningsAsErrors` is on outside Visual Studio; StyleCop.Analyzers (`stylecop.json`) and `ICSharpCode.ReferenceAssemblyAnnotator.ruleset` apply. Assemblies are strong-name signed (`build/Key.snk`). -- The repo annotates its own references with the *published* `TunnelVisionLabs.ReferenceAssemblyAnnotator` (see `Directory.Build.props`), not the local build. That old version still has the `GetElementType()` comparer bug fixed here. It only works because this repo's own TFMs never hit the bug, so switch to the published `ICSharpCode.*` package once it exists. +- The repo annotates its own references with the *published* `ICSharpCode.ReferenceAssemblyAnnotator` (pinned in `Directory.Build.props`), not the local build; bump the pin when a release fixes something that matters for the repo's own TFMs. Because the project has the same ID, its `PackageId` is `ICSharpCode.ReferenceAssemblyAnnotator.NewIdRequiredDueToNuGetBug` during restore (otherwise NU1108 cycle) and is set back by the `RestorePackageId` target before the nuspec is generated. - The task targets netstandard2.0 (dotnet MSBuild) and net472 (VS MSBuild) and compiles against MSBuild 17.8 (compile-only). Don't raise that to MSBuild 18: it drags in System.Collections.Immutable 10, which older hosts can't load. ## Tests diff --git a/Directory.Build.props b/Directory.Build.props index 0f26d75..42b6c77 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -37,7 +37,7 @@ - + diff --git a/ICSharpCode.ReferenceAssemblyAnnotator/ICSharpCode.ReferenceAssemblyAnnotator.csproj b/ICSharpCode.ReferenceAssemblyAnnotator/ICSharpCode.ReferenceAssemblyAnnotator.csproj index db2fb49..7417ead 100644 --- a/ICSharpCode.ReferenceAssemblyAnnotator/ICSharpCode.ReferenceAssemblyAnnotator.csproj +++ b/ICSharpCode.ReferenceAssemblyAnnotator/ICSharpCode.ReferenceAssemblyAnnotator.csproj @@ -9,6 +9,8 @@ true tools true + + ICSharpCode.ReferenceAssemblyAnnotator.NewIdRequiredDueToNuGetBug @@ -42,4 +44,14 @@ + + $(GenerateNuspecDependsOn);RestorePackageId + + + + + ICSharpCode.ReferenceAssemblyAnnotator + + +