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
<PackageReference Include="VDimensions.MSBuild.Sdk.Packaging" Version="0.8.35"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="VDimensions.MSBuild.Sdk.Packaging" Version="0.8.35" />
<PackageReference Include="VDimensions.MSBuild.Sdk.Packaging"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add VDimensions.MSBuild.Sdk.Packaging --version 0.8.35
#r "nuget: VDimensions.MSBuild.Sdk.Packaging, 0.8.35"
#:package VDimensions.MSBuild.Sdk.Packaging@0.8.35
#addin nuget:?package=VDimensions.MSBuild.Sdk.Packaging&version=0.8.35
#tool nuget:?package=VDimensions.MSBuild.Sdk.Packaging&version=0.8.35
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 |
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 |