常用的MSbuild Project属性

MSBuild 和 Nuget package metadata Project常用属性变量记录

通用属性

Property NameDescription
ConfigurationThe configuration that you are building, either “Debug” or “Release.”
OutputPathSpecifies the path to the output directory, relative to the project directory, for example, “bin\Debug”.
OutputTypeSpecifies the file format of the output file. This parameter can have one of the following values: Library | Exe

Nuget Package Metadata

Property NameDescription
IsPackableA Boolean value that specifies whether the project can be packed. The default value is true.
VersionSpecifies the version that the resulting package will have.
AuthorsA semicolon-separated(;) list of packages authors, matching the profile names on nuget.org.
CompanyA company name.
ProductA product name or info.
PackageDescriptionA long description of the package for UI display.
DescriptionA long description for the assembly. If PackageDescription is not specified then this property is also used as the description of the package.
CopyrightCopyright details for the package.
PackageIconUrlA URL for a 64x64 image with transparent background to use as the icon for the package in UI display.
PackageTagsA semicolon-delimited(;) list of tags that designates the package.
PackageOutputPathDetermines the output path in which the packed package will be dropped. Default is $(OutputPath).
RepositoryUrlSpecifies the URL for the repository where the source code for the package resides and/or from which it’s being built.
RepositoryTypeSpecifies the type of the repository. Default is “git”.
GeneratePackageOnBuildTo automatically run dotnet pack when you run dotnet build