You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

PACKAGING.md 1.4 kB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # Packaging AutoGen.NET
  2. This document describes the steps to pack the `AutoGen.NET` project.
  3. ## Prerequisites
  4. - .NET SDK
  5. ## Create Package
  6. 1. **Restore and Build the Project**
  7. ```bash
  8. dotnet restore
  9. dotnet build --configuration Release --no-restore
  10. ```
  11. 2. **Create the NuGet Package**
  12. ```bash
  13. dotnet pack --configuration Release --no-build
  14. ```
  15. This will generate both the `.nupkg` file and the `.snupkg` file in the `./artifacts/package/release` directory.
  16. For more details, refer to the [official .NET documentation](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-pack).
  17. ## Add new project to package list.
  18. 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
  19. e.g.
  20. ```xml
  21. <Import Project="$(RepoRoot)/nuget/nuget-package.props" />
  22. ```
  23. The `nuget-packages.props` enables `IsPackable` to `true` for the project, it also sets nenecessary metadata for the package.
  24. For more details, refer to the [NuGet folder](./nuget/README.md).
  25. ## Package versioning
  26. 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`.