My Build cheat sheet

·

1 min read

My build cheat sheet.

  • Restore
msbuild -t:Restore -v:m
  • Build
msbuild -t:Restore -v:mmsbuild -p:Configuration=Release

msbuild -p:Configuration=Release -v:Detailed

msbuild -p:Configuration=Release -p:Platform="Any CPU"
  • To build before current project but after building dependencies.
<Target Name="AfterResolveReferences">
  • Clean folder
dir . -include bin,obj -recurse | del -recurse -force

Assembly Version

Attribute = AssemblyVersionAttribute

Build Property = AssemblyVersion

File Version

Attribute = AssemblyFileVersionAttribute

Build Property = FileVersion

NuGet Version

Attribute = AssemblyInformationalVersionAttribute

Build Property = PackageVersion (this is auto-generated based on VersionPrefix + VersionSuffix)

Dotnet Test

dotnet test --no-build -v n
dotnet test --configuration Release --no-build -v n