Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dotnet build ReferenceAssemblyAnnotator.sln -c Release

- `GeneratePackageOnBuild` is on: the build writes the `.nupkg` to `ICSharpCode.ReferenceAssemblyAnnotator/bin/<Configuration>/`. 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
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="TunnelVisionLabs.ReferenceAssemblyAnnotator" Version="1.0.0-alpha.160" PrivateAssets="all" />
<PackageReference Include="ICSharpCode.ReferenceAssemblyAnnotator" Version="2.0.0-preview.7" PrivateAssets="all" />
<PackageDownload Include="Microsoft.NETCore.App.Ref" Version="[$(AnnotatedReferenceAssemblyVersion)]" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<BuildOutputTargetFolder>tools</BuildOutputTargetFolder>
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
<!-- Restore must not see our own ID: the repo builds itself with the published package of the same ID (NU1108). -->
<PackageId>ICSharpCode.ReferenceAssemblyAnnotator.NewIdRequiredDueToNuGetBug</PackageId>
</PropertyGroup>

<PropertyGroup>
Expand Down Expand Up @@ -42,4 +44,14 @@
</ItemGroup>
</Target>

<PropertyGroup>
<GenerateNuspecDependsOn>$(GenerateNuspecDependsOn);RestorePackageId</GenerateNuspecDependsOn>
</PropertyGroup>

<Target Name="RestorePackageId">
<PropertyGroup>
<PackageId>ICSharpCode.ReferenceAssemblyAnnotator</PackageId>
</PropertyGroup>
</Target>

</Project>
Loading