This document covers requirements and guidelines to give hints about developing the tools you find here.
.NET Framework Versions
Libraries must be compatible with netstandard2.0 framework. Even though it is rather old, we keep support for that so that the Unity client system can use the libraries here.
Tools and services are implemented to support net6.0.
NuGet Package Versions
All NuGet packages here share a standard version number that is defined in Version.props.
Local Development Scripts
To develop and debug toolchain changes locally, you must set up a local NuGet repository and maintain the libraries that are being compiled there. There are many different ways to achieve that.
A straight-forward approach is listed below for both Windows and Mac users. These simple batch files allow you to quickly clear existing local packages, re-build everything and install the locally generated Ajuna.DotNet.Template.
export AJUNA_ROOT="/Documents/Development/Ajuna.SDK"export LOCAL_NUGET_ROOT="/Documents/Development/_LocalNugetPackages"export LOCAL_NUGET_CACHE="/Users/{yourUserName}/.nuget/packages"export LOCAL_NUGET_BINARY=nugetexport AJUNA_VERSION="0.1.25"# Using this variable, you override the one set in the project/solution settingsset -mcd $AJUNA_ROOTdotnet build -p:Version=$AJUNA_VERSION --configuration Release cd $AJUNA_ROOT/Tools/Ajuna.DotNetdotnet pack -p:Version=$AJUNA_VERSION echo 'Clear local NuGet cache'rm -rf $LOCAL_NUGET_CACHE/ajuna.dotnetrm -rf $LOCAL_NUGET_CACHE/ajuna.dotnet.templaterm -rf $LOCAL_NUGET_CACHE/ajuna.servicelayerrm -rf $LOCAL_NUGET_CACHE/ajuna.servicelayer.modelrm -rf $LOCAL_NUGET_CACHE/ajuna.aspnetcorerm -rf $LOCAL_NUGET_CACHE/ajuna.dotnet.templateecho "Clear NuGet packages from local feed"rm -rf $LOCAL_NUGET_ROOT/ajuna.dotnetrm -rf $LOCAL_NUGET_ROOT%/ajuna.dotnet.templaterm -rf $LOCAL_NUGET_ROOT/ajuna.servicelayerrm -rf $LOCAL_NUGET_ROOT/ajuna.servicelayer.modelrm -rf $LOCAL_NUGET_ROOT/ajuna.aspnetcorerm -rf $LOCAL_NUGET_ROOT/ajuna.dotnet.templateecho "Add Ajuna.DotNet, Ajuna.DotNet.Template to NuGet"$LOCAL_NUGET_BINARY add $AJUNA_ROOT/Tools/Ajuna.DotNet/nupkg/Ajuna.DotNet.$AJUNA_VERSION.nupkg -Source $LOCAL_NUGET_ROOT$LOCAL_NUGET_BINARY add $AJUNA_ROOT/Tools/Ajuna.DotNet.Template/bin/Release/Ajuna.DotNet.Template.$AJUNA_VERSION.nupkg -Source $LOCAL_NUGET_ROOTecho "Add Ajuna.ServiceLayer, Ajuna.ServiceLayer.Model to NuGet"$LOCAL_NUGET_BINARY add $AJUNA_ROOT/Ajuna.ServiceLayer/bin/Release/Ajuna.ServiceLayer.$AJUNA_VERSION.nupkg -Source $LOCAL_NUGET_ROOT$LOCAL_NUGET_BINARY add $AJUNA_ROOT/Ajuna.ServiceLayer.Model/bin/Release/Ajuna.ServiceLayer.Model.$AJUNA_VERSION.nupkg -Source $LOCAL_NUGET_ROOTecho "Add Ajuna.AspNetCore to NuGet"$LOCAL_NUGET_BINARY add $AJUNA_ROOT/Ajuna.AspNetCore/bin/Release/Ajuna.AspNetCore.$AJUNA_VERSION.nupkg -Source $LOCAL_NUGET_ROOTecho "Install .NET new template"dotnet new --install Ajuna.DotNet.Template
Once you have created the sh file, do not forget to set the permissions accordingly in order to allow it to be executed.
chmod 755 file.sh
Using these scripts should get you started on both platforms on how to maintain the local NuGet packages.
Having this installed, you can scaffold a new project as documented in the Project Generation section.
Debugging & Testing
Debugging
Since the new .NET template provides the absolute minimum to scaffold the projects, you can debug and inspect the actual code generators. Debug Ajuna.DotNet, like any other project.
Testing
First, set the environment variable AJUNA_USE_MOCKUP_PROVIDER
set AJUNA_USE_MOCKUP_PROVIDER=true
Check if set with this command which should return true
echo %AJUNA_USE_MOCKUP_PROVIDER%
If it is the first time, you will be asked for certificate, when running the rest client