🕓 15 minutes
What you’ll learn
How to publish your projects from your .NET Core application repository, so you can use them in another application component. It is useful when you have a project/API that you want to use in more than one component.
- Open repository of your .NET Core project on GitLab.
- If you see a file named submoduleToPublish open it, otherwise create a new file with the name submoduleToPublish in the root of repository.
- In this file, write down all of the projects that you want to share between components. Each one on a new line in this format:
SubmoduleName/SubmoduleName.csproj. For example:
- After you build your component containing the file named submoduleToPublish, you will find your published projects in NuGet repository under this structure:
- If everything goes right, you can now use your published projects as a dependency in your other application components.