ProjectsAreNugetPackages 1.0.6
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.6
NuGet\Install-Package ProjectsAreNugetPackages -Version 1.0.6
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.6"> <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.
<PackageVersion Include="ProjectsAreNugetPackages" Version="1.0.6" />
<PackageReference Include="ProjectsAreNugetPackages"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ProjectsAreNugetPackages --version 1.0.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ProjectsAreNugetPackages, 1.0.6"
#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.
#:package ProjectsAreNugetPackages@1.0.6
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ProjectsAreNugetPackages&version=1.0.6
#tool nuget:?package=ProjectsAreNugetPackages&version=1.0.6
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.
- NugetUpdateSource: List of nuget URLs to update from. Defaults to NugetBuildFolder and NugetSource.
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" />
<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.
Version | Downloads | Last Updated |
---|---|---|
1.0.15 | 1,637 | 1/12/2018 |
1.0.14 | 1,302 | 1/10/2018 |
1.0.13 | 1,295 | 1/9/2018 |
1.0.11 | 1,092 | 1/9/2018 |
1.0.10 | 1,438 | 1/8/2018 |
1.0.9 | 1,684 | 1/3/2018 |
1.0.8 | 1,261 | 12/28/2017 |
1.0.6 | 1,298 | 12/26/2017 |
1.0.5 | 1,681 | 12/25/2017 |
1.0.4 | 1,288 | 12/24/2017 |
1.0.3 | 1,262 | 12/24/2017 |
1.0.0 | 1,308 | 12/20/2017 |