Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 2.14 KB

File metadata and controls

29 lines (21 loc) · 2.14 KB

VDimensions.MSBuild.Sdk.Nuspec

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

The Problem

MSBuild inhibits the ability to automatically generate a .nuspec file and build a .nuget package trouth its toolchain, however developers need to configure certain MSBuild property ($(NuspecProperties)) beforehand in order for the produced package to include accurate and sufficient information.

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

A number of those properties can be inferred from values already part of the MSBuild project, so developers do not need to define them by hand over and over again.

The Solution

This package includes MSBuild targets that would pre-populate the following MSBuild properties realated to nuget package generation with default vaules automatically, except the same properties have already been defined by the defeloper. In that case the package would respect the project's original setup.

Property Value
$(NuspecProperties) if empty, it will be populated as defined below. If not, nothing will change.
$(AssemblyName) id=$(AssemblyName); will be added to the autogenerated nuspec
$(PackageVersion) version=$(PackageVersion); 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
$(License) license=$(License); will be added to the autogenerated nuspec
$(Configuration) config=$(Configuration); will be added to the autogenerated nuspec
$(Description) description=$(Description); will be added to the autogenerated nuspec
$(PackageTags) tags=$(PackageTags); will be added to the autogenerated nuspec
$(PackageIconUri) icon=$(PackageIconUri); will be added to the autogenerated nuspec