Skip to content

Commit

Permalink
Set Package version in API review code File for .NET (#7304)
Browse files Browse the repository at this point in the history
Co-authored-by: praveenkuttappan <[email protected]>
  • Loading branch information
praveenkuttappan and praveenkuttappan authored Nov 16, 2023
1 parent f8a0e69 commit 7441f21
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/dotnet/APIView/APIView/Languages/CodeFileBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using APIView;
Expand Down Expand Up @@ -48,7 +48,7 @@ public class CodeFileBuilder

public ICodeFileBuilderSymbolOrderProvider SymbolOrderProvider { get; set; } = new CodeFileBuilderSymbolOrderProvider();

public const string CurrentVersion = "24";
public const string CurrentVersion = "25";

private IEnumerable<INamespaceSymbol> EnumerateNamespaces(IAssemblySymbol assemblySymbol)
{
Expand Down Expand Up @@ -112,7 +112,8 @@ public CodeFile Build(IAssemblySymbol assemblySymbol, bool runAnalysis, List<Dep
VersionString = CurrentVersion,
Navigation = new[] { assemblyNavigationItem },
Diagnostics = analyzer.Results.ToArray(),
PackageName = assemblySymbol.Name
PackageName = assemblySymbol.Name,
PackageVersion = assemblySymbol.Identity.Version.ToString()
};

return node;
Expand All @@ -139,7 +140,7 @@ public static void BuildInternalsVisibleToAttributes(CodeFileTokensBuilder build
param = firstComma > 0 ? param[..firstComma] : param;
builder.Append(new CodeFileToken(param, CodeFileTokenKind.Text)
{
// allow assembly to be commentable
// allow assembly to have a comment
DefinitionId = attribute.AttributeClass.Name
});
}
Expand Down

0 comments on commit 7441f21

Please sign in to comment.