VDimensions.MSBuild.Sdk.Packaging 0.8.35

dotnet add package VDimensions.MSBuild.Sdk.Packaging --version 0.8.35
                    
NuGet\Install-Package VDimensions.MSBuild.Sdk.Packaging -Version 0.8.35
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="VDimensions.MSBuild.Sdk.Packaging" Version="0.8.35">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="VDimensions.MSBuild.Sdk.Packaging" Version="0.8.35" />
                    
Directory.Packages.props
<PackageReference Include="VDimensions.MSBuild.Sdk.Packaging">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add VDimensions.MSBuild.Sdk.Packaging --version 0.8.35
                    
#r "nuget: VDimensions.MSBuild.Sdk.Packaging, 0.8.35"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package VDimensions.MSBuild.Sdk.Packaging@0.8.35
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=VDimensions.MSBuild.Sdk.Packaging&version=0.8.35
                    
Install as a Cake Addin
#tool nuget:?package=VDimensions.MSBuild.Sdk.Packaging&version=0.8.35
                    
Install as a Cake Tool

VDimensions.MSBuild.Sdk.Packaging

Ensures that your MSBuild project infers sensible defaults to package-specific MSBuild properties. This is especially useful if you use MSBuild to produce a nuget package without manually creating a nuspec file.

The Problem

MSBuild has the ability to automatically generate a .nuspec file and build a .nuget package trough its toolchain. Developers, however, need to configure a particular MSBuild property called $(NuspecProperties).

$(NuspecProperties) is a semi-colon-separated list of property-value pairs that are translated into the respective structure of the auto-generated nuspec file.

It is often a pain for most developers to configure the nuget package properties and keep them aligned with the assembly-level properties that serve the same semantic. This is because package-related data must either be set directly in NuspecProperties, or a number of other package-related MSBuild properties (usually starting with Package*) have to be set. Those properties often express the same semantics such as regular MSBuild properties that are embedded in the output .dll files.

Typical examples of such pairs include:

Package-level Property Assembly-level Property
$(PackageVersion) $(AssemblyVersion)
$(PackageCopyright) $(AssemblyCopyright) or $(Copyright)
$(Owners) or $(Authors) $(Company)

The Solution

A number of those properties can be automatically inferred from values already part of the MSBuild project, so developers do not need to define them by hand over and over again.. Furthermore, this helps establish a single-source-of-truth for the same parameters on both the compiled assembly and the nuget package.

This package includes MSBuild targets that would pre-populate the following package-related MSBuild properties automatically, except when the respective property is explicitly defined by the defeloper in their project file (in which case the package would respect the project's setup).

Property Value
$(NuspecProperties) When empty, it will be populated as defined below. When not empty, the below will not be applied!
$(AssemblyName) id=$(AssemblyName); will be added to the autogenerated nuspec
$(Configuration) config=$(Configuration); will be added to the autogenerated nuspec
$(Copyright) copyright=$(Copyright); will be added to the autogenerated nuspec
$(Authors) authors=$(Authors); will be added to the autogenerated nuspec
$(Owners) authors=$(Owners); will be added to the autogenerated nuspec
$(Description) description=$(Description); will be added to the autogenerated nuspec
$(PackageIconUri) icon=$(PackageIconUri); will be added to the autogenerated nuspec
$(PackageTags) tags=$(PackageTags); will be added to the autogenerated nuspec
$(PackageVersion) version=$(PackageVersion); will be added to the autogenerated nuspec
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.8.35 67 9/15/2026