The Application Deployment tool provides the option to package .NET sources. This can be useful, for example, to upload the source code to GitHub or integrate it into the build process within an organization's workflow.
The following details the steps to have the .NET sources:
- In the Application Deployment tool, you must select Local or Microsoft Azure Serverless (backend services) as the Target.
- Set the Package Type property with the "Sources" value.
When you choose the Sources value, the deployment creates a structure with two directories:
- src: Contains the generated sources and C-Sharp projects to assemble the binaries.
In the src\build directory, there is a solution file named: <DeploymentUnitName>.sln.
When compiling <DeploymentUnitName>.sln, all the binaries needed to run the application are created in the web\bin directory.
To build those binaries, you just need to execute the command:
dotnet publish src\build\<NameDeploymentUnit>.sln --output web\bin
To force all dependencies to be resolved:
dotnet build --force src\build\<NameDeploymentUnit>.sln --output web\bin
This functionality is available since GeneXus 18 Upgrade 4.