Documentation

Create a new Nomirun solution with modules and libraries

1. Create a new Nomirun solution

Create a new Nomirun solution by using nomirun solution command. You can type nomirun solution new -h to get the help with the command.

An example:

 nomirun solution new --solution-name SolutionX -o C:\MyCode

This will generate the new solution.

When the module is generated, it will automatically open a solution in Visual Studio, Visual Studio Code or Jetbrains Rider.

You can use --git-init flag to initialize git repository automatically.

2. Add the Nomirun module to the solution

Open the solution in Visual Studio, Visual Studio Code or Jetbrains Rider. Run the following command in the context of the solution:

 nomirun solution new-module --module-name Reporting

This will generate the new module in the solution (current path).

Note that *.sln or *.slnx files need to be present in the solution path (--solution-path).

You can also target the specific solution by specifying the --solution-path flag like this:

 nomirun solution new-module --module-name Reporting --solution-path C:\MyCode\SolutionX

Note that *.sln or *.slnx files need to be present in the solution path (--solution-path).

The idea is that you can run multiple modules in the same solution and develop quickly.

3. Add the common/shared library to the solution

For cases where you want to share some code between modules, you can add a common library to the solution. In mono repo, those can be referenced by other modules in the csproj files.

You could also build a Nuget package from the library and use it in other projects.

Open the solution in Visual Studio, Visual Studio Code or Jetbrains Rider. Run the following command in the context of the solution:

 nomirun solution new-library --library-name CommonLib

This will generate the CommonLib library in the solution with net9.0 target framework.

Note that *.sln or *.slnx files need to be present in the solution path (--solution-path).

You can also target the specific solution by specifying the --solution-path flag like this:

 nomirun solution new-library --library-name CommonLib --solution-path C:\MyCode\SolutionX

Note that *.sln or *.slnx files need to be present in the solution path (--solution-path).