Table of Contents

Creating a Package

Creating a package for your module is easy.

First off you need to make sure the documentation files are included when creating the package. Add the following to your *.csproj file:

<ItemGroup>
  <Content Include="docs\**\*">
    <Pack>true</Pack>
    <PackagePath>docs\</PackagePath>
  </Content>
</ItemGroup>
<ItemGroup>
  <PackageReference Include="Crosser.EdgeNode.Flows" Version="5.0.0" />
</ItemGroup>
<ItemGroup>
  <Content Include="CHANGELOG.md">
    <Pack>true</Pack>
    <PackagePath>CHANGELOG.md</PackagePath>
  </Content>
</ItemGroup>

[!Warning]

Make sure you do not reference NJJsonSchema directly in your project. The correct version will be included with the Crosser.EdgeNode.Flows package.

Now you can create the package using the dotnet pack command. This command will create a nuget package with version 1.0.0 for your project since we did not specify a version in the csproj file yet. You should run this command from the folder where your *.csproj file is located

dotnet pack .\MyOrg.FlowModule.RandomNumberModule.csproj -c release

You will now have a .nupkg package under RandomNumberModule/bin/release

Tip

Here is an example of package properties you can set in your .csproj file. Here we use VersionPrefix to set the version in order to add a suffix when we pack.

<PropertyGroup>
  <VersionPrefix>1.0.1</VersionPrefix>
  <TargetFramework>net9.0</TargetFramework>
  <PackageId>Crosser.EdgeNode.Module.Samples</PackageId>
  <Authors>Crosser Technologies</Authors>
  <PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
  <PackageReleaseNotes>N/A</PackageReleaseNotes>
  <Copyright>Copyright © 2016-2025 Crosser Technologies. All rights reserved.</Copyright>
  <Company>Crosser Technologies</Company>
  <Product>Example Modules</Product>
</PropertyGroup>
<ItemGroup>
  <Content Include="docs\**\*">
    <Pack>true</Pack>
    <PackagePath>docs\</PackagePath>
  </Content>
</ItemGroup>
<ItemGroup>
  <Content Include="CHANGELOG.md">
    <Pack>true</Pack>
    <PackagePath>CHANGELOG.md</PackagePath>
  </Content>
</ItemGroup>
</Project>

When running dotnet pack with the configuration above a package with id CrosserEdgeNode.Module.Samples and version 1.0.1 will be created. Running dotnet pack --version-suffix =beta1 will create a package with version 1.0.1-beta1.

Please note that you will need the sections ItemGroup to get documentation and changelog included.

>> Upload Package