PC.MobileTools.AppSettings
1.0.14
See the version list below for details.
dotnet add package PC.MobileTools.AppSettings --version 1.0.14
NuGet\Install-Package PC.MobileTools.AppSettings -Version 1.0.14
<PackageReference Include="PC.MobileTools.AppSettings" Version="1.0.14" />
paket add PC.MobileTools.AppSettings --version 1.0.14
#r "nuget: PC.MobileTools.AppSettings, 1.0.14"
// Install PC.MobileTools.AppSettings as a Cake Addin #addin nuget:?package=PC.MobileTools.AppSettings&version=1.0.14 // Install PC.MobileTools.AppSettings as a Cake Tool #tool nuget:?package=PC.MobileTools.AppSettings&version=1.0.14
PC.MobileTools.AppSettings
The package helps developers for generating a configuration file of MAUI mobile application in json format to a C# class. This task allow a CI/CD configuration building for different environments.
How to use.
Add a nuget package into your main MAUI project
dotnet add package PC.MobileTools.AppSettings
Then create a buildconfig.json and appsettings.json at the root of MAUI project, the format of both files as below:
- buildconfig.json
{
"environment": "development",
"className": "Secrets",
"nameSpace": "yournamespace",
"classDir": "Helpers",
"properties": [
{
"name": "AppName",
"type": "String",
"defaultValue": "Company Name"
},
{
"name": "PackageId",
"type": "String",
"defaultValue": "com.companyname.name"
},
{
"name": "ProductId",
"type": "Guid",
"defaultValue": "505aa026-a088-4d7d-9e5d-cd13c3c35f19"
}
]
}
A property type is supporting with some primitive types:
String, Int, Char, Guid, Double, and DateTime.
Note: the nameSpace is required.
- appsettings.json
{
"AppName": "",
"PackageId": "",
"ProductId": ""
}
Note: any property in the appsettings.json must include property declaration in buildconfig file.
- Build your project, then use the generated class in your code:
using yournamespace.Helpers
Console.WriteLine(Secrets.AppName);
Happy coding all ^^.
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on PC.MobileTools.AppSettings:
Package | Downloads |
---|---|
PC.MobileTools
A CI/CD helper for parametized secrets |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.16 | 498 | 6/12/2024 |
1.0.15 | 94 | 6/11/2024 |
1.0.14 | 98 | 6/11/2024 |
1.0.13 | 99 | 6/11/2024 |
1.0.12 | 98 | 6/11/2024 |
1.0.11 | 103 | 6/11/2024 |
1.0.10 | 102 | 6/11/2024 |
1.0.9 | 105 | 5/22/2024 |
1.0.8 | 103 | 5/22/2024 |
1.0.7 | 107 | 5/22/2024 |
1.0.6 | 108 | 5/22/2024 |
1.0.5 | 110 | 5/22/2024 |
1.0.4 | 104 | 5/22/2024 |
1.0.3 | 108 | 5/22/2024 |
1.0.2 | 102 | 5/22/2024 |
1.0.1 | 96 | 5/22/2024 |
1.0.0 | 109 | 5/22/2024 |