ProjectsAreNugetPackages 1.0.5
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package ProjectsAreNugetPackages --version 1.0.5
NuGet\Install-Package ProjectsAreNugetPackages -Version 1.0.5
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="ProjectsAreNugetPackages" Version="1.0.5"> <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.
paket add ProjectsAreNugetPackages --version 1.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ProjectsAreNugetPackages, 1.0.5"
#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.
// Install ProjectsAreNugetPackages as a Cake Addin #addin nuget:?package=ProjectsAreNugetPackages&version=1.0.5 // Install ProjectsAreNugetPackages as a Cake Tool #tool nuget:?package=ProjectsAreNugetPackages&version=1.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
ProjectsAreNugetPackages
- Build a nuget package after having built the project.
- Consume project dependencies as nuget packages after a one-time migration
Custom Properties
- BuildNugetPackage: true/false. Whether or not to build a Nuget project after build
- OfficialBuild: true/false. Helper property to resolve default values for other properties.
- NugetToolPath: Folder path of Nuget.exe
- NugetConfig: Path to Nuget.config
- NuSpecPath: Path to project's nuspec file. If empty, defaults to built-in nuspec file.
- NugetManufacturer: Package author field.
- NuspecVersion: Package version (without suffix).
- NuspecVersionSuffix: Package version suffix. Default to:
- 'local' on non-official release builds
- 'localdebug' on non-official debug builds
- nothing on release official builds
- NugetIdPrefix: Package prefix. Used to distinguish project dependencies from available packages on nuget.org
- NugetBuildFolder: Tagret folder for Nuget packages. Expected to exist in nuget.config file.
- NugetSource: URL to nuget source to add packages to on UploadNugetPackage target
- NugetUpdatePreRelease: Whether or not to update/install pre-release nuget packages. Used on NugetInstallUpdate target.
Custom Items
- NugetPackProperty: key=value pairs to pass as properties to Nuget pack command.
Tasks
- ConvertProjectRefToNugetPackage: One-time task to convert project refrences to Nuget dependencies
- Inputs:
- Projects [Required]: Item list with all projects to convert.
- SolutionDir [Required]: Solution folder
- PackageIdPrefix: Prefix to project names as Nuget dependencies. See property NugetIdPrefix.
- Inputs:
- ResolveDependants: Resolve build order according to Nuget dependants
- Inputs:
- DependecyProject [Required]: The target project to build.
- AllProjects [Required]: Item list with all projects.
- PackageIdPrefix: Prefix to project names as Nuget dependencies. See property NugetIdPrefix.
- Outputs:
- DependantProjectsBuildOrdered: Item list- projects to build in order. Projects that do not depend on DependecyProject are not on the list
- Inputs:
Targets
- ConvertProjectRefToNugetPackage: See ConvertProjectRefToNugetPackage task
- ResolveDependants: See ResolveDependants task
- NugetInstallUpdate: Install and update nuget packages
- UploadNugetPackage: Nuget add built package to 'NugetSource' repository
- CreateNugetPackage: Pack a project.
How to use
First time init
- Install the package to all projects
- Create a local nuget.config file
- Add source with relative path to local nuget build folder.
- [Optional] Add source to organization's nuget repository.
- Create a file 'ToduBuild.custom.props' with these properties:
- NugetConfig
- NugetIdPrefix
- NuspecVersion
- FullVersion (for TidyBuild)
- [Optional] NugetSource
- Build all projects normally
- MSBuild all projects with target 'ConvertProjectRefToNugetPackage'
- Build again all projects.
- Create build.xml file. Sample code:
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildThisFileDirectory)\packages\ProjectsAreNugetPackages.1.0.5\build\ProjectsAreNugetPackages.tasks"/>
<ItemGroup>
<AllProjects Include=".\**\*.*proj"/>
</ItemGroup>
<PropertyGroup>
<TargetProject>ConsoleApplication1\ConsoleApplication1.vcxproj</TargetProject>
</PropertyGroup>
<Target Name="Build">
<ResolveDependants DependecyProject="$(TargetProject)" AllProjects="@(AllProjects)" PackageIdPrefix="Local.">
<Output TaskParameter="DependantProjectsBuildOrdered" ItemName="ProjectBuildOrder" />
</ResolveDependants>
<Message Text="Project build order: @(ProjectBuildOrder)"/>
<MSBuild Projects="%(ProjectBuildOrder.FullPath)" Targets="NugetInstallUpdate;Rebuild" RunEachTargetSeparately="true" Properties="VersionTag=$(VersionTag)"/>
<MSBuild Projects="%(ProjectBuildOrder.FullPath)" Targets="UploadNugetPackage"/>
</Target>
</Project>
Routine builds
- MSBuild build.xml target 'Build'. Make sure to set 'TargetProject' property from command line.
There are no supported framework assets in this package.
Learn more about Target Frameworks and .NET Standard.
-
- MSBuildTasks (>= 1.5.0.235)
- NuGet.CommandLine (>= 4.4.1)
- TidyBuild (>= 1.0.8)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.