-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.NET add document on packaging && disable uploading artifacts folder …
…to pipeline by default (#4299) * add package readme * Update PACKAGING.md
- Loading branch information
1 parent
6e4609a
commit 415d049
Showing
4 changed files
with
71 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Packaging AutoGen.NET | ||
|
||
This document describes the steps to pack the `AutoGen.NET` project. | ||
|
||
## Prerequisites | ||
|
||
- .NET SDK | ||
|
||
## Create Package | ||
|
||
1. **Restore and Build the Project** | ||
```bash | ||
dotnet restore | ||
dotnet build --configuration Release --no-restore | ||
``` | ||
|
||
|
||
2. **Create the NuGet Package** | ||
```bash | ||
dotnet pack --configuration Release --no-build | ||
``` | ||
|
||
This will generate both the `.nupkg` file and the `.snupkg` file in the `./artifacts/package/release` directory. | ||
|
||
For more details, refer to the [official .NET documentation](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-pack). | ||
|
||
## Add new project to package list. | ||
By default, when you add a new project to `AutoGen.sln`, it will not be included in the package list. To include the new project in the package, you need to add the following line to the new project's `.csproj` file | ||
|
||
e.g. | ||
|
||
```xml | ||
<Import Project="$(RepoRoot)/nuget/nuget-package.props" /> | ||
``` | ||
|
||
The `nuget-packages.props` enables `IsPackable` to `true` for the project, it also sets nenecessary metadata for the package. | ||
|
||
For more details, refer to the [NuGet folder](./nuget/README.md). | ||
|
||
## Package versioning | ||
The version of the package is defined by `VersionPrefix` and `VersionPrefixForAutoGen0_2` in [MetaInfo.props](./eng/MetaInfo.props). If the name of your project starts with `AutoGen.`, the version will be set to `VersionPrefixForAutoGen0_2`, otherwise it will be set to `VersionPrefix`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# NuGet Directory | ||
|
||
This directory contains resources and metadata for packaging the AutoGen.NET SDK as a NuGet package. | ||
|
||
## Files | ||
|
||
- **icon.png**: The icon used for the NuGet package. | ||
- **NUGET.md**: The readme file displayed on the NuGet package page. | ||
- **NUGET-PACKAGE.PROPS**: The MSBuild properties file that defines the packaging settings for the NuGet package. | ||
|
||
## Purpose | ||
|
||
The files in this directory are used to configure and build the NuGet package for the AutoGen.NET SDK, ensuring that it includes necessary metadata, documentation, and resources. |