Generate a method to get the properties specified in the build options.
namespace Example;
using EmbeddedBuildProperty;
internal static partial class Variants
{
[BuildProperty]
public static partial string Flavor();
[BuildProperty("SecretKey")]
public static partial string Key();
}
dotnet build Example.csproj /p:EmbeddedBuildProperty=\"Flavor=Free,SecretKey=12345678\"
Console.WriteLine($"Flavor: {Variants.Flavor()}"); // Free
Console.WriteLine($"Key: {Variants.Key()}"); // 12345678
- Extend supported types
- Secret file support?