Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 18, 2025

Users of Nerdbank.GitVersioning in native C++ projects could not find documentation on how to customize CompanyName, LegalCopyright, ProductName, and FileDescription in generated version resources.

Changes

Added "Native projects (C++)" section to docfx/docs/build-systems/msbuild.md documenting:

  • Standard MSBuild properties that control version resource fields:
    • AssemblyCompany → CompanyName
    • AssemblyCopyright → LegalCopyright
    • AssemblyProduct → ProductName
    • AssemblyTitle → FileDescription
  • Default values (most default to $(AssemblyName))
  • Copyright year is automatically set at build time

Example

Set properties in .vcxproj or Directory.Build.props:

<PropertyGroup>
  <AssemblyCompany>Contoso Corporation</AssemblyCompany>
  <AssemblyCopyright>Copyright © Contoso Corporation. All rights reserved.</AssemblyCopyright>
  <AssemblyProduct>Contoso Application Suite</AssemblyProduct>
  <AssemblyTitle>Contoso Main Application</AssemblyTitle>
</PropertyGroup>

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • learn.microsoft.com
    • Triggering command: /opt/hostedtoolcache/dotnet/dotnet /opt/hostedtoolcache/dotnet/dotnet /home/REDACTED/.nuget/packages/docfx/2.78.4/tools/net9.0/any/docfx.dll docfx/docfx.json (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Customizing version properties in native projects, especially Copyright and Company name</issue_title>
<issue_description>I'd like to use Nerdbank.GitVersioning in a native C++ project. I tried adding the NuGet package to the project and apparently it works well: it generates a VersionInfo resource with all the nice little numbers I want. However, it generates generic strings for CompanyName and LegalCopyright. I'd like to customize those and also ProductName and FileDescription if possible.

I've read the documentation about version.json twice, but I don't think there's a way to customize those fields.</issue_description>

<agent_instructions>Address this issue by changing documentation only. Look particularly at @fstanchina's comments to see what documentation they suggest.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@AArnott Good question. I don't know much about the C++ integration as it was contributed by someone else years ago. Ideally IMO, I'd avoid getting into that business and have you fill those fields as you would without NB.GV so that NB.GV can stay squarely in the _versioning_ business. But if it's the same resource element that describes both, I suppose there's not much choice. Is that your take on it?

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Update documentation for customizing version properties Document MSBuild properties for customizing native C++ version resources Dec 18, 2025
Copilot AI requested a review from AArnott December 18, 2025 17:54
@AArnott AArnott marked this pull request as ready for review December 18, 2025 18:01
@AArnott AArnott enabled auto-merge December 18, 2025 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Customizing version properties in native projects, especially Copyright and Company name

2 participants